diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2017-01-14 16:38:09 -0800 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2017-01-15 13:01:56 -0800 |
commit | 787eaa4904c53070fd5ad772b93e3683354a4b04 (patch) | |
tree | dcfedbbf6324de0693a75d62d82ae0e26dfe85e2 | |
parent | d2132510ca88340bed89db5655e65b7cd87d3d8b (diff) | |
download | qemu-787eaa4904c53070fd5ad772b93e3683354a4b04.zip qemu-787eaa4904c53070fd5ad772b93e3683354a4b04.tar.gz qemu-787eaa4904c53070fd5ad772b93e3683354a4b04.tar.bz2 |
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>
-rw-r--r-- | target/xtensa/translate.c | 5 |
1 files changed, 4 insertions, 1 deletions
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 { |