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