Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / nptl / pthread_rwlock_clockrdlock.shared.s
blobfd6d2badbab7ef0501dc35ccb542dc21c0bb024e
1 .text
2 .section .rodata.str1.8,"aMS",@progbits,1
3 .align 8
4 .LC0:
5 .string "The futex facility returned an unexpected error code.\n"
6 .text
7 .p2align 4,,15
8 .globl __pthread_rwlock_clockrdlock
9 .type __pthread_rwlock_clockrdlock, @function
10 __pthread_rwlock_clockrdlock:
11 testq %rdx, %rdx
12 je .L2
13 cmpl $1, %esi
14 ja .L31
15 cmpq $999999999, 8(%rdx)
16 ja .L31
17 .L2:
18 movl 24(%rdi), %ecx
19 #APP
20 # 298 "pthread_rwlock_common.c" 1
21 movl %fs:720,%eax
22 # 0 "" 2
23 #NO_APP
24 cmpl %eax, %ecx
25 je .L32
26 pushq %r14
27 pushq %r13
28 pushq %r12
29 pushq %rbp
30 movl %esi, %r12d
31 pushq %rbx
32 cmpl $2, 48(%rdi)
33 movq %rdx, %rbp
34 movq %rdi, %rbx
35 je .L4
36 .L11:
37 movl $8, %eax
38 lock xaddl %eax, (%rbx)
39 addl $8, %eax
40 .L5:
41 testl %eax, %eax
42 js .L13
43 testb $1, %al
44 jne .L14
45 .L35:
46 xorl %edx, %edx
47 .L1:
48 popq %rbx
49 movl %edx, %eax
50 popq %rbp
51 popq %r12
52 popq %r13
53 popq %r14
54 ret
55 .p2align 4,,10
56 .p2align 3
57 .L4:
58 movl (%rdi), %esi
59 movl $128, %r13d
60 .L8:
61 movl %esi, %eax
62 andl $3, %eax
63 cmpl $2, %eax
64 jne .L11
65 movl %esi, %eax
66 shrl $3, %eax
67 testl %eax, %eax
68 je .L11
69 movl %esi, %edx
70 movl %esi, %eax
71 orl $4, %edx
72 lock cmpxchgl %edx, (%rbx)
73 movl %eax, %esi
74 je .L7
75 jmp .L8
76 .p2align 4,,10
77 .p2align 3
78 .L62:
79 cmpl $75, %eax
80 je .L1
81 .L7:
82 movl (%rbx), %esi
83 testb $4, %sil
84 je .L8
85 movl 28(%rbx), %r8d
86 movl %r12d, %edx
87 movq %rbp, %rcx
88 movq %rbx, %rdi
89 testl %r8d, %r8d
90 cmovne %r13d, %r8d
91 call __GI___futex_abstimed_wait64
92 cmpl $110, %eax
93 movl %eax, %edx
94 jne .L62
95 popq %rbx
96 movl %edx, %eax
97 popq %rbp
98 popq %r12
99 popq %r13
100 popq %r14
102 .p2align 4,,10
103 .p2align 3
104 .L13:
105 leal -8(%rax), %edx
106 lock cmpxchgl %edx, (%rbx)
107 jne .L5
108 movl $11, %edx
109 jmp .L1
110 .p2align 4,,10
111 .p2align 3
112 .L31:
113 movl $22, %edx
114 .L57:
115 movl %edx, %eax
117 .p2align 4,,10
118 .p2align 3
119 .L32:
120 movl $35, %edx
121 jmp .L57
122 .p2align 4,,10
123 .p2align 3
124 .L14:
125 movl %eax, %edx
126 andl $3, %edx
127 cmpl $1, %edx
128 jne .L63
129 movl %eax, %edx
130 xorl $1, %edx
131 lock cmpxchgl %edx, (%rbx)
132 jne .L14
133 leaq 8(%rbx), %rdi
134 xorl %eax, %eax
135 xchgl (%rdi), %eax
136 testb $2, %al
137 je .L35
138 cmpl $1, 28(%rbx)
139 movl $2147483647, %edx
140 movl $202, %eax
141 sbbl %esi, %esi
142 xorl %r10d, %r10d
143 andl $128, %esi
144 addl $1, %esi
145 #APP
146 # 209 "../sysdeps/nptl/futex-internal.h" 1
147 syscall
149 # 0 "" 2
150 #NO_APP
151 cmpq $-4096, %rax
152 jbe .L35
153 cmpl $-22, %eax
154 je .L35
155 cmpl $-14, %eax
156 je .L35
157 leaq .LC0(%rip), %rdi
158 call __libc_fatal@PLT
159 .p2align 4,,10
160 .p2align 3
161 .L63:
162 leaq 8(%rbx), %r13
163 xorl %r14d, %r14d
164 .L19:
165 movl 0(%r13), %eax
166 movl %eax, %edx
167 orl $2, %edx
168 cmpl $3, %edx
169 je .L28
170 testb %r14b, %r14b
171 jne .L35
172 movl (%rbx), %eax
173 testb $1, %al
174 jne .L19
175 movl 0(%r13), %eax
176 movl %eax, %edx
177 orl $2, %edx
178 cmpl $3, %edx
179 jne .L35
180 movl $1, %r14d
181 .L28:
182 movl 28(%rbx), %r8d
183 movl $128, %edx
184 testl %r8d, %r8d
185 cmovne %edx, %r8d
186 testb $2, %al
187 jne .L24
188 movl $3, %edx
189 lock cmpxchgl %edx, 0(%r13)
190 jne .L19
191 .L24:
192 movl %r12d, %edx
193 movq %rbp, %rcx
194 movl $3, %esi
195 movq %r13, %rdi
196 call __GI___futex_abstimed_wait64
197 cmpl $110, %eax
198 movl %eax, %edx
199 je .L22
200 cmpl $75, %eax
201 jne .L19
202 .L22:
203 movl (%rbx), %eax
204 .L25:
205 testb $1, %al
206 je .L27
207 leal -8(%rax), %ecx
208 lock cmpxchgl %ecx, (%rbx)
209 je .L1
210 jmp .L25
211 .p2align 4,,10
212 .p2align 3
213 .L27:
214 movl 0(%r13), %eax
215 orl $2, %eax
216 cmpl $3, %eax
217 je .L27
218 jmp .L35
219 .size __pthread_rwlock_clockrdlock, .-__pthread_rwlock_clockrdlock
220 .weak pthread_rwlock_clockrdlock
221 .set pthread_rwlock_clockrdlock,__pthread_rwlock_clockrdlock