clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_rwlock_trywrlock.shared.s
blobf9138e9123e2b25aed82bfd7881cc7a4e715b51b
1 .text
2 .p2align 4,,15
3 .globl __pthread_rwlock_trywrlock
4 .type __pthread_rwlock_trywrlock, @function
5 __pthread_rwlock_trywrlock:
6 movl (%rdi), %eax
7 movl 48(%rdi), %ecx
8 .L2:
9 testb $2, %al
10 jne .L7
11 movl %eax, %edx
12 shrl $3, %edx
13 testl %edx, %edx
14 jne .L14
15 .L5:
16 movl %eax, %edx
17 orl $3, %edx
18 lock cmpxchgl %edx, (%rdi)
19 jne .L2
20 testb $1, %al
21 movl $1, 12(%rdi)
22 jne .L3
23 movl $1, 8(%rdi)
24 .L3:
25 #APP
26 # 58 "pthread_rwlock_trywrlock.c" 1
27 movl %fs:720,%eax
28 # 0 "" 2
29 #NO_APP
30 movl %eax, 24(%rdi)
31 xorl %eax, %eax
32 ret
33 .p2align 4,,10
34 .p2align 3
35 .L14:
36 testl %ecx, %ecx
37 je .L7
38 testb $1, %al
39 jne .L5
40 .L7:
41 movl $16, %eax
42 ret
43 .size __pthread_rwlock_trywrlock, .-__pthread_rwlock_trywrlock
44 .globl pthread_rwlock_trywrlock
45 .set pthread_rwlock_trywrlock,__pthread_rwlock_trywrlock