mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-04-29 23:46:30 +00:00
mips, m68k: early check to see if the address of BB is the until address
This commit is contained in:
parent
242713ce64
commit
a853eb6363
|
@ -3101,6 +3101,13 @@ gen_intermediate_code_internal(M68kCPU *cpu, TranslationBlock *tb,
|
||||||
if (max_insns == 0)
|
if (max_insns == 0)
|
||||||
max_insns = CF_COUNT_MASK;
|
max_insns = CF_COUNT_MASK;
|
||||||
|
|
||||||
|
// Unicorn: early check to see if the address of this block is the until address
|
||||||
|
if (tb->pc == env->uc->addr_end) {
|
||||||
|
gen_tb_start(tcg_ctx);
|
||||||
|
gen_exception(dc, dc->pc, EXCP_TRAP15);
|
||||||
|
goto done_generating;
|
||||||
|
}
|
||||||
|
|
||||||
// Unicorn: trace this block on request
|
// Unicorn: trace this block on request
|
||||||
// Only hook this block if it is not broken from previous translation due to
|
// Only hook this block if it is not broken from previous translation due to
|
||||||
// full translation cache
|
// full translation cache
|
||||||
|
@ -3179,6 +3186,8 @@ gen_intermediate_code_internal(M68kCPU *cpu, TranslationBlock *tb,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
done_generating:
|
||||||
gen_tb_end(tcg_ctx, tb, num_insns);
|
gen_tb_end(tcg_ctx, tb, num_insns);
|
||||||
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
*tcg_ctx->gen_opc_ptr = INDEX_op_end;
|
||||||
|
|
||||||
|
|
|
@ -19207,6 +19207,13 @@ gen_intermediate_code_internal(MIPSCPU *cpu, TranslationBlock *tb,
|
||||||
max_insns = CF_COUNT_MASK;
|
max_insns = CF_COUNT_MASK;
|
||||||
LOG_DISAS("\ntb %p idx %d hflags %04x\n", tb, ctx.mem_idx, ctx.hflags);
|
LOG_DISAS("\ntb %p idx %d hflags %04x\n", tb, ctx.mem_idx, ctx.hflags);
|
||||||
|
|
||||||
|
// Unicorn: early check to see if the address of this block is the until address
|
||||||
|
if (tb->pc == env->uc->addr_end) {
|
||||||
|
gen_tb_start(tcg_ctx);
|
||||||
|
generate_exception(&ctx, EXCP_SYSCALL);
|
||||||
|
goto done_generating;
|
||||||
|
}
|
||||||
|
|
||||||
// Unicorn: trace this block on request
|
// Unicorn: trace this block on request
|
||||||
// Only hook this block if it is not broken from previous translation due to
|
// Only hook this block if it is not broken from previous translation due to
|
||||||
// full translation cache
|
// full translation cache
|
||||||
|
|
Loading…
Reference in a new issue