clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_getspecific.shared.s
blob05fc428f55d6df58043d1ff5d7d2fe3660b90b33
1 .text
2 .p2align 4,,15
3 .globl __GI___pthread_getspecific
4 .hidden __GI___pthread_getspecific
5 .type __GI___pthread_getspecific, @function
6 __GI___pthread_getspecific:
7 cmpl $31, %edi
8 ja .L2
9 movl %edi, %edx
10 addq $49, %rdx
11 salq $4, %rdx
12 addq %fs:16, %rdx
13 .L3:
14 movq 8(%rdx), %rax
15 testq %rax, %rax
16 je .L1
17 movl %edi, %edi
18 leaq __GI___pthread_keys(%rip), %rcx
19 movq (%rdx), %rsi
20 salq $4, %rdi
21 cmpq %rsi, (%rcx,%rdi)
22 jne .L11
23 .L1:
24 rep ret
25 .p2align 4,,10
26 .p2align 3
27 .L11:
28 movq $0, 8(%rdx)
29 xorl %eax, %eax
30 ret
31 .p2align 4,,10
32 .p2align 3
33 .L2:
34 cmpl $1023, %edi
35 ja .L6
36 movl %edi, %ecx
37 movl %edi, %edx
38 andl $31, %ecx
39 shrl $5, %edx
40 #APP
41 # 45 "pthread_getspecific.c" 1
42 movq %fs:1296(,%rdx,8),%rax
43 # 0 "" 2
44 #NO_APP
45 testq %rax, %rax
46 je .L6
47 salq $4, %rcx
48 leaq (%rax,%rcx), %rdx
49 jmp .L3
50 .p2align 4,,10
51 .p2align 3
52 .L6:
53 xorl %eax, %eax
54 ret
55 .size __GI___pthread_getspecific, .-__GI___pthread_getspecific
56 .weak pthread_getspecific
57 .set pthread_getspecific,__GI___pthread_getspecific
58 .globl __pthread_getspecific
59 .set __pthread_getspecific,__GI___pthread_getspecific