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(longjmp)
34 .type AROS_CDEFNAME(longjmp),%function
36 AROS_CDEFNAME
(longjmp
):
37 /* New version adapted from libnix instead of ixemul.
38 * Note the slightly different register save order.
40 addq.
l #4,%sp /* returns to other address */
41 move.
l %sp@
+,%a0
/* get address of jmp_buf */
42 move.
l %sp@
+,%d0
/* get return code */
44 moveq.
l #1,%d0 /* make sure it isn't 0 */
46 movem.
l (%a0
),%d1-
%d7
/%a2-
%a6
/%sp
/* restore all registers except scratch */
48 cmp.
l #DEBUG_MAGIC,%a0@(4 * 15)