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