clarify the purpose of this project
[nyanglibc.git] / libio / fputc.shared.s
blob24d0dabdc4c6e17d5453a7d683fb317b77207c2f
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 fputc
9 .type fputc, @function
10 fputc:
11 .LFB68:
12 pushq %r12
13 pushq %rbp
14 pushq %rbx
15 testb $-128, 116(%rsi)
16 movq %rsi, %rbx
17 jne .L2
18 movq 40(%rsi), %rdx
19 cmpq 48(%rsi), %rdx
20 movzbl %dil, %r8d
21 jnb .L20
22 leaq 1(%rdx), %rcx
23 movq %rcx, 40(%rsi)
24 movb %dil, (%rdx)
25 .L1:
26 popq %rbx
27 movl %r8d, %eax
28 popq %rbp
29 popq %r12
30 ret
31 .p2align 4,,10
32 .p2align 3
33 .L2:
34 movl (%rsi), %edx
35 movl %edi, %ebp
36 andl $32768, %edx
37 jne .L5
38 movq 136(%rsi), %rdi
39 movq %fs:16, %r12
40 cmpq %r12, 8(%rdi)
41 je .L6
42 #APP
43 # 37 "fputc.c" 1
44 movl %fs:24,%eax
45 # 0 "" 2
46 #NO_APP
47 testl %eax, %eax
48 jne .L7
49 movl $1, %edx
50 #APP
51 # 47 "../sysdeps/unix/sysv/linux/x86/lowlevellock.h" 1
52 cmpxchgl %edx, (%rdi)
53 # 0 "" 2
54 #NO_APP
55 .L8:
56 movq 136(%rbx), %rdi
57 movq %r12, 8(%rdi)
58 .L6:
59 addl $1, 4(%rdi)
60 .L5:
61 movq 40(%rbx), %rax
62 cmpq 48(%rbx), %rax
63 movzbl %bpl, %r8d
64 jnb .L21
65 leaq 1(%rax), %rdx
66 movq %rdx, 40(%rbx)
67 movb %bpl, (%rax)
68 .L12:
69 testl $32768, (%rbx)
70 jne .L1
71 movq 136(%rbx), %rdi
72 movl 4(%rdi), %eax
73 subl $1, %eax
74 testl %eax, %eax
75 movl %eax, 4(%rdi)
76 jne .L1
77 movq $0, 8(%rdi)
78 #APP
79 # 885 "libioP.h" 1
80 movl %fs:24,%edx
81 # 0 "" 2
82 #NO_APP
83 testl %edx, %edx
84 jne .L13
85 subl $1, (%rdi)
86 movl %r8d, %eax
87 popq %rbx
88 popq %rbp
89 popq %r12
90 ret
91 .p2align 4,,10
92 .p2align 3
93 .L21:
94 movl %r8d, %esi
95 movq %rbx, %rdi
96 .LEHB0:
97 call __GI___overflow
98 .LEHE0:
99 movl %eax, %r8d
100 jmp .L12
101 .p2align 4,,10
102 .p2align 3
103 .L20:
104 movq %rbx, %rdi
105 movl %r8d, %esi
106 popq %rbx
107 popq %rbp
108 popq %r12
109 .LEHB1:
110 jmp __GI___overflow
111 .LEHE1:
112 .p2align 4,,10
113 .p2align 3
114 .L7:
115 movl $1, %ecx
116 movl %edx, %eax
117 lock cmpxchgl %ecx, (%rdi)
118 je .L8
119 .LEHB2:
120 call __lll_lock_wait_private
121 .LEHE2:
122 jmp .L8
123 .p2align 4,,10
124 .p2align 3
125 .L13:
126 #APP
127 # 885 "libioP.h" 1
128 xchgl %eax, (%rdi)
129 # 0 "" 2
130 #NO_APP
131 cmpl $1, %eax
132 jle .L1
133 xorl %r10d, %r10d
134 movl $1, %edx
135 movl $129, %esi
136 movl $202, %eax
137 #APP
138 # 885 "libioP.h" 1
139 syscall
141 # 0 "" 2
142 #NO_APP
143 jmp .L1
144 .L17:
145 testl $32768, (%rbx)
146 movq %rax, %r8
147 jne .L15
148 movq 136(%rbx), %rdi
149 movl 4(%rdi), %eax
150 subl $1, %eax
151 testl %eax, %eax
152 movl %eax, 4(%rdi)
153 jne .L15
154 movq $0, 8(%rdi)
155 #APP
156 # 885 "libioP.h" 1
157 movl %fs:24,%edx
158 # 0 "" 2
159 #NO_APP
160 testl %edx, %edx
161 jne .L16
162 subl $1, (%rdi)
163 .L15:
164 movq %r8, %rdi
165 .LEHB3:
166 call _Unwind_Resume@PLT
167 .LEHE3:
168 .L16:
169 #APP
170 # 885 "libioP.h" 1
171 xchgl %eax, (%rdi)
172 # 0 "" 2
173 #NO_APP
174 subl $1, %eax
175 jle .L15
176 xorl %r10d, %r10d
177 movl $1, %edx
178 movl $129, %esi
179 movl $202, %eax
180 #APP
181 # 885 "libioP.h" 1
182 syscall
184 # 0 "" 2
185 #NO_APP
186 jmp .L15
187 .LFE68:
188 .globl __gcc_personality_v0
189 .section .gcc_except_table,"a",@progbits
190 .LLSDA68:
191 .byte 0xff
192 .byte 0xff
193 .byte 0x1
194 .uleb128 .LLSDACSE68-.LLSDACSB68
195 .LLSDACSB68:
196 .uleb128 .LEHB0-.LFB68
197 .uleb128 .LEHE0-.LEHB0
198 .uleb128 .L17-.LFB68
199 .uleb128 0
200 .uleb128 .LEHB1-.LFB68
201 .uleb128 .LEHE1-.LEHB1
202 .uleb128 0
203 .uleb128 0
204 .uleb128 .LEHB2-.LFB68
205 .uleb128 .LEHE2-.LEHB2
206 .uleb128 .L17-.LFB68
207 .uleb128 0
208 .uleb128 .LEHB3-.LFB68
209 .uleb128 .LEHE3-.LEHB3
210 .uleb128 0
211 .uleb128 0
212 .LLSDACSE68:
213 .text
214 .size fputc, .-fputc
215 .hidden DW.ref.__gcc_personality_v0
216 .weak DW.ref.__gcc_personality_v0
217 .section .data.DW.ref.__gcc_personality_v0,"awG",@progbits,DW.ref.__gcc_personality_v0,comdat
218 .align 8
219 .type DW.ref.__gcc_personality_v0, @object
220 .size DW.ref.__gcc_personality_v0, 8
221 DW.ref.__gcc_personality_v0:
222 .quad __gcc_personality_v0
223 .hidden __lll_lock_wait_private