2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
8 The jmp_buf is filled as follows (d0/d1/a0/a1 are not saved):
10 _jmp_buf offset contents
29 #include "aros/m68k/asm.h"
33 .global AROS_CDEFNAME(setjmp)
34 .type AROS_CDEFNAME(setjmp),%function
36 AROS_CDEFNAME
(setjmp
):
37 /* New version adapted from libnix instead of ixemul.
38 * Note the slightly different register save order.
40 move.
l %sp@
(0*4),%d1
/* store return address */
41 move.
l %sp@
(1*4),%a0
/* get address of jmp_buf */
43 move.
l %a1
,%a0@
(4 * 12)
44 movem.
l %d1-
%d7
/%a2-
%a6
,(%a0
) /* store all registers except scratch and sp*/
46 move.
l #DEBUG_MAGIC,%a0@(4 * 15)
48 moveq.
l #0,%d0 /* return 0 */