2 Copyright © 1995-2008, 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 */
21 AROS_CDEFNAME
(vfork_longjmp
):
22 /* Fetch the address of the env-structure off the stack.
23 The address is stored in %eax which is not preserved
24 because it's contents are overwritten anyway by the
29 /* Restore stack pointer and all registers from env */
30 movl
28(%eax
),%esp
/* Restore original stack */
33 movl
%ecx
,retaddr
(%esp
) /* Restore return address */
35 pushl
%ebx
/* Save return value on new stack */
37 /* Restore *(SysBase->ThisTask->tc_SPLower) */
39 movl ThisTask
(%ebx
),%ebx
40 movl tc_SPLower
(%ebx
),%ebx
43 /* Restore all registers */
44 movl
4(%eax
),%ebx
/* %ebx */
45 movl
8(%eax
),%ecx
/* %ecx */
46 movl
12(%eax
),%edx
/* %edx */
47 movl
16(%eax
),%esi
/* %esi */
48 movl
20(%eax
),%edi
/* %edi */
49 movl
24(%eax
),%ebp
/* %ebp */
51 popl
%eax
/* Fetch return value */