clarify the purpose of this project
[nyanglibc.git] / posix / wait4.shared.s
blob2a6cd009fedfc5f064aa3024de5a5fb06ab71c4f
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __GI___wait4
9 .hidden __GI___wait4
10 .type __GI___wait4, @function
11 __GI___wait4:
12 movq %rcx, %r10
13 #APP
14 # 30 "../sysdeps/unix/sysv/linux/wait4.c" 1
15 movl %fs:24,%eax
16 # 0 "" 2
17 #NO_APP
18 testl %eax, %eax
19 jne .L2
20 movl $61, %eax
21 #APP
22 # 30 "../sysdeps/unix/sysv/linux/wait4.c" 1
23 syscall
25 # 0 "" 2
26 #NO_APP
27 cmpq $-4096, %rax
28 ja .L11
29 rep ret
30 .p2align 4,,10
31 .p2align 3
32 .L2:
33 pushq %r13
34 pushq %r12
35 movq %rcx, %r13
36 pushq %rbp
37 pushq %rbx
38 movl %edx, %r12d
39 movq %rsi, %rbp
40 movl %edi, %ebx
41 subq $24, %rsp
42 call __libc_enable_asynccancel
43 movq %r13, %r10
44 movl %eax, %r8d
45 movl %r12d, %edx
46 movq %rbp, %rsi
47 movl %ebx, %edi
48 movl $61, %eax
49 #APP
50 # 30 "../sysdeps/unix/sysv/linux/wait4.c" 1
51 syscall
53 # 0 "" 2
54 #NO_APP
55 cmpq $-4096, %rax
56 ja .L12
57 .L6:
58 movl %r8d, %edi
59 movl %eax, 12(%rsp)
60 call __libc_disable_asynccancel
61 movl 12(%rsp), %eax
62 addq $24, %rsp
63 popq %rbx
64 popq %rbp
65 popq %r12
66 popq %r13
67 ret
68 .p2align 4,,10
69 .p2align 3
70 .L11:
71 movq __libc_errno@gottpoff(%rip), %rdx
72 negl %eax
73 movl %eax, %fs:(%rdx)
74 movl $-1, %eax
75 ret
76 .L12:
77 movq __libc_errno@gottpoff(%rip), %rdx
78 negl %eax
79 movl %eax, %fs:(%rdx)
80 movl $-1, %eax
81 jmp .L6
82 .size __GI___wait4, .-__GI___wait4
83 .globl __wait4
84 .set __wait4,__GI___wait4
85 .weak wait4
86 .set wait4,__wait4
87 .hidden __libc_disable_asynccancel
88 .hidden __libc_enable_asynccancel