target/sh4: Use translator_use_goto_tb
authorRichard Henderson <richard.henderson@linaro.org>
Sun, 20 Jun 2021 23:51:23 +0000 (16:51 -0700)
committerRichard Henderson <richard.henderson@linaro.org>
Fri, 9 Jul 2021 16:42:28 +0000 (09:42 -0700)
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
target/sh4/translate.c

index 8a25a4362eed4ea41eaae48612b3354de58d84ed..40898e2393cd6d50e2c1be2aa7ad9a34024ffc9a 100644 (file)
@@ -224,17 +224,12 @@ static inline bool use_exit_tb(DisasContext *ctx)
     return (ctx->tbflags & GUSA_EXCLUSIVE) != 0;
 }
 
-static inline bool use_goto_tb(DisasContext *ctx, target_ulong dest)
+static bool use_goto_tb(DisasContext *ctx, target_ulong dest)
 {
-    /* Use a direct jump if in same page and singlestep not enabled */
-    if (unlikely(ctx->base.singlestep_enabled || use_exit_tb(ctx))) {
+    if (use_exit_tb(ctx)) {
         return false;
     }
-#ifndef CONFIG_USER_ONLY
-    return (ctx->base.tb->pc & TARGET_PAGE_MASK) == (dest & TARGET_PAGE_MASK);
-#else
-    return true;
-#endif
+    return translator_use_goto_tb(&ctx->base, dest);
 }
 
 static void gen_goto_tb(DisasContext *ctx, int n, target_ulong dest)