mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
target/m68k: Perform the semihosting test during translate
Replace EXCP_HALT_INSN by EXCP_SEMIHOSTING. Perform the pre- and post-insn tests during translate, leaving only the actual semihosting operation for the exception. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
5fae5110ee
commit
f161e723fd
3 changed files with 44 additions and 17 deletions
|
@ -202,18 +202,8 @@ static void cf_interrupt_all(CPUM68KState *env, int is_hw)
|
|||
/* Return from an exception. */
|
||||
cf_rte(env);
|
||||
return;
|
||||
case EXCP_HALT_INSN:
|
||||
if (semihosting_enabled((env->sr & SR_S) == 0)
|
||||
&& (env->pc & 3) == 0
|
||||
&& cpu_lduw_code(env, env->pc - 4) == 0x4e71
|
||||
&& cpu_ldl_code(env, env->pc) == 0x4e7bf000) {
|
||||
env->pc += 4;
|
||||
do_m68k_semihosting(env, env->dregs[0]);
|
||||
return;
|
||||
}
|
||||
cs->halted = 1;
|
||||
cs->exception_index = EXCP_HLT;
|
||||
cpu_loop_exit(cs);
|
||||
case EXCP_SEMIHOSTING:
|
||||
do_m68k_semihosting(env, env->dregs[0]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue