qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH v3 1/1] SPARC64: add icount support


From: Mark Cave-Ayland
Subject: Re: [Qemu-devel] [RFC PATCH v3 1/1] SPARC64: add icount support
Date: Fri, 15 Jun 2018 08:25:11 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0

On 14/06/18 23:40, Richard Henderson wrote:

On 06/14/2018 12:28 PM, Mark Cave-Ayland wrote:
@@ -5834,6 +5928,11 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase, 
CPUState *cs)
              save_npc(dc);
              tcg_gen_exit_tb(NULL, 0);
          }
+    } else if (dc->base.is_jmp == DISAS_EXIT) {
+        /* Exit TB */
+        save_state(dc);
+        gen_op_next_insn();
+        tcg_gen_exit_tb(NULL, 0);
      }

This doesn't look reachable, since the IF that goes with this ELSE is

     if (dc->base.is_jmp != DISAS_NORETURN) {

I suggest

     switch (dc->base.is_jmp) {
     case DISAS_NORETURN:
        break;

     case DISAS_TOO_MANY:
        /* existing block */
        break;

     case DISAS_EXIT:
        /* new code from above */

     default:
         g_assert_not_reached();
     }

Ah sorry my bad - it was getting quite late here.

Okay that works, although I noticed that I had to drop gen_op_next_insn() from the above code that was originally inline for it to work correctly in sparc_tr_tb_stop(). V4 is on its way shortly.


ATB,

Mark.



reply via email to

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