From e8b988f824f37cb2f54583b9c2071b2b020ccd00 Mon Sep 17 00:00:00 2001 From: pjht Date: Wed, 20 Mar 2024 11:35:27 -0500 Subject: [PATCH] Fix tasking shim making wrong exeception frame --- tasking.68k | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tasking.68k b/tasking.68k index 2a9e3d6..56b8700 100644 --- a/tasking.68k +++ b/tasking.68k @@ -110,6 +110,11 @@ tnp_as_copy: rts tasking_um_switch_shim: + move.l (a7)+, a0 ; Get the target PC into a0 + ; Push a dummy format/vector word + move.w #0, -(a7) + ; Push the PC + move.l a0, -(a7) move.w sr, d0 ; Push the SR with the supervisor bit cleared to make a "fake" exception frame andi.w #(~$2000), d0 move.w d0, -(a7)