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