clarify the purpose of this project
[nyanglibc.git] / nptl / pthread_key_create.shared.s
blobb3e883b3f33163ebc2c0e6b4bd1bcb37a2c6a911
1 .text
2 .p2align 4,,15
3 .globl __GI___pthread_key_create
4 .hidden __GI___pthread_key_create
5 .type __GI___pthread_key_create, @function
6 __GI___pthread_key_create:
7 leaq __GI___pthread_keys(%rip), %r8
8 xorl %ecx, %ecx
9 movq %r8, %rdx
10 jmp .L4
11 .p2align 4,,10
12 .p2align 3
13 .L2:
14 addq $1, %rcx
15 addq $16, %rdx
16 cmpq $1024, %rcx
17 je .L16
18 .L4:
19 movq (%rdx), %rax
20 testb $1, %al
21 jne .L2
22 cmpq $-2, %rax
23 je .L2
24 leaq 1(%rax), %r9
25 lock cmpxchgq %r9, (%rdx)
26 jne .L2
27 movq %rcx, %rax
28 salq $4, %rax
29 movq %rsi, 8(%r8,%rax)
30 movl %ecx, (%rdi)
31 xorl %eax, %eax
32 ret
33 .p2align 4,,10
34 .p2align 3
35 .L16:
36 movl $11, %eax
37 ret
38 .size __GI___pthread_key_create, .-__GI___pthread_key_create
39 .weak pthread_key_create
40 .set pthread_key_create,__GI___pthread_key_create
41 .globl __pthread_key_create
42 .set __pthread_key_create,__GI___pthread_key_create