qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2 28/81] tcg: Add TCGType argument to tcg_out_op


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 28/81] tcg: Add TCGType argument to tcg_out_op
Date: Wed, 8 Jan 2025 23:05:58 +0100
User-agent: Mozilla Thunderbird

On 7/1/25 09:00, Richard Henderson wrote:
Pass TCGOp.type to the output function.
For aarch64 and tci, use this instead of testing TCG_OPF_64BIT.
For s390x, use this instead of testing INDEX_op_deposit_i64.
For i386, use this to initialize rexw.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
  tcg/tcg.c                        | 4 ++--
  tcg/aarch64/tcg-target.c.inc     | 6 +-----
  tcg/arm/tcg-target.c.inc         | 2 +-
  tcg/i386/tcg-target.c.inc        | 9 +++++----
  tcg/loongarch64/tcg-target.c.inc | 2 +-
  tcg/mips/tcg-target.c.inc        | 2 +-
  tcg/ppc/tcg-target.c.inc         | 2 +-
  tcg/riscv/tcg-target.c.inc       | 2 +-
  tcg/s390x/tcg-target.c.inc       | 7 +++----
  tcg/sparc64/tcg-target.c.inc     | 2 +-
  tcg/tci/tcg-target.c.inc         | 4 ++--
  11 files changed, 19 insertions(+), 23 deletions(-)


diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index 64826c7419..e51269f81d 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -2612,12 +2612,12 @@ void tb_target_set_jmp_target(const TranslationBlock 
*tb, int n,
      /* no need to flush icache explicitly */
  }
-static inline void tcg_out_op(TCGContext *s, TCGOpcode opc,
-                              const TCGArg args[TCG_MAX_OP_ARGS],
-                              const int const_args[TCG_MAX_OP_ARGS])
+static void tcg_out_op(TCGContext *s, TCGOpcode opc, TCGType type,
+                       const TCGArg args[TCG_MAX_OP_ARGS],
+                       const int const_args[TCG_MAX_OP_ARGS])
  {
      TCGArg a0, a1, a2;
-    int c, const_a2, vexop, rexw = 0;
+    int c, const_a2, vexop, rexw;
#if TCG_TARGET_REG_BITS == 64
  # define OP_32_64(x) \
@@ -2634,6 +2634,7 @@ static inline void tcg_out_op(TCGContext *s, TCGOpcode 
opc,
      a1 = args[1];
      a2 = args[2];
      const_a2 = const_args[2];
+    rexw = type == TCG_TYPE_I32 ? 0 : P_REXW;
switch (opc) {
      case INDEX_op_goto_ptr:

Please squash:

-- >8 --
diff --git a/tcg/i386/tcg-target.c.inc b/tcg/i386/tcg-target.c.inc
index e51269f81d4..8d1057cdb39 100644
--- a/tcg/i386/tcg-target.c.inc
+++ b/tcg/i386/tcg-target.c.inc
@@ -2622,7 +2622,6 @@ static void tcg_out_op(TCGContext *s, TCGOpcode opc, TCGType type,
 #if TCG_TARGET_REG_BITS == 64
 # define OP_32_64(x) \
         case glue(glue(INDEX_op_, x), _i64): \
-            rexw = P_REXW; /* FALLTHRU */    \
         case glue(glue(INDEX_op_, x), _i32)
 #else
 # define OP_32_64(x) \
---

With that:
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>




reply via email to

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