Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
target/sparc: Use DYNAMIC_PC_LOOKUP for conditional branches
When resolving JUMP_PC, we know this is for a plain branch
with no other side effects.

Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20230628071202.230991-6-richard.henderson@linaro.org>
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
  • Loading branch information
rth7680 authored and mcayland committed Jun 28, 2023
1 parent 633c428 commit 99c82c4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions target/sparc/translate.c
Expand Up @@ -941,7 +941,7 @@ static void flush_cond(DisasContext *dc)
{
if (dc->npc == JUMP_PC) {
gen_generic_branch(dc);
dc->npc = DYNAMIC_PC;
dc->npc = DYNAMIC_PC_LOOKUP;
}
}

Expand All @@ -951,7 +951,7 @@ static void save_npc(DisasContext *dc)
switch (dc->npc) {
case JUMP_PC:
gen_generic_branch(dc);
dc->npc = DYNAMIC_PC;
dc->npc = DYNAMIC_PC_LOOKUP;
break;
case DYNAMIC_PC:
case DYNAMIC_PC_LOOKUP:
Expand Down Expand Up @@ -997,7 +997,7 @@ static void gen_mov_pc_npc(DisasContext *dc)
case JUMP_PC:
gen_generic_branch(dc);
tcg_gen_mov_tl(cpu_pc, cpu_npc);
dc->pc = DYNAMIC_PC;
dc->pc = DYNAMIC_PC_LOOKUP;
break;
case DYNAMIC_PC:
case DYNAMIC_PC_LOOKUP:
Expand Down

0 comments on commit 99c82c4

Please sign in to comment.