From 2b8ee048c8bdebdf21027040b77568e10e87d728 Mon Sep 17 00:00:00 2001 From: ceriel Date: Fri, 9 Jun 1989 09:32:40 +0000 Subject: [PATCH] Added saving of registers --- mach/m68020/libem/trp.s | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/mach/m68020/libem/trp.s b/mach/m68020/libem/trp.s index 17166d4e5..50faa71b3 100644 --- a/mach/m68020/libem/trp.s +++ b/mach/m68020/libem/trp.s @@ -1,3 +1,4 @@ +# .define .trp .sect .text .sect .rom @@ -12,7 +13,6 @@ fmt: .asciz "%s\n" move.l (16, sp), d0 ! error number move.l a0, (16, sp) move.l d0, (12, sp) - move.l d0,-(sp) cmp.l #16, d0 bcc 1f move.l (.trpim), d1 @@ -20,12 +20,21 @@ fmt: .asciz "%s\n" bne 3f 1: move.l (.trppc), a0 - move.l a0, d0 + move.l a0, d1 beq 9f clr.l (.trppc) + movem.l d2-d7/a1-a5,-(sp) +#if _M68881 + fmovem.x fp0-fp7,-(sp) +#endif + move.l d0,-(sp) jsr (a0) -3: add.l #4, sp +#if _M68881 + fmovem.x (sp)+,fp0-fp7,-(sp) +#endif + movem.l (sp)+,d2-d7/a1-a5 +3: movem.l (sp)+, d0/d1/a0 add.l #4, sp rts -- 2.34.1