clarify the purpose of this project
[nyanglibc.git] / posix / pread64.shared.s
blobab66234b15949b9d83814e16197049e266e7aa9c
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_pread64
9 .hidden __libc_pread64
10 .type __libc_pread64, @function
11 __libc_pread64:
12 movq %rcx, %r10
13 #APP
14 # 25 "../sysdeps/unix/sysv/linux/pread64.c" 1
15 movl %fs:24,%eax
16 # 0 "" 2
17 #NO_APP
18 testl %eax, %eax
19 jne .L2
20 movl $17, %eax
21 #APP
22 # 25 "../sysdeps/unix/sysv/linux/pread64.c" 1
23 syscall
25 # 0 "" 2
26 #NO_APP
27 cmpq $-4096, %rax
28 ja .L9
29 rep ret
30 .p2align 4,,10
31 .p2align 3
32 .L2:
33 pushq %r13
34 pushq %r12
35 movq %rdx, %r13
36 pushq %rbp
37 pushq %rbx
38 movq %rcx, %r12
39 movq %rsi, %rbp
40 movl %edi, %ebx
41 subq $24, %rsp
42 call __libc_enable_asynccancel
43 movq %r12, %r10
44 movl %eax, %r8d
45 movq %r13, %rdx
46 movq %rbp, %rsi
47 movl %ebx, %edi
48 movl $17, %eax
49 #APP
50 # 25 "../sysdeps/unix/sysv/linux/pread64.c" 1
51 syscall
53 # 0 "" 2
54 #NO_APP
55 cmpq $-4096, %rax
56 ja .L10
57 .L4:
58 movl %r8d, %edi
59 movq %rax, 8(%rsp)
60 call __libc_disable_asynccancel
61 movq 8(%rsp), %rax
62 addq $24, %rsp
63 popq %rbx
64 popq %rbp
65 popq %r12
66 popq %r13
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_pread64, .-__libc_pread64
83 .weak pread
84 .set pread,__libc_pread64
85 .weak __GI___pread
86 .hidden __GI___pread
87 .set __GI___pread,__libc_pread64
88 .globl __libc_pread
89 .set __libc_pread,__libc_pread64
90 .weak pread64
91 .set pread64,__libc_pread64
92 .weak __GI___pread64
93 .hidden __GI___pread64
94 .set __GI___pread64,__libc_pread64
95 .weak __pread64
96 .set __pread64,__GI___pread64
97 .hidden __libc_disable_asynccancel
98 .hidden __libc_enable_asynccancel