clarify the purpose of this project
[nyanglibc.git] / libio / putchar_u.shared.s
blobe46f529988f37bad7af15b6d5133fa032b471d08
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 putchar_unlocked
9 .type putchar_unlocked, @function
10 putchar_unlocked:
11 movq stdout@GOTPCREL(%rip), %rax
12 movq (%rax), %rdx
13 movzbl %dil, %eax
14 movq 40(%rdx), %rcx
15 cmpq 48(%rdx), %rcx
16 jnb .L4
17 leaq 1(%rcx), %rsi
18 movq %rsi, 40(%rdx)
19 movb %dil, (%rcx)
20 ret
21 .p2align 4,,10
22 .p2align 3
23 .L4:
24 movl %eax, %esi
25 movq %rdx, %rdi
26 jmp __GI___overflow
27 .size putchar_unlocked, .-putchar_unlocked