qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v3 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr


From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v3 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr
Date: Wed, 28 Jun 2023 09:50:52 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.12.0

On 28/6/23 09:11, Richard Henderson wrote:
Changes from v2:
   * Patch 4 relaxes the checking on NPC:
     (1) save_npc has just asserted that if the low 2 bits are non-zero,
         then we have exactly one of our 3 special cases.
     (2) The difference between DYNAMIC_PC_LOOKUP and DYNAMIC_PC within
         NPC are not relevant to chaining, only those two values within PC.
     Therefore simplify the test in sparc_tr_tb_stop.

$ git diff v2..v3
-- >8 --
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index fcc1054943..bd877a5e4a 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -5683,14 +5683,6 @@ static void sparc_tr_tb_stop(DisasContextBase *dcbase, CPUState *cs)
         save_npc(dc);
-        switch (dc->npc) {
-        case DYNAMIC_PC_LOOKUP:
-            if (may_lookup) {
-                tcg_gen_lookup_and_goto_ptr();
-                break;
-            }
-            /* fall through */
-        case DYNAMIC_PC:
+        if (may_lookup) {
+            tcg_gen_lookup_and_goto_ptr();
+        } else {
             tcg_gen_exit_tb(NULL, 0);
-            break;
-        default:
-            g_assert_not_reached();
         }
---

OK, this makes sense.



reply via email to

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