diff mbox series

[v4,15/31] target/ppc: Tidy exception vs exit_tb

Message ID 20210512185441.3619828-16-matheus.ferst@eldorado.org.br
State Superseded
Headers show
Series [v4,01/31] target/ppc: Add cia field to DisasContext | expand

Commit Message

Matheus K. Ferst May 12, 2021, 6:54 p.m. UTC
From: Richard Henderson <richard.henderson@linaro.org>


We do not need to emit an exit_tb after an exception,
as the latter will exit via longjmp.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Signed-off-by: Matheus Ferst <matheus.ferst@eldorado.org.br>

---
 target/ppc/translate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
2.25.1
diff mbox series

Patch

diff --git a/target/ppc/translate.c b/target/ppc/translate.c
index bfda567ac0..9912686496 100644
--- a/target/ppc/translate.c
+++ b/target/ppc/translate.c
@@ -4651,8 +4651,9 @@  static void gen_lookup_and_goto_ptr(DisasContext *ctx)
         } else if (sse & (CPU_SINGLE_STEP | CPU_BRANCH_STEP)) {
             uint32_t excp = gen_prep_dbgex(ctx);
             gen_exception(ctx, excp);
+        } else {
+            tcg_gen_exit_tb(NULL, 0);
         }
-        tcg_gen_exit_tb(NULL, 0);
     } else {
         tcg_gen_lookup_and_goto_ptr();
     }