diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2023-10-11 11:28:46 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2023-12-29 22:04:30 +0100 |
commit | 4b2baf4a555620f29e75b8194ce2d4fed07a58d0 (patch) | |
tree | 5a7e51d18d56d96f7aae944dff3bdffe72de5c51 | |
parent | d4f611711a9abe23616d6d965fba955340d11d0d (diff) |
target/i386: adjust decoding of J operand
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>
-rw-r--r-- | target/i386/tcg/decode-new.c.inc | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/target/i386/tcg/decode-new.c.inc b/target/i386/tcg/decode-new.c.inc index 99d18d2871..f30889dbc0 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 */ |