Skip to content

Commit

Permalink
target/sh4: Use translator_use_goto_tb
Browse files Browse the repository at this point in the history
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Jul 9, 2021
1 parent 95cc1cb commit 3f1e209
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions target/sh4/translate.c
Expand Up @@ -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)
Expand Down

0 comments on commit 3f1e209

Please sign in to comment.