diff mbox series

[v2,24/28] target/sh4: Use translator_use_goto_tb

Message ID 20210630183226.3290849-25-richard.henderson@linaro.org
State Superseded
Headers show
Series accel/tcg: Introduce translator_use_goto_tb | expand

Commit Message

Richard Henderson June 30, 2021, 6:32 p.m. UTC
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/sh4/translate.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

-- 
2.25.1

Comments

Peter Maydell July 8, 2021, 12:16 p.m. UTC | #1
On Wed, 30 Jun 2021 at 19:56, Richard Henderson
<richard.henderson@linaro.org> wrote:
>

> Cc: Yoshinori Sato <ysato@users.sourceforge.jp>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  target/sh4/translate.c | 11 +++--------


Reviewed-by: Peter Maydell <peter.maydell@linaro.org>


thanks
-- PMM
diff mbox series

Patch

diff --git a/target/sh4/translate.c b/target/sh4/translate.c
index 4dcfff81f6..db09a0bce3 100644
--- a/target/sh4/translate.c
+++ b/target/sh4/translate.c
@@ -225,17 +225,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)