clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_rwlock_unlock.shared.s
blob5b31183ee242c576986571cdec849fcea7015a51
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 __GI___pthread_rwlock_unlock
9 .hidden __GI___pthread_rwlock_unlock
10 .type __GI___pthread_rwlock_unlock, @function
11 __GI___pthread_rwlock_unlock:
12 pushq %rbp
13 pushq %rbx
14 movq %rdi, %r8
15 subq $8, %rsp
16 movl 24(%rdi), %edx
17 #APP
18 # 40 "pthread_rwlock_unlock.c" 1
19 movl %fs:720,%eax
20 # 0 "" 2
21 #NO_APP
22 cmpl %eax, %edx
23 je .L58
24 movl 28(%rdi), %ebx
25 movl $128, %eax
26 testl %ebx, %ebx
27 cmovne %eax, %ebx
28 movl (%rdi), %eax
29 .L18:
30 leal -8(%rax), %r9d
31 movl %r9d, %edx
32 shrl $3, %edx
33 testl %edx, %edx
34 je .L59
35 .L16:
36 lock cmpxchgl %r9d, (%r8)
37 movl %eax, %ebp
38 jne .L18
39 testb $1, %r9b
40 jne .L60
41 .L20:
42 xorl %ebp, %r9d
43 andl $4, %r9d
44 je .L14
45 movl %ebx, %esi
46 xorl %r10d, %r10d
47 movl $2147483647, %edx
48 xorb $-127, %sil
49 movq %r8, %rdi
50 movl $202, %eax
51 #APP
52 # 209 "../sysdeps/nptl/futex-internal.h" 1
53 syscall
55 # 0 "" 2
56 #NO_APP
57 cmpq $-4096, %rax
58 ja .L55
59 .L14:
60 addq $8, %rsp
61 xorl %eax, %eax
62 popq %rbx
63 popq %rbp
64 ret
65 .p2align 4,,10
66 .p2align 3
67 .L59:
68 movl %r9d, %edx
69 orl $1, %edx
70 testb $2, %r9b
71 cmovne %edx, %r9d
72 andl $-5, %r9d
73 jmp .L16
74 .p2align 4,,10
75 .p2align 3
76 .L60:
77 leaq 8(%r8), %rdi
78 movl $1, %eax
79 xchgl (%rdi), %eax
80 testb $2, %al
81 je .L20
82 movl %ebx, %esi
83 xorl %r10d, %r10d
84 movl $2147483647, %edx
85 xorb $-127, %sil
86 movl $202, %eax
87 #APP
88 # 209 "../sysdeps/nptl/futex-internal.h" 1
89 syscall
91 # 0 "" 2
92 #NO_APP
93 cmpq $-4096, %rax
94 jbe .L20
95 cmpl $-22, %eax
96 je .L20
97 cmpl $-14, %eax
98 je .L20
99 jmp .L10
100 .p2align 4,,10
101 .p2align 3
102 .L58:
103 movl 28(%rdi), %ebp
104 movl $128, %eax
105 leaq 12(%rdi), %rbx
106 movl $0, 24(%rdi)
107 testl %ebp, %ebp
108 cmovne %eax, %ebp
109 xorl %r9d, %r9d
110 xchgl (%rbx), %r9d
111 movl 48(%rdi), %eax
112 andl $2, %r9d
113 testl %eax, %eax
114 jne .L4
115 .L6:
116 movl (%r8), %eax
117 .L5:
118 movl %eax, %edx
119 movl %eax, %ecx
120 shrl $3, %edx
121 testl %edx, %edx
122 setne %dl
123 xorl $2, %ecx
124 movzbl %dl, %edx
125 xorl %ecx, %edx
126 lock cmpxchgl %edx, (%r8)
127 jne .L5
128 shrl $3, %eax
129 testl %eax, %eax
130 jne .L61
131 .L11:
132 testl %r9d, %r9d
133 je .L14
134 movl %ebp, %esi
135 xorl %r10d, %r10d
136 movl $1, %edx
137 xorb $-127, %sil
138 movq %rbx, %rdi
139 movl $202, %eax
140 #APP
141 # 209 "../sysdeps/nptl/futex-internal.h" 1
142 syscall
144 # 0 "" 2
145 #NO_APP
146 cmpq $-4096, %rax
147 jbe .L14
148 .L55:
149 cmpl $-22, %eax
150 je .L14
151 cmpl $-14, %eax
152 jne .L10
153 addq $8, %rsp
154 xorl %eax, %eax
155 popq %rbx
156 popq %rbp
158 .p2align 4,,10
159 .p2align 3
160 .L4:
161 movl 4(%rdi), %eax
162 leaq 4(%rdi), %rdx
163 .L56:
164 testl %eax, %eax
165 je .L6
166 movl %eax, %ecx
167 orl $-2147483648, %ecx
168 lock cmpxchgl %ecx, (%rdx)
169 je .L11
170 jmp .L56
171 .p2align 4,,10
172 .p2align 3
173 .L61:
174 leaq 8(%r8), %rdi
175 xorl %eax, %eax
176 xchgl (%rdi), %eax
177 testb $2, %al
178 je .L11
179 movl %ebp, %esi
180 xorl %r10d, %r10d
181 movl $2147483647, %edx
182 xorb $-127, %sil
183 movl $202, %eax
184 #APP
185 # 209 "../sysdeps/nptl/futex-internal.h" 1
186 syscall
188 # 0 "" 2
189 #NO_APP
190 cmpq $-4096, %rax
191 jbe .L11
192 cmpl $-22, %eax
193 je .L11
194 cmpl $-14, %eax
195 je .L11
196 .L10:
197 leaq .LC0(%rip), %rdi
198 call __libc_fatal@PLT
199 .size __GI___pthread_rwlock_unlock, .-__GI___pthread_rwlock_unlock
200 .weak pthread_rwlock_unlock
201 .set pthread_rwlock_unlock,__GI___pthread_rwlock_unlock
202 .globl __pthread_rwlock_unlock
203 .set __pthread_rwlock_unlock,__GI___pthread_rwlock_unlock