Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Richard Henderson <r...@twiddle.net> --- target-sparc/cpu.h | 1 + target-sparc/translate.c | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 72ea171..ac8f383 100644 --- a/target-sparc/cpu.h +++ b/target-sparc/cpu.h @@ -236,6 +236,7 @@ typedef struct trap_state { uint32_t tt; } trap_state; #endif +#define TARGET_INSN_START_EXTRA_WORDS 1 typedef struct sparc_def_t { const char *name; diff --git a/target-sparc/translate.c b/target-sparc/translate.c index 25b5bc0..6e5b82d 100644 --- a/target-sparc/translate.c +++ b/target-sparc/translate.c @@ -5257,7 +5257,12 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu, tcg_ctx.gen_opc_icount[lj] = num_insns; } } - tcg_gen_insn_start(dc->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 { + tcg_gen_insn_start(dc->pc, dc->npc); + } num_insns++; if (unlikely(cpu_breakpoint_test(cs, dc->pc, BP_ANY))) { -- 2.1.0