summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Henderson2022-06-02 03:33:53 +0200
committerLaurent Vivier2022-06-02 09:35:02 +0200
commita1aedd6cbdec67c1d47d961144285f4b95af5fc0 (patch)
treeb66e16714b073bf596c9dc3ebd791c1c9e5f7517
parenttarget/m68k: Fix address argument for EXCP_TRACE (diff)
downloadqemu-a1aedd6cbdec67c1d47d961144285f4b95af5fc0.tar.gz
qemu-a1aedd6cbdec67c1d47d961144285f4b95af5fc0.tar.xz
qemu-a1aedd6cbdec67c1d47d961144285f4b95af5fc0.zip
target/m68k: Fix stack frame for EXCP_ILLEGAL
According to the M68040 Users Manual, section 8.4.1, Four word stack frame (format 0), includes Illegal Instruction. Use the correct frame format, which does not use the ADDR argument. Reviewed-by: Laurent Vivier <laurent@vivier.eu> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-Id: <20220602013401.303699-10-richard.henderson@linaro.org> Signed-off-by: Laurent Vivier <laurent@vivier.eu>
-rw-r--r--target/m68k/op_helper.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c
index 3cb71c9140..aa62158eb9 100644
--- a/target/m68k/op_helper.c
+++ b/target/m68k/op_helper.c
@@ -391,11 +391,14 @@ static void m68k_interrupt_all(CPUM68KState *env, int is_hw)
}
break;
+ case EXCP_ILLEGAL:
+ do_stack_frame(env, &sp, 0, oldsr, 0, env->pc);
+ break;
+
case EXCP_ADDRESS:
do_stack_frame(env, &sp, 2, oldsr, 0, env->pc);
break;
- case EXCP_ILLEGAL:
case EXCP_TRAPCC:
/* FIXME: addr is not only env->pc */
do_stack_frame(env, &sp, 2, oldsr, env->pc, env->pc);