Skip to contentSkip to conversation

tcg/aarch64: Use 'ull' suffix to force 64-bit constant

PATCH In review Richard Henderson 3 participants 3 messages Mar 29, 2022 – Mar 31, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tcg/aarch64: Use 'ull' suffix to force 64-bit constant

Typo used only 'ul' suffix, which is still 32-bits for windows host.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947

---
 tcg/aarch64/tcg-target.c.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tcg/aarch64/tcg-target.c.inc +2 -2
index 077fc51401..5e67f881f1 100644
@@ -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) {
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 14 lines · Richard Henderson

Typo used only 'ul' suffix, which is still 32-bits for windows host.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947

---
  tcg/aarch64/tcg-target.c.inc | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
tcg/aarch64/tcg-target.c.inc +0 -0
index 077fc51401..5e67f881f1 100644
@@ -1086,9 +1086,9 @@ static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd,
          opc = I3405_MOVZ;

tcg/aarch64/tcg-target.c.inc static void tcg_out_movi(TCGContext *s, TCGType type, TCGReg rd, · line 1094

Quoted 10 lines
tcg/aarch64/tcg-target.c.inc +2 -2
      }
      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 on v1 1/1
#2 lore raw
In reply to Richard Henderson
Quoted 8 lines · Richard Henderson

Typo used only 'ul' suffix, which is still 32-bits for windows host.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/947

---
 tcg/aarch64/tcg-target.c.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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

thanks
-- PMM