clarify the purpose of this project
[nyanglibc.git] / libio / getchar_u.shared.s
blob4b4b1a82bc941ecfa2aea66bb6c5070bd8ef2ba9
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 getchar_unlocked
9 .type getchar_unlocked, @function
10 getchar_unlocked:
11 movq stdin@GOTPCREL(%rip), %rax
12 movq (%rax), %rdi
13 movq 8(%rdi), %rax
14 cmpq 16(%rdi), %rax
15 jnb .L4
16 leaq 1(%rax), %rdx
17 movq %rdx, 8(%rdi)
18 movzbl (%rax), %eax
19 ret
20 .p2align 4,,10
21 .p2align 3
22 .L4:
23 jmp __GI___uflow
24 .size getchar_unlocked, .-getchar_unlocked