[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 20/46] target/i386: adjust decoding of J operand
From: |
Paolo Bonzini |
Subject: |
[PULL 20/46] target/i386: adjust decoding of J operand |
Date: |
Sun, 31 Dec 2023 09:44:36 +0100 |
gen_jcc() has been changed to accept a relative offset since the
new decoder was written. Adjust the J operand, which is meant
to be used with jump instructions such as gen_jcc(), to not
include the program counter and to not truncate the result, as
both operations are now performed by common code.
The result is that J is now the same as the I operand.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/tcg/decode-new.c.inc | 10 ----------
1 file changed, 10 deletions(-)
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc
index 99d18d2871e..f30889dbc0a 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -1329,19 +1329,9 @@ static bool decode_op(DisasContext *s, CPUX86State *env,
X86DecodedInsn *decode,
}
case X86_TYPE_I: /* Immediate */
- op->unit = X86_OP_IMM;
- decode->immediate = insn_get_signed(env, s, op->ot);
- break;
-
case X86_TYPE_J: /* Relative offset for a jump */
op->unit = X86_OP_IMM;
decode->immediate = insn_get_signed(env, s, op->ot);
- decode->immediate += s->pc - s->cs_base;
- if (s->dflag == MO_16) {
- decode->immediate &= 0xffff;
- } else if (!CODE64(s)) {
- decode->immediate &= 0xffffffffu;
- }
break;
case X86_TYPE_L: /* The upper 4 bits of the immediate select a 128-bit
register */
--
2.43.0
- [PULL 11/46] target/i386: add X86_SPECIALs for MOVSX and MOVZX, (continued)
- [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, 2023/12/31
- [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 <=
- [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
- [PULL 32/46] meson: move program checks together, Paolo Bonzini, 2023/12/31
- [PULL 23/46] target/i386: the sgx_epc_get_section stub is reachable, Paolo Bonzini, 2023/12/31
- [PULL 24/46] esp: check for NULL result from scsi_device_find(), Paolo Bonzini, 2023/12/31