[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 17/46] target/i386: do not use s->tmp0 for jumps on ECX ==/!= 0
From: |
Paolo Bonzini |
Subject: |
[PULL 17/46] target/i386: do not use s->tmp0 for jumps on ECX ==/!= 0 |
Date: |
Sun, 31 Dec 2023 09:44:33 +0100 |
Create a new temporary, to ease the register allocator's work.
Creation of the temporary is pushed into gen_ext_tl, which
also allows NULL as the first parameter now.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/tcg/translate.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index afe0fa6c65f..e5f71170967 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -720,6 +720,9 @@ static TCGv gen_ext_tl(TCGv dst, TCGv src, MemOp size, bool
sign)
if (size == MO_TL) {
return src;
}
+ if (!dst) {
+ dst = tcg_temp_new();
+ }
tcg_gen_ext_tl(dst, src, size | (sign ? MO_SIGN : 0));
return dst;
}
@@ -736,9 +739,9 @@ static void gen_exts(MemOp ot, TCGv reg)
static void gen_op_j_ecx(DisasContext *s, TCGCond cond, TCGLabel *label1)
{
- tcg_gen_mov_tl(s->tmp0, cpu_regs[R_ECX]);
- gen_extu(s->aflag, s->tmp0);
- tcg_gen_brcondi_tl(cond, s->tmp0, 0, label1);
+ TCGv tmp = gen_ext_tl(NULL, cpu_regs[R_ECX], s->aflag, false);
+
+ tcg_gen_brcondi_tl(cond, tmp, 0, label1);
}
static inline void gen_op_jz_ecx(DisasContext *s, TCGLabel *label1)
--
2.43.0
- [PULL 08/46] target/i386: reimplement check for validity of LOCK prefix, (continued)
- [PULL 08/46] target/i386: reimplement check for validity of LOCK prefix, Paolo Bonzini, 2023/12/31
- [PULL 09/46] target/i386: avoid trunc and ext for MULX and RORX, Paolo Bonzini, 2023/12/31
- [PULL 10/46] target/i386: rename zext0/zext2 and make them closer to the manual, Paolo Bonzini, 2023/12/31
- [PULL 11/46] target/i386: add X86_SPECIALs for MOVSX and MOVZX, Paolo Bonzini, 2023/12/31
- [PULL 14/46] target/i386: do not clobber T0 on string operations, Paolo Bonzini, 2023/12/31
- [PULL 16/46] target/i386: do not use s->tmp4 for push, Paolo Bonzini, 2023/12/31
- [PULL 15/46] target/i386: split eflags computation out of gen_compute_eflags, Paolo Bonzini, 2023/12/31
- [PULL 12/46] target/i386: do not decode string source/destination into decode->mem, Paolo Bonzini, 2023/12/31
- [PULL 13/46] target/i386: do not clobber A0 in POP translation, Paolo Bonzini, 2023/12/31
- [PULL 18/46] target/i386: prepare for implementation of STOS/SCAS in new decoder, Paolo Bonzini, 2023/12/31
- [PULL 17/46] target/i386: do not use s->tmp0 for jumps on ECX ==/!= 0,
Paolo Bonzini <=
- [PULL 19/46] target/i386: move operand load and writeback out of gen_cmovcc1, Paolo Bonzini, 2023/12/31
- [PULL 21/46] target/i386: introduce flags writeback mechanism, Paolo Bonzini, 2023/12/31
- [PULL 20/46] target/i386: adjust decoding of J operand, Paolo Bonzini, 2023/12/31
- [PULL 34/46] meson: move accelerator dependency checks together, Paolo Bonzini, 2023/12/31
- [PULL 29/46] configure: remove unnecessary subshell, Paolo Bonzini, 2023/12/31
- [PULL 28/46] Makefile: clean qemu-iotests output, Paolo Bonzini, 2023/12/31
- [PULL 38/46] meson: move subdirs to "Collect sources" section, Paolo Bonzini, 2023/12/31
- [PULL 22/46] target/i386: implement CMPccXADD, Paolo Bonzini, 2023/12/31
- [PULL 25/46] meson: fix type of "relocatable" option, Paolo Bonzini, 2023/12/31
- [PULL 31/46] meson: add more sections to main meson.build, Paolo Bonzini, 2023/12/31