target-sparc: Add npc state to insn_start

Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Richard Henderson 2015-08-31 13:30:52 -07:00
parent 6c42444f9a
commit a3d5ad761c
2 changed files with 7 additions and 1 deletions

View File

@ -230,6 +230,7 @@ typedef struct trap_state {
uint32_t tt; uint32_t tt;
} trap_state; } trap_state;
#endif #endif
#define TARGET_INSN_START_EXTRA_WORDS 1
typedef struct sparc_def_t { typedef struct sparc_def_t {
const char *name; const char *name;

View File

@ -5257,7 +5257,12 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu,
tcg_ctx.gen_opc_icount[lj] = num_insns; 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++; num_insns++;
if (unlikely(cpu_breakpoint_test(cs, dc->pc, BP_ANY))) { if (unlikely(cpu_breakpoint_test(cs, dc->pc, BP_ANY))) {