clarify the purpose of this project
[nyanglibc.git] / stdio-common / getw.s
blob775b3d97a75fd39c7a67607704f2298899203493
1 .text
2 .p2align 4,,15
3 .globl getw
4 .type getw, @function
5 getw:
6 subq $24, %rsp
7 movq %rdi, %rcx
8 movl $1, %edx
9 leaq 12(%rsp), %rdi
10 movl $4, %esi
11 call _IO_fread
12 cmpq $1, %rax
13 jne .L3
14 movl 12(%rsp), %eax
15 .L1:
16 addq $24, %rsp
17 ret
18 .p2align 4,,10
19 .p2align 3
20 .L3:
21 movl $-1, %eax
22 jmp .L1
23 .size getw, .-getw
24 .hidden _IO_fread