clarify the purpose of this project
[nyanglibc.git] / nptl / pread64.s
blob758de6cfeefe66908770726433f993eda67810be
1 .text
2 .p2align 4,,15
3 .globl __libc_pread64
4 .type __libc_pread64, @function
5 __libc_pread64:
6 movq %rcx, %r10
7 #APP
8 # 25 "../sysdeps/unix/sysv/linux/pread64.c" 1
9 movl %fs:24,%eax
10 # 0 "" 2
11 #NO_APP
12 testl %eax, %eax
13 jne .L2
14 movl $17, %eax
15 #APP
16 # 25 "../sysdeps/unix/sysv/linux/pread64.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 %r13
28 pushq %r12
29 movq %rdx, %r13
30 pushq %rbp
31 pushq %rbx
32 movq %rcx, %r12
33 movq %rsi, %rbp
34 movl %edi, %ebx
35 subq $24, %rsp
36 call __pthread_enable_asynccancel@PLT
37 movq %r12, %r10
38 movl %eax, %r8d
39 movq %r13, %rdx
40 movq %rbp, %rsi
41 movl %ebx, %edi
42 movl $17, %eax
43 #APP
44 # 25 "../sysdeps/unix/sysv/linux/pread64.c" 1
45 syscall
47 # 0 "" 2
48 #NO_APP
49 cmpq $-4096, %rax
50 ja .L10
51 .L4:
52 movl %r8d, %edi
53 movq %rax, 8(%rsp)
54 call __pthread_disable_asynccancel@PLT
55 movq 8(%rsp), %rax
56 addq $24, %rsp
57 popq %rbx
58 popq %rbp
59 popq %r12
60 popq %r13
61 ret
62 .p2align 4,,10
63 .p2align 3
64 .L9:
65 movq errno@gottpoff(%rip), %rdx
66 negl %eax
67 movl %eax, %fs:(%rdx)
68 movq $-1, %rax
69 ret
70 .L10:
71 movq errno@gottpoff(%rip), %rdx
72 negl %eax
73 movl %eax, %fs:(%rdx)
74 movq $-1, %rax
75 jmp .L4
76 .size __libc_pread64, .-__libc_pread64
77 .weak pread
78 .set pread,__libc_pread64
79 .weak __pread
80 .set __pread,__libc_pread64
81 .globl __libc_pread
82 .set __libc_pread,__libc_pread64
83 .weak pread64
84 .set pread64,__libc_pread64
85 .weak __pread64
86 .set __pread64,__libc_pread64