[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 11/23] target/i386: assert that cc_op* and pc_save are preserved
From: |
Paolo Bonzini |
Subject: |
[PULL 11/23] target/i386: assert that cc_op* and pc_save are preserved |
Date: |
Sat, 22 Jun 2024 08:15:45 +0200 |
Now all decoding has been done before any code generation.
There is no need anymore to save and restore cc_op* and
pc_save but, for the time being, assert that this is indeed
the case.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/tcg/translate.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 501a1ef9313..d11c5e1dc13 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -3709,15 +3709,9 @@ static void i386_tr_translate_insn(DisasContextBase
*dcbase, CPUState *cpu)
case 2:
/* Restore state that may affect the next instruction. */
dc->pc = dc->base.pc_next;
- /*
- * TODO: These save/restore can be removed after the table-based
- * decoder is complete; we will be decoding the insn completely
- * before any code generation that might affect these variables.
- */
- dc->cc_op_dirty = orig_cc_op_dirty;
- dc->cc_op = orig_cc_op;
- dc->pc_save = orig_pc_save;
- /* END TODO */
+ assert(dc->cc_op_dirty == orig_cc_op_dirty);
+ assert(dc->cc_op == orig_cc_op);
+ assert(dc->pc_save == orig_pc_save);
dc->base.num_insns--;
tcg_remove_ops_after(dc->prev_insn_end);
dc->base.insn_start = dc->prev_insn_start;
--
2.45.2
- [PULL 01/23] configure: detect --cpu=mipsisa64r6, (continued)
- [PULL 01/23] configure: detect --cpu=mipsisa64r6, Paolo Bonzini, 2024/06/22
- [PULL 02/23] target/i386: fix CC_OP dump, Paolo Bonzini, 2024/06/22
- [PULL 04/23] target/i386: give CC_OP_POPCNT low bits corresponding to MO_TL, Paolo Bonzini, 2024/06/22
- [PULL 03/23] target/i386: use cpu_cc_dst for CC_OP_POPCNT, Paolo Bonzini, 2024/06/22
- [PULL 06/23] target/i386: try not to force EFLAGS computation for CC_OP_ADOX/ADCX, Paolo Bonzini, 2024/06/22
- [PULL 05/23] target/i386: convert bit test instructions to new decoder, Paolo Bonzini, 2024/06/22
- [PULL 08/23] target/i386: convert CMPXCHG8B/CMPXCHG16B to new decoder, Paolo Bonzini, 2024/06/22
- [PULL 07/23] target/i386: decode address before going back to translate.c, Paolo Bonzini, 2024/06/22
- [PULL 09/23] target/i386: do not check PREFIX_LOCK in old-style decoder, Paolo Bonzini, 2024/06/22
- [PULL 10/23] target/i386: list instructions still in translate.c, Paolo Bonzini, 2024/06/22
- [PULL 11/23] target/i386: assert that cc_op* and pc_save are preserved,
Paolo Bonzini <=
- [PULL 14/23] Revert "host/i386: assume presence of SSSE3", Paolo Bonzini, 2024/06/22
- [PULL 16/23] meson: allow configuring the x86-64 baseline, Paolo Bonzini, 2024/06/22
- [PULL 17/23] meson: remove dead optimization option, Paolo Bonzini, 2024/06/22
- [PULL 18/23] block: make assertion more generic, Paolo Bonzini, 2024/06/22
- [PULL 12/23] target/i386: remove gen_ext_tl, Paolo Bonzini, 2024/06/22
- [PULL 19/23] block: do not check bdrv_file_open, Paolo Bonzini, 2024/06/22
- [PULL 21/23] block: rename former bdrv_file_open callbacks, Paolo Bonzini, 2024/06/22
- [PULL 15/23] Revert "host/i386: assume presence of SSE2", Paolo Bonzini, 2024/06/22
- [PULL 13/23] Revert "host/i386: assume presence of POPCNT", Paolo Bonzini, 2024/06/22