qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 04/21] Hexagon (target/hexagon) properly generate TB end f


From: Richard Henderson
Subject: Re: [PATCH v2 04/21] Hexagon (target/hexagon) properly generate TB end for DISAS_NORETURN
Date: Fri, 2 Apr 2021 10:34:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

On 3/31/21 8:53 PM, Taylor Simpson wrote:
@@ -601,19 +612,12 @@ static void hexagon_tr_tb_stop(DisasContextBase *dcbase, 
CPUState *cpu)
          gen_exec_counters(ctx);
          tcg_gen_movi_tl(hex_gpr[HEX_REG_PC], ctx->base.pc_next);
          if (ctx->base.singlestep_enabled) {
-            gen_exception_debug();
+            gen_exception_raw(EXCP_DEBUG);
          } else {
              tcg_gen_exit_tb(NULL, 0);
          }
          break;

Looks like you could call gen_end_tb here.  Alternately,

     if (pkt->pkt_has_cof) {
-        ctx->base.is_jmp = DISAS_NORETURN;
+        gen_end_tb(ctx);
     }

    ctx->base.is_jmp = DISAS_TOO_MANY;

which will force the exit of the translate loop and land at that case within tb_stop. At which point you don't need gen_end_tb.

Either way, this is still an improvement.

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

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]