Skip to content

Commit

Permalink
target/xtensa: don't continue translation after exception
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
jcmvbkbc committed Jan 15, 2017
1 parent d213251 commit 787eaa4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion target/xtensa/translate.c
Expand Up @@ -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 {
Expand Down

0 comments on commit 787eaa4

Please sign in to comment.