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/x86_64/asm.h"
13 .globl AROS_CDEFNAME(vfork_longjmp)
14 _FUNCTION
(AROS_CDEFNAME
(vfork_longjmp
))
16 .set FirstArg, 8 /* Skip Return-Adress */
20 AROS_CDEFNAME
(vfork_longjmp
):
22 /* Restore stack pointer and all registers from env */
23 mov
120(%rax
),%rsp
/* Restore original stack */
26 mov
%rcx
,retaddr
(%rsp
) /* Restore return address */
28 push
%rsi
/* Save return value on new stack */
30 /* Restore all registers */
31 mov
8(%rax
),%rbx
/* %ebx */
32 mov
16(%rax
),%rcx
/* %ecx */
33 mov
24(%rax
),%rdx
/* %edx */
34 mov
32(%rax
),%rsi
/* %esi */
35 mov
40(%rax
),%rdi
/* %edi */
36 mov
48(%rax
),%rbp
/* %ebp */
46 pop
%rax
/* Fetch return value */