2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
5 Desc: longjmp for vfork(), m68k version
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(vfork_longjmp)
34 .type AROS_CDEFNAME(vfork_longjmp),%function
36 AROS_CDEFNAME
(vfork_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 cmp.
l #(DEBUG_MAGIC+1),%a0@(4 * 15)
49 movem.
l (%a0
),%d1-
%d7
/%a2-
%a6
/%sp
/* restore all registers except scratch */
50 move.
l %d1
,%a0
/* set return address */