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