target/sparc: Use translator_use_goto_tb

Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2021-06-20 16:54:12 -07:00
parent 3f1e209845
commit 5645aa2e76

View file

@ -338,23 +338,14 @@ static inline TCGv gen_dest_gpr(DisasContext *dc, int reg)
} }
} }
static inline bool use_goto_tb(DisasContext *s, target_ulong pc, static bool use_goto_tb(DisasContext *s, target_ulong pc, target_ulong npc)
target_ulong npc)
{ {
if (unlikely(s->base.singlestep_enabled || singlestep)) { return translator_use_goto_tb(&s->base, pc) &&
return false; translator_use_goto_tb(&s->base, npc);
}
#ifndef CONFIG_USER_ONLY
return (pc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK) &&
(npc & TARGET_PAGE_MASK) == (s->base.tb->pc & TARGET_PAGE_MASK);
#else
return true;
#endif
} }
static inline void gen_goto_tb(DisasContext *s, int tb_num, static void gen_goto_tb(DisasContext *s, int tb_num,
target_ulong pc, target_ulong npc) target_ulong pc, target_ulong npc)
{ {
if (use_goto_tb(s, pc, npc)) { if (use_goto_tb(s, pc, npc)) {
/* jump to same page: we can use a direct jump */ /* jump to same page: we can use a direct jump */