On 13/2/25 16:50, Philippe Mathieu-Daudé wrote:
On 12/2/25 04:46, Richard Henderson wrote:
Replace target-specific 'Z' with generic 'z'.

Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
---
  tcg/riscv/tcg-target-con-set.h | 10 +++++-----
  tcg/riscv/tcg-target-con-str.h |  1 -
  tcg/riscv/tcg-target.c.inc     | 12 ++++++------
  3 files changed, 11 insertions(+), 12 deletions(-)


diff --git a/tcg/riscv/tcg-target-con-str.h b/tcg/riscv/tcg-target- con-str.h
index 089efe96ca..2f9700638c 100644
--- a/tcg/riscv/tcg-target-con-str.h
+++ b/tcg/riscv/tcg-target-con-str.h
@@ -21,4 +21,3 @@ CONST('K', TCG_CT_CONST_S5)
  CONST('L', TCG_CT_CONST_CMP_VI)
  CONST('N', TCG_CT_CONST_N12)
  CONST('M', TCG_CT_CONST_M12)
-CONST('Z', TCG_CT_CONST_ZERO)

Squashing:

-- >8 --
diff --git a/tcg/riscv/tcg-target.c.inc b/tcg/riscv/tcg-target.c.inc
index 61dc310c1aa..6edeb743384 100644
--- a/tcg/riscv/tcg-target.c.inc
+++ b/tcg/riscv/tcg-target.c.inc

and:

@@ -112,13 +112,12 @@ static TCGReg tcg_target_call_oarg_reg(TCGCallReturnKind kind, int slot)
     return TCG_REG_A0 + slot;
 }

-#define TCG_CT_CONST_ZERO    0x100
-#define TCG_CT_CONST_S12     0x200
-#define TCG_CT_CONST_N12     0x400
-#define TCG_CT_CONST_M12     0x800
-#define TCG_CT_CONST_J12    0x1000
-#define TCG_CT_CONST_S5     0x2000
-#define TCG_CT_CONST_CMP_VI 0x4000
+#define TCG_CT_CONST_S12     0x100
+#define TCG_CT_CONST_N12     0x200
+#define TCG_CT_CONST_M12     0x400
+#define TCG_CT_CONST_J12     0x800
+#define TCG_CT_CONST_S5     0x1000
+#define TCG_CT_CONST_CMP_VI 0x2000

 #define ALL_GENERAL_REGS   MAKE_64BIT_MASK(0, 32)
 #define ALL_VECTOR_REGS    MAKE_64BIT_MASK(32, 32)

@@ -391,9 +391,6 @@ static bool tcg_target_const_match(int64_t val, int ct,
      if (ct & TCG_CT_CONST) {
          return 1;
      }
-    if ((ct & TCG_CT_CONST_ZERO) && val == 0) {
-        return 1;
-    }
      if (type >= TCG_TYPE_V64) {
          /* Val is replicated by VECE; extract the highest element. */
          val >>= (-8 << vece) & 63;
---

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>



Reply via email to