diff mbox series

[v2,10/28] target/cris: Use translator_use_goto_tb

Message ID 20210630183226.3290849-11-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
The test for singlestepping is done in translator_use_goto_tb,
so we may elide it from cris_tr_tb_stop.

Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 target/cris/translate.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

-- 
2.25.1

Comments

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

> The test for singlestepping is done in translator_use_goto_tb,

> so we may elide it from cris_tr_tb_stop.

>

> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>

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

> ---

>  target/cris/translate.c | 5 ++---

>  1 file changed, 2 insertions(+), 3 deletions(-)

>

> diff --git a/target/cris/translate.c b/target/cris/translate.c

> index 4cfe5c86d9..e33a3bb326 100644

> --- a/target/cris/translate.c

> +++ b/target/cris/translate.c

> @@ -482,7 +482,7 @@ static void t_gen_swapr(TCGv d, TCGv s)

>

>  static bool use_goto_tb(DisasContext *dc, target_ulong dest)

>  {

> -    return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0;

> +    return translator_use_goto_tb(&dc->base, dest);

>  }


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


thanks
-- PMM
diff mbox series

Patch

diff --git a/target/cris/translate.c b/target/cris/translate.c
index 4cfe5c86d9..e33a3bb326 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -482,7 +482,7 @@  static void t_gen_swapr(TCGv d, TCGv s)
 
 static bool use_goto_tb(DisasContext *dc, target_ulong dest)
 {
-    return ((dest ^ dc->base.pc_first) & TARGET_PAGE_MASK) == 0;
+    return translator_use_goto_tb(&dc->base, dest);
 }
 
 static void gen_goto_tb(DisasContext *dc, int n, target_ulong dest)
@@ -3235,8 +3235,7 @@  static void cris_tr_tb_stop(DisasContextBase *dcbase, CPUState *cpu)
              * Use a conditional branch if either taken or not-taken path
              * can use goto_tb.  If neither can, then treat it as indirect.
              */
-            if (likely(!dc->base.singlestep_enabled)
-                && likely(!dc->cpustate_changed)
+            if (likely(!dc->cpustate_changed)
                 && (use_goto_tb(dc, dc->jmp_pc) || use_goto_tb(dc, npc))) {
                 TCGLabel *not_taken = gen_new_label();