Some broken software wants to deal with ld.so.cache.
[nyanglibc.git] / rt / timer_routines.s
blob6dbc73364f101f31c7472a8b4ba35d9ed1b636e2
1 .text
2 .p2align 4,,15
3 .type reset_helper_control, @function
4 reset_helper_control:
5 movl $0, __helper_once(%rip)
6 movl $0, __helper_tid(%rip)
7 ret
8 .size reset_helper_control, .-reset_helper_control
9 .p2align 4,,15
10 .type timer_helper_thread, @function
11 timer_helper_thread:
12 pushq %r15
13 pushq %r14
14 pushq %r13
15 pushq %r12
16 leaq timer_sigev_thread(%rip), %r13
17 pushq %rbp
18 pushq %rbx
19 leaq __active_timer_sigev_thread_lock(%rip), %r12
20 leaq sigtimer_set(%rip), %rbx
21 subq $152, %rsp
22 leaq 16(%rsp), %rbp
23 leaq 8(%rsp), %r14
24 .p2align 4,,10
25 .p2align 3
26 .L4:
27 movq %rbp, %rsi
28 movq %rbx, %rdi
29 call sigwaitinfo@PLT
30 testl %eax, %eax
31 js .L4
32 movl 24(%rsp), %eax
33 cmpl $-2, %eax
34 je .L17
35 cmpl $-6, %eax
36 jne .L4
37 xorl %edi, %edi
38 call pthread_exit@PLT
39 .p2align 4,,10
40 .p2align 3
41 .L17:
42 movq %r12, %rdi
43 movq 40(%rsp), %r15
44 call pthread_mutex_lock@PLT
45 movq __active_timer_sigev_thread(%rip), %rax
46 testq %rax, %rax
47 jne .L10
48 jmp .L7
49 .p2align 4,,10
50 .p2align 3
51 .L18:
52 movq 80(%rax), %rax
53 testq %rax, %rax
54 je .L7
55 .L10:
56 cmpq %rax, %r15
57 jne .L18
58 movl $16, %edi
59 call malloc@PLT
60 testq %rax, %rax
61 je .L7
62 movq 8(%r15), %rdx
63 leaq 24(%r15), %rsi
64 movq %rax, %rcx
65 movq %r14, %rdi
66 movq %rdx, (%rax)
67 movq 16(%r15), %rdx
68 movq %rdx, 8(%rax)
69 movq %r13, %rdx
70 call pthread_create@PLT
71 .L7:
72 movq %r12, %rdi
73 call pthread_mutex_unlock@PLT
74 jmp .L4
75 .size timer_helper_thread, .-timer_helper_thread
76 .p2align 4,,15
77 .type timer_sigev_thread, @function
78 timer_sigev_thread:
79 pushq %rbp
80 pushq %rbx
81 movq %rdi, %r8
82 movl $8, %r10d
83 xorl %edx, %edx
84 leaq sigtimer_set(%rip), %rsi
85 subq $8, %rsp
86 movl $1, %edi
87 movl $14, %eax
88 #APP
89 # 97 "../sysdeps/unix/sysv/linux/internal-signals.h" 1
90 syscall
92 # 0 "" 2
93 #NO_APP
94 movq 8(%r8), %rbp
95 movq %r8, %rdi
96 movq (%r8), %rbx
97 call free@PLT
98 movq %rbp, %rdi
99 call *%rbx
100 addq $8, %rsp
101 xorl %eax, %eax
102 popq %rbx
103 popq %rbp
105 .size timer_sigev_thread, .-timer_sigev_thread
106 .p2align 4,,15
107 .globl __start_helper_thread
108 .type __start_helper_thread, @function
109 __start_helper_thread:
110 pushq %rbx
111 subq $208, %rsp
112 leaq 16(%rsp), %rbx
113 movq %rbx, %rdi
114 call pthread_attr_init@PLT
115 movq %rbx, %rdi
116 call __pthread_get_minstack@PLT
117 movq %rbx, %rdi
118 movq %rax, %rsi
119 call pthread_attr_setstacksize@PLT
120 leaq 80(%rsp), %rsi
121 movabsq $-4294967297, %rax
122 movq %rbx, %rdi
123 movq %rax, 80(%rsp)
124 call __pthread_attr_setsigmask_internal@PLT
125 testl %eax, %eax
126 jne .L26
127 leaq 8(%rsp), %rdi
128 leaq timer_helper_thread(%rip), %rdx
129 xorl %ecx, %ecx
130 movq %rbx, %rsi
131 call pthread_create@PLT
132 testl %eax, %eax
133 je .L27
134 .L24:
135 movq %rbx, %rdi
136 call pthread_attr_destroy@PLT
137 leaq reset_helper_control(%rip), %rdx
138 xorl %esi, %esi
139 xorl %edi, %edi
140 call pthread_atfork@PLT
141 addq $208, %rsp
142 popq %rbx
144 .p2align 4,,10
145 .p2align 3
146 .L27:
147 movq 8(%rsp), %rax
148 movl 720(%rax), %eax
149 movl %eax, __helper_tid(%rip)
150 jmp .L24
151 .p2align 4,,10
152 .p2align 3
153 .L26:
154 movq %rbx, %rdi
155 call pthread_attr_destroy@PLT
156 addq $208, %rsp
157 popq %rbx
159 .size __start_helper_thread, .-__start_helper_thread
160 .comm __helper_tid,4,4
161 .comm __helper_once,4,4
162 .globl __active_timer_sigev_thread_lock
163 .bss
164 .align 32
165 .type __active_timer_sigev_thread_lock, @object
166 .size __active_timer_sigev_thread_lock, 40
167 __active_timer_sigev_thread_lock:
168 .zero 40
169 .comm __active_timer_sigev_thread,8,8
170 .section .rodata
171 .align 32
172 .type sigtimer_set, @object
173 .size sigtimer_set, 128
174 sigtimer_set:
175 .quad 2147483648
176 .quad 0
177 .quad 0
178 .quad 0
179 .quad 0
180 .quad 0
181 .quad 0
182 .quad 0
183 .quad 0
184 .quad 0
185 .quad 0
186 .quad 0
187 .quad 0
188 .quad 0
189 .quad 0
190 .quad 0