[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 2/8] target/sparc: Fix npc comparison in sparc_tr_insn_start
From: |
Richard Henderson |
Subject: |
[PATCH v3 2/8] target/sparc: Fix npc comparison in sparc_tr_insn_start |
Date: |
Wed, 28 Jun 2023 09:11:56 +0200 |
During translation, npc == address, DYNAMIC_PC, or JUMP_PC.
It is only the encoding between here and sparc_restore_state_to_opc
that considers JUMP_PC to be a bit within a larger value.
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/sparc/translate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/sparc/translate.c b/target/sparc/translate.c
index 28d4cdb8b4..eec6f9ca67 100644
--- a/target/sparc/translate.c
+++ b/target/sparc/translate.c
@@ -5594,7 +5594,7 @@ static void sparc_tr_insn_start(DisasContextBase *dcbase,
CPUState *cs)
{
DisasContext *dc = container_of(dcbase, DisasContext, base);
- if (dc->npc & JUMP_PC) {
+ if (dc->npc == JUMP_PC) {
assert(dc->jump_pc[1] == dc->pc + 4);
tcg_gen_insn_start(dc->pc, dc->jump_pc[0] | JUMP_PC);
} else {
--
2.34.1
- [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 <=
- [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é, 2023/06/28
- Re: [PATCH v3 0/8] target/sparc: Use tcg_gen_lookup_and_goto_ptr, Mark Cave-Ayland, 2023/06/28