mirror of
https://github.com/yuzu-emu/unicorn
synced 2024-11-24 09:48:21 +00:00
sparc: use power_down to terminate emulation, rather than using trap. this fix hangup issue of tests/regress/sparc_reg.py
This commit is contained in:
parent
3bd7fa4bfe
commit
8962adc9c5
1 changed files with 2 additions and 9 deletions
|
@ -2630,12 +2630,6 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn, bool hook_ins
|
||||||
tcg_gen_debug_insn_start(tcg_ctx, dc->pc);
|
tcg_gen_debug_insn_start(tcg_ctx, dc->pc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// end address tells us to stop emulation
|
|
||||||
if (dc->pc == dc->uc->addr_end) {
|
|
||||||
insn = 0x91d02000; // generate TRAP to end this TB
|
|
||||||
hook_insn = false; // do not hook this instruction
|
|
||||||
}
|
|
||||||
|
|
||||||
// Unicorn: trace this instruction on request
|
// Unicorn: trace this instruction on request
|
||||||
if (hook_insn && HOOK_EXISTS_BOUNDED(dc->uc, UC_HOOK_CODE, dc->pc)) {
|
if (hook_insn && HOOK_EXISTS_BOUNDED(dc->uc, UC_HOOK_CODE, dc->pc)) {
|
||||||
gen_uc_tracecode(tcg_ctx, 4, UC_HOOK_CODE_IDX, dc->uc, dc->pc);
|
gen_uc_tracecode(tcg_ctx, 4, UC_HOOK_CODE_IDX, dc->uc, dc->pc);
|
||||||
|
@ -5405,9 +5399,8 @@ static inline void gen_intermediate_code_internal(SPARCCPU *cpu,
|
||||||
// early check to see if the address of this block is the until address
|
// early check to see if the address of this block is the until address
|
||||||
if (pc_start == env->uc->addr_end) {
|
if (pc_start == env->uc->addr_end) {
|
||||||
gen_tb_start(tcg_ctx);
|
gen_tb_start(tcg_ctx);
|
||||||
insn = 0x91d02000; // generate TRAP to end this TB
|
gen_helper_power_down(tcg_ctx, tcg_ctx->cpu_env);
|
||||||
disas_sparc_insn(dc, insn, false);
|
goto done_generating;
|
||||||
goto exit_gen_loop;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
max_insns = tb->cflags & CF_COUNT_MASK;
|
max_insns = tb->cflags & CF_COUNT_MASK;
|
||||||
|
|
Loading…
Reference in a new issue