aboutsummaryrefslogtreecommitdiff
path: root/target/xtensa
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2017-01-14 16:38:09 -0800
committerMax Filippov <jcmvbkbc@gmail.com>2017-01-15 13:01:56 -0800
commit787eaa4904c53070fd5ad772b93e3683354a4b04 (patch)
treedcfedbbf6324de0693a75d62d82ae0e26dfe85e2 /target/xtensa
parentd2132510ca88340bed89db5655e65b7cd87d3d8b (diff)
target/xtensa: don't continue translation after exception
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>
Diffstat (limited to 'target/xtensa')
-rw-r--r--target/xtensa/translate.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/xtensa/translate.c b/target/xtensa/translate.c
index 96c64d6c7f..7a198fa203 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 {