diff mbox series

[for-7.0?] tcg/aarch64: Use 'ull' suffix to force 64-bit constant

Message ID 20220329234956.43558-1-richard.henderson@linaro.org
State Superseded
Headers show
Series [for-7.0?] tcg/aarch64: Use 'ull' suffix to force 64-bit constant | expand

Commit Message

Richard Henderson March 29, 2022, 11:49 p.m. UTC
Typo used only 'ul' suffix, which is still 32-bits for windows host.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 tcg/aarch64/tcg-target.c.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé March 30, 2022, 11:48 a.m. UTC | #1
On 30/3/22 01:49, Richard Henderson wrote:
> Typo used only 'ul' suffix, which is still 32-bits for windows host.
> 
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>   tcg/aarch64/tcg-target.c.inc | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
> index 077fc51401..5e67f881f1 100644
> --- a/tcg/aarch64/tcg-target.c.inc
> +++ b/tcg/aarch64/tcg-target.c.inc
> @@ -1086,9 +1086,9 @@ static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,
>           opc = I3405_MOVZ;
>       }
>       s0 = ctz64(t0) & (63 & -16);
> -    t1 = t0 & ~(0xffffUL << s0);
> +    t1 = t0 & ~(0xffffull << s0);
>       s1 = ctz64(t1) & (63 & -16);
> -    t2 = t1 & ~(0xffffUL << s1);
> +    t2 = t1 & ~(0xffffull << s1);
>       if (t2 == 0) {
>           tcg_out_insn_3405(s, opc, type, rd, t0 >> s0, s0);
>           if (t1 != 0) {

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Peter Maydell March 31, 2022, 8:48 a.m. UTC | #2
On Wed, 30 Mar 2022 at 00:49, Richard Henderson
<richard.henderson@linaro.org> wrote:
>
> Typo used only 'ul' suffix, which is still 32-bits for windows host.
>
> Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  tcg/aarch64/tcg-target.c.inc | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

This seems a safe fix, so I would put it in 7.0 at this point.

thanks
-- PMM
diff mbox series

Patch

diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/tcg-target.c.inc
index 077fc51401..5e67f881f1 100644
--- a/tcg/aarch64/tcg-target.c.inc
+++ b/tcg/aarch64/tcg-target.c.inc
@@ -1086,9 +1086,9 @@  static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,
         opc = I3405_MOVZ;
     }
     s0 = ctz64(t0) & (63 & -16);
-    t1 = t0 & ~(0xffffUL << s0);
+    t1 = t0 & ~(0xffffull << s0);
     s1 = ctz64(t1) & (63 & -16);
-    t2 = t1 & ~(0xffffUL << s1);
+    t2 = t1 & ~(0xffffull << s1);
     if (t2 == 0) {
         tcg_out_insn_3405(s, opc, type, rd, t0 >> s0, s0);
         if (t1 != 0) {