clarify the purpose of this project
[nyanglibc.git] / stdio-common / getw.shared.s
blob179b43cc1250ed6bf546a3258d36aa58aa26db02
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 getw
9 .type getw, @function
10 getw:
11 subq $24, %rsp
12 movq %rdi, %rcx
13 movl $1, %edx
14 leaq 12(%rsp), %rdi
15 movl $4, %esi
16 call __GI__IO_fread
17 cmpq $1, %rax
18 jne .L3
19 movl 12(%rsp), %eax
20 .L1:
21 addq $24, %rsp
22 ret
23 .p2align 4,,10
24 .p2align 3
25 .L3:
26 movl $-1, %eax
27 jmp .L1
28 .size getw, .-getw