Commit 926d6cf403 for qemu.org
commit 926d6cf4036102e3e0bc9e7f92291ee2277c3215
Author: Richard Henderson <richard.henderson@linaro.org>
Date: Wed Sep 23 15:06:54 2026 -0700
target/sh4: Drop use_exit_tb
Rely on cpu_exec_step_atomic setting CF_NO_GOTO_TB and
CF_NO_GOTO_PTR, which will cause exit_tb to be used.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Tested-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index c15c0802f7..5729a757f1 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -221,20 +221,8 @@ static inline void gen_save_cpu_state(DisasContext *ctx, bool save_pc)
}
}
-static inline bool use_exit_tb(DisasContext *ctx)
-{
-#ifdef CONFIG_USER_ONLY
- return ctx->in_gusa_exclusive;
-#else
- return false;
-#endif
-}
-
static bool use_goto_tb(DisasContext *ctx, vaddr dest)
{
- if (use_exit_tb(ctx)) {
- return false;
- }
return translator_use_goto_tb(&ctx->base, dest);
}
@@ -246,11 +234,7 @@ static void gen_goto_tb(DisasContext *ctx, unsigned tb_slot_idx, vaddr dest)
tcg_gen_exit_tb(ctx->base.tb, tb_slot_idx);
} else {
tcg_gen_movi_i32(cpu_pc, dest);
- if (use_exit_tb(ctx)) {
- tcg_gen_exit_tb(NULL, 0);
- } else {
- tcg_gen_lookup_and_goto_ptr();
- }
+ tcg_gen_lookup_and_goto_ptr();
}
ctx->base.is_jmp = DISAS_NORETURN;
}
@@ -262,11 +246,7 @@ static void gen_jump(DisasContext * ctx)
delayed jump as immediate jump are conditinal jumps */
tcg_gen_mov_i32(cpu_pc, cpu_delayed_pc);
tcg_gen_discard_i32(cpu_delayed_pc);
- if (use_exit_tb(ctx)) {
- tcg_gen_exit_tb(NULL, 0);
- } else {
- tcg_gen_lookup_and_goto_ptr();
- }
+ tcg_gen_lookup_and_goto_ptr();
ctx->base.is_jmp = DISAS_NORETURN;
} else {
gen_goto_tb(ctx, 0, ctx->delayed_pc);