clarify the purpose of this project
[nyanglibc.git] / nptl / libc_pthread_init.shared.s
blobbc1e411a2eb4fbe891c3fe17724e20a532683c0f
1 .text
2 #APP
3 memmove = __GI_memmove
4 memset = __GI_memset
5 memcpy = __GI_memcpy
6 #NO_APP
7 .p2align 4,,15
8 .globl __libc_pthread_init
9 .type __libc_pthread_init, @function
10 __libc_pthread_init:
11 pushq %rbx
12 movq %rdi, __fork_generation_pointer(%rip)
13 xorl %ecx, %ecx
14 movq %rdx, %rbx
15 xorl %edi, %edi
16 movq %rsi, %rdx
17 xorl %esi, %esi
18 call __GI___register_atfork
19 leaq __libc_pthread_functions(%rip), %rcx
20 xorl %edx, %edx
21 .p2align 4,,10
22 .p2align 3
23 .L2:
24 movq (%rbx,%rdx,8), %rax
25 #APP
26 # 70 "libc_pthread_init.c" 1
27 xor %fs:48, %rax
28 rol $2*8+1, %rax
29 # 0 "" 2
30 #NO_APP
31 movq %rax, (%rcx,%rdx,8)
32 addq $1, %rdx
33 cmpq $30, %rdx
34 jne .L2
35 leaq __libc_multiple_threads(%rip), %rax
36 movl $1, __libc_pthread_functions_init(%rip)
37 popq %rbx
38 ret
39 .size __libc_pthread_init, .-__libc_pthread_init
40 .hidden __fork_generation_pointer
41 .comm __fork_generation_pointer,8,8
42 .hidden __libc_pthread_functions_init
43 .hidden __libc_multiple_threads
44 .hidden __libc_pthread_functions