diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2024-05-09 15:53:11 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2024-10-17 19:41:30 +0200 |
commit | ac92afd19e4017b6973f06a760b9c61ff9fc63c4 (patch) | |
tree | 92c82861ed81e3dbcc934d1d6418ac87162f78ab | |
parent | 7e62a554afba229ef472119ebd93079838978cd0 (diff) | |
download | qemu-ac92afd19e4017b6973f06a760b9c61ff9fc63c4.zip qemu-ac92afd19e4017b6973f06a760b9c61ff9fc63c4.tar.gz qemu-ac92afd19e4017b6973f06a760b9c61ff9fc63c4.tar.bz2 |
target/i386: assert that cc_op* and pc_save are preserved
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>
-rw-r--r-- | target/i386/tcg/translate.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c index f4bffef..ef19041 100644 --- a/target/i386/tcg/translate.c +++ b/target/i386/tcg/translate.c @@ -3700,15 +3700,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; |