mirror of
https://github.com/Cxbx-Reloaded/unicorn.git
synced 2025-03-04 09:19:01 +00:00
mips: check for exit request after every hooked instruction. this fix issue #329
This commit is contained in:
parent
63e227a585
commit
4f268febb4
@ -11349,11 +11349,8 @@ static int decode_mips16_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_n
|
||||
gen_uc_tracecode(tcg_ctx, 0xf8f8f8f8, trace->callback, env->uc, ctx->pc, trace->user_data);
|
||||
*insn_need_patch = true;
|
||||
}
|
||||
// if requested to emulate only some instructions, check if
|
||||
// we need to exit immediately
|
||||
if (env->uc->emu_count > 0) {
|
||||
check_exit_request(tcg_ctx);
|
||||
}
|
||||
// the callback might want to stop emulation immediately
|
||||
check_exit_request(tcg_ctx);
|
||||
}
|
||||
|
||||
switch (op) {
|
||||
@ -13951,11 +13948,8 @@ static int decode_micromips_opc (CPUMIPSState *env, DisasContext *ctx, bool *ins
|
||||
gen_uc_tracecode(tcg_ctx, 0xf8f8f8f8, trace->callback, env->uc, ctx->pc, trace->user_data);
|
||||
*insn_need_patch = true;
|
||||
}
|
||||
// if requested to emulate only some instructions, check if
|
||||
// we need to exit immediately
|
||||
if (env->uc->emu_count > 0) {
|
||||
check_exit_request(tcg_ctx);
|
||||
}
|
||||
// the callback might want to stop emulation immediately
|
||||
check_exit_request(tcg_ctx);
|
||||
}
|
||||
|
||||
op = (ctx->opcode >> 10) & 0x3f;
|
||||
@ -18532,11 +18526,8 @@ static void decode_opc (CPUMIPSState *env, DisasContext *ctx, bool *insn_need_pa
|
||||
gen_uc_tracecode(tcg_ctx, 0xf8f8f8f8, trace->callback, env->uc, ctx->pc, trace->user_data);
|
||||
*insn_need_patch = true;
|
||||
}
|
||||
// if requested to emulate only some instructions, check if
|
||||
// we need to exit immediately
|
||||
if (env->uc->emu_count > 0) {
|
||||
check_exit_request(tcg_ctx);
|
||||
}
|
||||
// the callback might want to stop emulation immediately
|
||||
check_exit_request(tcg_ctx);
|
||||
}
|
||||
|
||||
/* Handle blikely not taken case */
|
||||
|
Loading…
x
Reference in New Issue
Block a user