clarify the purpose of this project
[nyanglibc.git] / posix / pwrite64.s
blobae7ff9e49ddf8bbad2ef068880871d92cbdadd58
1 .text
2 .p2align 4,,15
3 .globl __libc_pwrite64
4 .hidden __libc_pwrite64
5 .type __libc_pwrite64, @function
6 __libc_pwrite64:
7 movq %rcx, %r10
8 #APP
9 # 25 "../sysdeps/unix/sysv/linux/pwrite64.c" 1
10 movl %fs:24,%eax
11 # 0 "" 2
12 #NO_APP
13 testl %eax, %eax
14 jne .L2
15 movl $18, %eax
16 #APP
17 # 25 "../sysdeps/unix/sysv/linux/pwrite64.c" 1
18 syscall
20 # 0 "" 2
21 #NO_APP
22 cmpq $-4096, %rax
23 ja .L9
24 rep ret
25 .p2align 4,,10
26 .p2align 3
27 .L2:
28 pushq %r13
29 pushq %r12
30 movq %rdx, %r13
31 pushq %rbp
32 pushq %rbx
33 movq %rcx, %r12
34 movq %rsi, %rbp
35 movl %edi, %ebx
36 subq $24, %rsp
37 call __libc_enable_asynccancel
38 movq %r12, %r10
39 movl %eax, %r8d
40 movq %r13, %rdx
41 movq %rbp, %rsi
42 movl %ebx, %edi
43 movl $18, %eax
44 #APP
45 # 25 "../sysdeps/unix/sysv/linux/pwrite64.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 $24, %rsp
58 popq %rbx
59 popq %rbp
60 popq %r12
61 popq %r13
62 ret
63 .p2align 4,,10
64 .p2align 3
65 .L9:
66 movq __libc_errno@gottpoff(%rip), %rdx
67 negl %eax
68 movl %eax, %fs:(%rdx)
69 movq $-1, %rax
70 ret
71 .L10:
72 movq __libc_errno@gottpoff(%rip), %rdx
73 negl %eax
74 movl %eax, %fs:(%rdx)
75 movq $-1, %rax
76 jmp .L4
77 .size __libc_pwrite64, .-__libc_pwrite64
78 .weak pwrite
79 .set pwrite,__libc_pwrite64
80 .weak __pwrite
81 .hidden __pwrite
82 .set __pwrite,__libc_pwrite64
83 .globl __libc_pwrite
84 .set __libc_pwrite,__libc_pwrite64
85 .weak pwrite64
86 .set pwrite64,__libc_pwrite64
87 .weak __pwrite64
88 .hidden __pwrite64
89 .set __pwrite64,__libc_pwrite64
90 .hidden __libc_disable_asynccancel
91 .hidden __libc_enable_asynccancel