Skip to content

Commit

Permalink
target/sparc: Merge gen_op_next_insn into only caller
Browse files Browse the repository at this point in the history
Tested-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Acked-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
  • Loading branch information
rth7680 committed Nov 5, 2023
1 parent 3951b7a commit 444d8b3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions target/sparc/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,12 +1015,6 @@ static void gen_mov_pc_npc(DisasContext *dc)
}
}

static void gen_op_next_insn(void)
{
tcg_gen_mov_tl(cpu_pc, cpu_npc);
tcg_gen_addi_tl(cpu_npc, cpu_npc, 4);
}

static void gen_compare(DisasCompare *cmp, bool xcc, unsigned int cond,
DisasContext *dc)
{
Expand Down Expand Up @@ -2346,7 +2340,8 @@ static bool advance_pc(DisasContext *dc)
case DYNAMIC_PC:
case DYNAMIC_PC_LOOKUP:
dc->pc = dc->npc;
gen_op_next_insn();
tcg_gen_mov_tl(cpu_pc, cpu_npc);
tcg_gen_addi_tl(cpu_npc, cpu_npc, 4);
break;

case JUMP_PC:
Expand Down

0 comments on commit 444d8b3

Please sign in to comment.