[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.
- [PATCH v3 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr, Richard Henderson, 2023/06/28
- [PATCH v3 2/8] target/sparc: Fix npc comparison in sparc_tr_insn_start, Richard Henderson, 2023/06/28
- [PATCH v3 6/8] target/sparc: Use DYNAMIC_PC_LOOKUP for JMPL, Richard Henderson, 2023/06/28
- [PATCH v3 3/8] target/sparc: Drop inline markers from translate.c, Richard Henderson, 2023/06/28
- [PATCH v3 8/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr for v9 WRASI, Richard Henderson, 2023/06/28
- [PATCH v3 5/8] target/sparc: Use DYNAMIC_PC_LOOKUP for conditional branches, Richard Henderson, 2023/06/28
- [PATCH v3 7/8] target/sparc: Use DYNAMIC_PC_LOOKUP for v9 RETURN, Richard Henderson, 2023/06/28
- [PATCH v3 1/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr in gen_goto_tb, Richard Henderson, 2023/06/28
- [PATCH v3 4/8] target/sparc: Introduce DYNAMIC_PC_LOOKUP, Richard Henderson, 2023/06/28
- Re: [PATCH v3 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr,
Philippe Mathieu-Daudé <=
- Re: [PATCH v3 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr, Mark Cave-Ayland, 2023/06/28