[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 12/18] target/i386: adjust decoding of J operand
|
From: |
Paolo Bonzini |
|
Subject: |
[PATCH 12/18] target/i386: adjust decoding of J operand |
|
Date: |
Sat, 14 Oct 2023 12:01:14 +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 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.
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 91f79c09b73..37ed669bde0 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 05/18] tests/tcg/i386: test-avx: add test cases for SHA new instructions, (continued)
- [PATCH 05/18] tests/tcg/i386: test-avx: add test cases for SHA new instructions, Paolo Bonzini, 2023/10/14
- [PATCH 04/18] tests/tcg/i386: initialize more registers in test-avx, Paolo Bonzini, 2023/10/14
- [PATCH 06/18] target/i386: accept full MemOp in gen_ext_tl, Paolo Bonzini, 2023/10/14
- [PATCH 09/18] target/i386: do not clobber A0 in POP translation, Paolo Bonzini, 2023/10/14
- [PATCH 03/18] target/i386: implement SHA instructions, Paolo Bonzini, 2023/10/14
- [PATCH 10/18] target/i386: reintroduce debugging mechanism, Paolo Bonzini, 2023/10/14
- [PATCH 12/18] target/i386: adjust decoding of J operand,
Paolo Bonzini <=
- [PATCH 13/18] target/i386: split eflags computation out of gen_compute_eflags, Paolo Bonzini, 2023/10/14
- [PATCH 07/18] target/i386: introduce flags writeback mechanism, Paolo Bonzini, 2023/10/14
- [PATCH 08/18] target/i386: implement CMPccXADD, Paolo Bonzini, 2023/10/14
- [PATCH 14/18] target/i386: move 60-BF opcodes to new decoder, Paolo Bonzini, 2023/10/14