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