From 34f5e75a9427e00d0f9d745a2dc20a955ec935bf Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Sun, 20 Jun 2021 16:23:04 -0700 Subject: target/mips: Fix missing else in gen_goto_tb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Do not emit dead code for the singlestep_enabled case, after having exited the TB with a debug exception. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- target/mips/tcg/translate.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'target') diff --git a/target/mips/tcg/translate.c b/target/mips/tcg/translate.c index 5cd3e7d..47c967a 100644 --- a/target/mips/tcg/translate.c +++ b/target/mips/tcg/translate.c @@ -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(); } } -- cgit v1.1