clarify the purpose of this project
[nyanglibc.git] / posix / pread64.s
blobf77d0b430ccdb6175860693dd3c6d43c8f95f332
1 .text
2 .p2align 4,,15
3 .globl __libc_pread64
4 .hidden __libc_pread64
5 .type __libc_pread64, @function
6 __libc_pread64:
7 movq %rcx, %r10
8 #APP
9 # 25 "../sysdeps/unix/sysv/linux/pread64.c" 1
10 movl %fs:24,%eax
11 # 0 "" 2
12 #NO_APP
13 testl %eax, %eax
14 jne .L2
15 movl $17, %eax
16 #APP
17 # 25 "../sysdeps/unix/sysv/linux/pread64.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 $17, %eax
44 #APP
45 # 25 "../sysdeps/unix/sysv/linux/pread64.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_pread64, .-__libc_pread64
78 .weak pread
79 .set pread,__libc_pread64
80 .weak __pread
81 .hidden __pread
82 .set __pread,__libc_pread64
83 .globl __libc_pread
84 .set __libc_pread,__libc_pread64
85 .weak pread64
86 .set pread64,__libc_pread64
87 .weak __pread64
88 .hidden __pread64
89 .set __pread64,__libc_pread64
90 .hidden __libc_disable_asynccancel
91 .hidden __libc_enable_asynccancel