Message ID | 1484514617-11726-4-git-send-email-jcmvbkbc@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c index 96c64d6..7a198fa 100644 --- a/target/xtensa/translate.c +++ b/target/xtensa/translate.c @@ -3152,8 +3152,11 @@ void gen_intermediate_code(CPUXtensaState *env, TranslationBlock *tb) goto done; } if (tb->flags & XTENSA_TBFLAG_EXCEPTION) { - tcg_gen_movi_i32(cpu_pc, dc.pc); + tcg_gen_insn_start(dc.pc); + ++insn_count; gen_exception(&dc, EXCP_DEBUG); + dc.is_jmp = DISAS_UPDATE; + goto done; } do {
There's no point in continuing translating guest instructions once an unconditional exception is thrown. There's also no point in updating pc before any instruction is translated, don't do it. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com> --- target/xtensa/translate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)