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