target-sparc: Add npc state to insn_start

Backports commit a3d5ad761cafc669e25f4185e63d8d758a989135 from qemu
This commit is contained in:
Richard Henderson 2018-02-16 00:55:52 -05:00 committed by Lioncash
parent 2c1ae7a408
commit 25e0621757
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7
2 changed files with 7 additions and 1 deletions

View file

@ -232,6 +232,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;

View file

@ -5448,7 +5448,12 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu,
tcg_ctx->gen_opc_icount[lj] = num_insns;
}
}
tcg_gen_insn_start(tcg_ctx, dc->pc);
if (dc->npc & JUMP_PC) {
assert(dc->jump_pc[1] == dc->pc + 4);
tcg_gen_insn_start(tcg_ctx, dc->pc, dc->jump_pc[0] | JUMP_PC);
} else {
tcg_gen_insn_start(tcg_ctx, dc->pc, dc->npc);
}
num_insns++;
//if (num_insns == max_insns && (tb->cflags & CF_LAST_IO)) {