[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 12/19] target/i386: adjust decoding of J operand
|
From: |
Paolo Bonzini |
|
Subject: |
[PATCH v2 12/19] target/i386: adjust decoding of J operand |
|
Date: |
Thu, 19 Oct 2023 12:46:41 +0200 |
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 and 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.
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 dc596ba9f7a..1ae731459b7 100644
--- a/target/i386/tcg/decode-new.c.inc
+++ b/target/i386/tcg/decode-new.c.inc
@@ -1448,19 +1448,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.41.0
- [PATCH v2 06/19] target/i386: accept full MemOp in gen_ext_tl, (continued)
- [PATCH v2 06/19] target/i386: accept full MemOp in gen_ext_tl, Paolo Bonzini, 2023/10/19
- [PATCH v2 01/19] target/i386: group common checks in the decoding phase, Paolo Bonzini, 2023/10/19
- [PATCH v2 08/19] target/i386: implement CMPccXADD, Paolo Bonzini, 2023/10/19
- [PATCH v2 11/19] target/i386: move 00-5F opcodes to new decoder, Paolo Bonzini, 2023/10/19
- [PATCH v2 09/19] target/i386: do not clobber A0 in POP translation, Paolo Bonzini, 2023/10/19
- [PATCH v2 14/19] tcg: add negsetcondi, Paolo Bonzini, 2023/10/19
- [PATCH v2 07/19] target/i386: introduce flags writeback mechanism, Paolo Bonzini, 2023/10/19
- [PATCH v2 10/19] target/i386: reintroduce debugging mechanism, Paolo Bonzini, 2023/10/19
- [PATCH v2 13/19] target/i386: split eflags computation out of gen_compute_eflags, Paolo Bonzini, 2023/10/19
- [PATCH v2 12/19] target/i386: adjust decoding of J operand,
Paolo Bonzini <=
- [PATCH v2 16/19] target/i386: move operand load and writeback out of gen_cmovcc1, Paolo Bonzini, 2023/10/19
- [PATCH v2 15/19] target/i386: move 60-BF opcodes to new decoder, Paolo Bonzini, 2023/10/19
- [PATCH v2 17/19] target/i386: move remaining conditional operations to new decoder, Paolo Bonzini, 2023/10/19
- [PATCH v2 19/19] target/i386: remove gen_op, Paolo Bonzini, 2023/10/19
- [PATCH v2 18/19] target/i386: remove now converted opcodes from old decoder, Paolo Bonzini, 2023/10/19
- Re: [PATCH v2 00/19] target/i386: decoder changes for 8.2, Paolo Bonzini, 2023/10/19
- Re: [PATCH v2 00/19] target/i386: decoder changes for 8.2, Richard Henderson, 2023/10/19