bug-mes
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] Fix zero extending immediates on 64-bit platforms.


From: Janneke Nieuwenhuizen
Subject: Re: [PATCH 2/2] Fix zero extending immediates on 64-bit platforms.
Date: Mon, 17 Jul 2023 09:17:20 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

Andrius tikonas via Bug reports for GNU Mes writes:

Hi!

> * module/mescc/compile.scm: use long-r instead of long-signed-r.
> ---
>  module/mescc/compile.scm | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/module/mescc/compile.scm b/module/mescc/compile.scm
> index 1f1f9683..ae8d9293 100644
> --- a/module/mescc/compile.scm
> +++ b/module/mescc/compile.scm
> @@ -1470,7 +1470,7 @@
>                 (wrap-as (as info 'long-signed-r)))
>                ((and (> reg-size 4) (= size 4))
>                 ;; for 17-unsigned-le
> -               (wrap-as (as info 'long-signed-r))  ; huh, why not long-r?
> +               (wrap-as (as info 'long-r))

As discussed on IRC, this seems to fix some issues for riscv64 mes-tcc
but there's something fishy here, but this breaks
"17-compare-unsigned-le.c" for x86_64, making it exit 1

--8<---------------cut here---------------start------------->8---
  unsigned r = -2;
  if (r <= -3)
    return 1;
--8<---------------cut here---------------end--------------->8---

i.e., producing code that calculates that -2 <= -3 is true.

So, yeah, to be continued I guess.

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | Avatar® https://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]