save and restore registers at entry/exit of functions (detected with GCC 3)

This commit is contained in:
Laurent Vivier 2005-06-01 23:26:24 +00:00
parent c874bd5250
commit 4e40550c9f
2 changed files with 9 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* /*
* *
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr> * (c) 2004,2005 Laurent Vivier <LaurentVivier@wanadoo.fr>
* *
*/ */
@ -126,6 +126,7 @@ MMU030_read_phys:
.global MMU030_write_phys .global MMU030_write_phys
MMU030_write_phys: MMU030_write_phys:
link.w %fp,#-8 link.w %fp,#-8
move.l %d2,%sp@-
/* get the address to read */ /* get the address to read */
@ -169,5 +170,6 @@ MMU030_write_phys:
move %d1, %sr move %d1, %sr
move.l (%sp)+, %d1 move.l (%sp)+, %d1
move.l %sp@+, %d2
unlk %fp unlk %fp
rts rts

View File

@ -1,6 +1,6 @@
/* /*
* *
* (c) 2004 Laurent Vivier <LaurentVivier@wanadoo.fr> * (c) 2004,2005 Laurent Vivier <LaurentVivier@wanadoo.fr>
* *
* Some parts from libgcc routines for 68000 w/o floating-point hardware. * Some parts from libgcc routines for 68000 w/o floating-point hardware.
* Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc. * Copyright (C) 1994, 1996, 1997, 1998 Free Software Foundation, Inc.
@ -164,6 +164,7 @@ glue_display_properties:
*/ */
link.w %a6,#-4 link.w %a6,#-4
movem.l %a2-%a4, %sp@-
movm.l #0x3c,-(%sp) movm.l #0x3c,-(%sp)
move.l 28(%a6),%a3 /* unsigned long *video */ move.l 28(%a6),%a3 /* unsigned long *video */
@ -287,11 +288,13 @@ cmpa.l #0, %a0
.exit: .exit:
movm.l (%sp)+,#0x3c00 movm.l (%sp)+,#0x3c00
movem.l %sp@+, %a2-%a4
unlk %a6 unlk %a6
moveq.l #0, %d0 moveq.l #0, %d0
rts rts
.exit_error: .exit_error:
movm.l (%sp)+,#0x3c00 movm.l (%sp)+,#0x3c00
movem.l %sp@+, %a2-%a4
unlk %a6 unlk %a6
moveq.l #-1, %d0 moveq.l #-1, %d0
rts rts
@ -482,6 +485,7 @@ SCSIRead:
.global SCSIComplete .global SCSIComplete
SCSIComplete: SCSIComplete:
link %fp, #0 link %fp, #0
move.l %d2, %sp@-
move.l %d0, -(%sp) move.l %d0, -(%sp)
move.l 8(%fp), %d0 /* stat */ move.l 8(%fp), %d0 /* stat */
move.l 12(%fp), %d1 /* message */ move.l 12(%fp), %d1 /* message */
@ -491,6 +495,7 @@ SCSIComplete:
move.l %d1, -(%sp) move.l %d1, -(%sp)
move.l %d2, -(%sp) move.l %d2, -(%sp)
SCSIDispatch(_SCSIComplete) SCSIDispatch(_SCSIComplete)
move.l %sp@+, %d2
unlk %fp unlk %fp
rts rts