target/mips: Fix missing else in gen_goto_tb
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 20 Jun 2021 23:23:04 +0000 (16:23 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 9 Jul 2021 16:42:28 +0000 (09:42 -0700)
Do not emit dead code for the singlestep_enabled case,
after having exited the TB with a debug exception.

Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/mips/tcg/translate.c

index 5cd3e7d8ddb851e6ce2bfd9ddcb38512b44c9f5d..47c967acbfd689a08b4ec82a9ebbb9e3f378944e 100644 (file)
@@ -4958,8 +4958,9 @@ static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)
         if (ctx->base.singlestep_enabled) {
             save_cpu_state(ctx, 0);
             gen_helper_raise_exception_debug(cpu_env);
+        } else {
+            tcg_gen_lookup_and_goto_ptr();
         }
-        tcg_gen_lookup_and_goto_ptr();
     }
 }