Skip to content

Commit

Permalink
target/mips: Fix missing else in gen_goto_tb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
rth7680 committed Jul 9, 2021
1 parent 97eea3c commit 34f5e75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion target/mips/tcg/translate.c
Expand Up @@ -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();
}
}

Expand Down

0 comments on commit 34f5e75

Please sign in to comment.