diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2023-10-03 15:15:24 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2024-04-24 15:46:00 -0700 |
| commit | f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8 (patch) | |
| tree | 325bee8ed13149a5d18f7787492a55faabbb47db /target/m68k/op_helper.c | |
| parent | 5fae5110eedba1110605c88d96cd4a5f057bfca2 (diff) | |
| download | focaccia-qemu-f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8.tar.gz focaccia-qemu-f161e723fdfddfc820c7f19eb6ac76ac6ba6d2a8.zip | |
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>
Diffstat (limited to 'target/m68k/op_helper.c')
| -rw-r--r-- | target/m68k/op_helper.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index 125f6c1b08..15bad5dd46 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -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; } } |