2 Copyright © 1995-2011, The AROS Development Team. All rights reserved.
6 /* This function works the same as longjmp() except it lacks the argument
7 check. It's used only by vfork() implementation. */
9 #include "aros/i386/asm.h"
13 .globl AROS_CDEFNAME(vfork_longjmp)
14 _FUNCTION
(AROS_CDEFNAME
(vfork_longjmp
))
16 .set FirstArg, 4 /* Skip Return-Adress */
20 AROS_CDEFNAME
(vfork_longjmp
):
21 /* Fetch the address of the env-structure off the stack.
22 The address is stored in %eax which is not preserved
23 because it's contents are overwritten anyway by the
28 /* Restore stack pointer and all registers from env */
29 movl
28(%eax
),%esp
/* Restore original stack */
32 movl
%ecx
,retaddr
(%esp
) /* Restore return address */
34 pushl
%ebx
/* Save return value on new stack */
36 /* Restore all registers */
37 movl
4(%eax
),%ebx
/* %ebx */
38 movl
8(%eax
),%ecx
/* %ecx */
39 movl
12(%eax
),%edx
/* %edx */
40 movl
16(%eax
),%esi
/* %esi */
41 movl
20(%eax
),%edi
/* %edi */
42 movl
24(%eax
),%ebp
/* %ebp */
44 popl
%eax
/* Fetch return value */