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