[PATCH 3/6] target/i386/tcg: remove dead constants

Paolo Bonzini posted 6 patches 3 weeks, 4 days ago
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Richard Henderson <richard.henderson@linaro.org>, Eduardo Habkost <eduardo@habkost.net>
[PATCH 3/6] target/i386/tcg: remove dead constants
Posted by Paolo Bonzini 3 weeks, 4 days ago
NB_OP_SIZES has been dead since the conversion to TCG, REG_L_OFFSET
since 2015, the others somewhere in the middle.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 target/i386/tcg/translate.c | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 460848e4223..20aa94347b0 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -374,30 +374,6 @@ static void gen_update_cc_op(DisasContext *s)
     }
 }
 
-#ifdef TARGET_X86_64
-
-#define NB_OP_SIZES 4
-
-#else /* !TARGET_X86_64 */
-
-#define NB_OP_SIZES 3
-
-#endif /* !TARGET_X86_64 */
-
-#if HOST_BIG_ENDIAN
-#define REG_B_OFFSET (sizeof(target_ulong) - 1)
-#define REG_H_OFFSET (sizeof(target_ulong) - 2)
-#define REG_W_OFFSET (sizeof(target_ulong) - 2)
-#define REG_L_OFFSET (sizeof(target_ulong) - 4)
-#define REG_LH_OFFSET (sizeof(target_ulong) - 8)
-#else
-#define REG_B_OFFSET 0
-#define REG_H_OFFSET 1
-#define REG_W_OFFSET 0
-#define REG_L_OFFSET 0
-#define REG_LH_OFFSET 4
-#endif
-
 /* In instruction encodings for byte register accesses the
  * register number usually indicates "low 8 bits of register N";
  * however there are some special cases where N 4..7 indicates
-- 
2.52.0
Re: [PATCH 3/6] target/i386/tcg: remove dead constants
Posted by Richard Henderson 3 weeks ago
On 1/15/26 22:33, Paolo Bonzini wrote:
> NB_OP_SIZES has been dead since the conversion to TCG, REG_L_OFFSET
> since 2015, the others somewhere in the middle.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   target/i386/tcg/translate.c | 24 ------------------------
>   1 file changed, 24 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH 3/6] target/i386/tcg: remove dead constants
Posted by Philippe Mathieu-Daudé 3 weeks, 3 days ago
On 15/1/26 12:33, Paolo Bonzini wrote:
> NB_OP_SIZES has been dead since the conversion to TCG, REG_L_OFFSET
> since 2015, the others somewhere in the middle.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   target/i386/tcg/translate.c | 24 ------------------------
>   1 file changed, 24 deletions(-)

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