[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 09/10] target/sparc: Use tcg_gen_lookup_and_goto_ptr for v9 WRASI
From: |
Mark Cave-Ayland |
Subject: |
[PULL 09/10] target/sparc: Use tcg_gen_lookup_and_goto_ptr for v9 WRASI |
Date: |
Wed, 28 Jun 2023 12:45:03 +0100 |
From: Richard Henderson <richard.henderson@linaro.org>
We incorporate %asi into tb->flags so that we may generate
inline code for the many ASIs for which it is easy to do so.
Setting %asi is common for e.g. memcpy and memset performing
block copy and clear, so it is worth noticing this case.
We must end the TB but do not need to return to the main loop.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230628071202.230991-9-richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
---
target/sparc/translate.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 9148e33283..bd877a5e4a 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -4147,10 +4147,14 @@ static void disas_sparc_insn(DisasContext * dc,
unsigned int insn)
tcg_gen_andi_tl(cpu_tmp0, cpu_tmp0, 0xff);
tcg_gen_st32_tl(cpu_tmp0, cpu_env,
offsetof(CPUSPARCState, asi));
- /* End TB to notice changed ASI. */
+ /*
+ * End TB to notice changed ASI.
+ * TODO: Could notice src1 = %g0 and IS_IMM,
+ * update DisasContext and not exit the TB.
+ */
save_state(dc);
gen_op_next_insn();
- tcg_gen_exit_tb(NULL, 0);
+ tcg_gen_lookup_and_goto_ptr();
dc->base.is_jmp = DISAS_NORETURN;
break;
case 0x6: /* V9 wrfprs */
--
2.30.2
- [PULL 01/10] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it", (continued)
- [PULL 01/10] Revert "hw/sparc64/niagara: Use blk_name() instead of open-coding it", Mark Cave-Ayland, 2023/06/28
- [PULL 02/10] target/sparc: Use tcg_gen_lookup_and_goto_ptr in gen_goto_tb, Mark Cave-Ayland, 2023/06/28
- [PULL 03/10] target/sparc: Fix npc comparison in sparc_tr_insn_start, Mark Cave-Ayland, 2023/06/28
- [PULL 04/10] target/sparc: Drop inline markers from translate.c, Mark Cave-Ayland, 2023/06/28
- [PULL 06/10] target/sparc: Use DYNAMIC_PC_LOOKUP for conditional branches, Mark Cave-Ayland, 2023/06/28
- [PULL 07/10] target/sparc: Use DYNAMIC_PC_LOOKUP for JMPL, Mark Cave-Ayland, 2023/06/28
- [PULL 10/10] escc: emulate dip switch language layout settings on SUN keyboard, Mark Cave-Ayland, 2023/06/28
- [PULL 08/10] target/sparc: Use DYNAMIC_PC_LOOKUP for v9 RETURN, Mark Cave-Ayland, 2023/06/28
- [PULL 09/10] target/sparc: Use tcg_gen_lookup_and_goto_ptr for v9 WRASI,
Mark Cave-Ayland <=
- [PULL 05/10] target/sparc: Introduce DYNAMIC_PC_LOOKUP, Mark Cave-Ayland, 2023/06/28
- Re: [PULL 00/10] qemu-sparc queue 20230628, Richard Henderson, 2023/06/28