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