clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_setspecific.shared.s
blobbff807697ed5fe3f208e5d31f38f1d2a6c20b665
1 .text
2 .p2align 4,,15
3 .globl __GI___pthread_setspecific
4 .hidden __GI___pthread_setspecific
5 .type __GI___pthread_setspecific, @function
6 __GI___pthread_setspecific:
7 pushq %r13
8 pushq %r12
9 pushq %rbp
10 pushq %rbx
11 movq %rsi, %rbp
12 subq $8, %rsp
13 cmpl $31, %edi
14 ja .L2
15 movl %edi, %edi
16 leaq __GI___pthread_keys(%rip), %rdx
17 movq %rdi, %rax
18 salq $4, %rax
19 movq (%rdx,%rax), %rdx
20 movl $22, %eax
21 movl %edx, %r12d
22 andl $1, %edx
23 je .L1
24 addq $49, %rdi
25 salq $4, %rdi
26 addq %fs:16, %rdi
27 testq %rsi, %rsi
28 je .L4
29 .L18:
30 #APP
31 # 82 "pthread_setspecific.c" 1
32 movb $1,%fs:1552
33 # 0 "" 2
34 #NO_APP
35 .L4:
36 movl %r12d, %eax
37 movq %rbp, 8(%rdi)
38 movq %rax, (%rdi)
39 xorl %eax, %eax
40 .L1:
41 addq $8, %rsp
42 popq %rbx
43 popq %rbp
44 popq %r12
45 popq %r13
46 ret
47 .p2align 4,,10
48 .p2align 3
49 .L2:
50 cmpl $1023, %edi
51 movl $22, %eax
52 ja .L1
53 movl %edi, %edx
54 leaq __GI___pthread_keys(%rip), %rcx
55 salq $4, %rdx
56 movq (%rcx,%rdx), %rdx
57 movl %edx, %r12d
58 andl $1, %edx
59 je .L1
60 movl %edi, %r13d
61 movl %edi, %ebx
62 shrl $5, %r13d
63 andl $31, %ebx
64 #APP
65 # 61 "pthread_setspecific.c" 1
66 movq %fs:1296(,%r13,8),%rax
67 # 0 "" 2
68 #NO_APP
69 testq %rax, %rax
70 je .L20
71 .L5:
72 movl %ebx, %edi
73 salq $4, %rdi
74 addq %rax, %rdi
75 jmp .L18
76 .p2align 4,,10
77 .p2align 3
78 .L20:
79 testq %rsi, %rsi
80 je .L1
81 movl $16, %esi
82 movl $32, %edi
83 call calloc@PLT
84 testq %rax, %rax
85 je .L10
86 #APP
87 # 75 "pthread_setspecific.c" 1
88 movq %rax,%fs:1296(,%r13,8)
89 # 0 "" 2
90 #NO_APP
91 jmp .L5
92 .L10:
93 movl $12, %eax
94 jmp .L1
95 .size __GI___pthread_setspecific, .-__GI___pthread_setspecific
96 .weak pthread_setspecific
97 .set pthread_setspecific,__GI___pthread_setspecific
98 .globl __pthread_setspecific
99 .set __pthread_setspecific,__GI___pthread_setspecific