[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/16] target/i386: assert that gen_update_eip_cur and gen_update
From: |
Paolo Bonzini |
Subject: |
[PATCH 06/16] target/i386: assert that gen_update_eip_cur and gen_update_eip_next are the same in tb_stop |
Date: |
Fri, 24 May 2024 10:10:09 +0200 |
This is an invariant, since these cases of tb_stop() should only
be reached through the "instruction decoding completed" path of
i386_tr_translate_insn().
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
target/i386/tcg/translate.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/i386/tcg/translate.c b/target/i386/tcg/translate.c
index 5dae890d2b6..2c7917d239f 100644
--- a/target/i386/tcg/translate.c
+++ b/target/i386/tcg/translate.c
@@ -4787,6 +4787,7 @@ static void i386_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cpu)
gen_jmp_rel_csize(dc, 0, 0);
break;
case DISAS_EOB_NEXT:
+ assert(dc->base.pc_next == dc->pc);
gen_update_eip_cur(dc);
/* fall through */
case DISAS_EOB_ONLY:
@@ -4796,6 +4797,7 @@ static void i386_tr_tb_stop(DisasContextBase *dcbase,
CPUState *cpu)
gen_eob_syscall(dc);
break;
case DISAS_EOB_INHIBIT_IRQ:
+ assert(dc->base.pc_next == dc->pc);
gen_update_eip_cur(dc);
gen_eob_inhibit_irq(dc);
break;
--
2.45.1
- Re: [PATCH 01/16] target/i386: remove unnecessary gen_update_cc_op before gen_eob*, (continued)
- [PATCH 02/16] target/i386: cleanup eob handling of RSM, Paolo Bonzini, 2024/05/24
- [PATCH 03/16] target/i386: document and group DISAS_* constants, Paolo Bonzini, 2024/05/24
- [PATCH 04/16] target/i386: avoid calling gen_eob_syscall before tb_stop, Paolo Bonzini, 2024/05/24
- [PATCH 05/16] target/i386: avoid calling gen_eob_inhibit_irq before tb_stop, Paolo Bonzini, 2024/05/24
- [PATCH 06/16] target/i386: assert that gen_update_eip_cur and gen_update_eip_next are the same in tb_stop,
Paolo Bonzini <=
- [PATCH 08/16] target/i386: reg in gen_ldst_modrm is always OR_TMP0, Paolo Bonzini, 2024/05/24
- [PATCH 07/16] target/i386: raze the gen_eob* jungle, Paolo Bonzini, 2024/05/24
- [PATCH 09/16] target/i386: split gen_ldst_modrm for load and store, Paolo Bonzini, 2024/05/24
- [PATCH 10/16] target/i386: inline gen_add_A0_ds_seg, Paolo Bonzini, 2024/05/24
- [PATCH 11/16] target/i386: use mo_stacksize more, Paolo Bonzini, 2024/05/24