Updated PCI IDs to latest snapshot.
[tangerine.git] / arch / x86_64-all / clib / vfork_longjmp.s
blob009cf0a1421896ee03cdc6082614a7713b060ab7
1 /*
2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
3 $Id$
4 */
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"
11 .text
12 _ALIGNMENT
13 .globl AROS_CDEFNAME(vfork_longjmp)
14 _FUNCTION(AROS_CDEFNAME(vfork_longjmp))
16 .set FirstArg, 8 /* Skip Return-Adress */
17 .set env, FirstArg
18 .set val, env+8
19 .set retaddr, 0
21 AROS_CDEFNAME(vfork_longjmp):
22 mov %rdi, %rax
23 /* Restore stack pointer and all registers from env */
24 mov 120(%rax),%rsp /* Restore original stack */
26 mov 0(%rax),%rcx
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 */
38 mov 56(%rax),%r8
39 mov 64(%rax),%r9
40 mov 72(%rax),%r10
41 mov 80(%rax),%r11
42 mov 88(%rax),%r12
43 mov 96(%rax),%r13
44 mov 104(%rax),%r14
45 mov 112(%rax),%r15
47 pop %rax /* Fetch return value */
48 ret