clarify the purpose of this project
[nyanglibc.git] / gmon / rtld-profil.shared.s
blobd22f448a9b5e839b4cb6fe838a70e2b59d018647
1 .text
2 .p2align 4,,15
3 .type __profil_counter, @function
4 __profil_counter:
5 movq 168(%rdx), %rdx
6 subq pc_offset(%rip), %rdx
7 movl pc_scale(%rip), %eax
8 movq %rdx, %rcx
9 shrq $17, %rdx
10 shrq %rcx
11 movzwl %cx, %ecx
12 imulq %rax, %rcx
13 imulq %rax, %rdx
14 shrq $16, %rcx
15 leaq (%rdx,%rcx), %rax
16 cmpq nsamples(%rip), %rax
17 jnb .L2
18 movq samples(%rip), %rdx
19 addw $1, (%rdx,%rax,2)
20 .L2:
21 ret
22 .size __profil_counter, .-__profil_counter
23 .p2align 4,,15
24 .globl __profil
25 .hidden __profil
26 .type __profil, @function
27 __profil:
28 pushq %rbx
29 shrq %rsi
30 leaq __profil_counter(%rip), %rax
31 movq $-1, %rbx
32 subq $192, %rsp
33 movq %rsi, nsamples(%rip)
34 movq %rdi, samples(%rip)
35 leaq 32(%rsp), %rsi
36 movq %rdx, pc_offset(%rip)
37 movl $27, %edi
38 xorl %edx, %edx
39 movl %ecx, pc_scale(%rip)
40 movq %rax, 32(%rsp)
41 movl $268435460, 168(%rsp)
42 movq %rbx, 40(%rsp)
43 call __sigaction
44 testl %eax, %eax
45 js .L6
46 movq $0, 16(%rsp)
47 call __profile_frequency
48 movl %eax, %ecx
49 movl $1000000, %eax
50 movq %rsp, %rsi
51 cltd
52 movl $2, %edi
53 idivl %ecx
54 xorl %edx, %edx
55 cltq
56 movq %rax, 24(%rsp)
57 movdqa 16(%rsp), %xmm0
58 movaps %xmm0, (%rsp)
59 call __setitimer
60 .L4:
61 addq $192, %rsp
62 popq %rbx
63 ret
64 .p2align 4,,10
65 .p2align 3
66 .L6:
67 movl %ebx, %eax
68 jmp .L4
69 .size __profil, .-__profil
70 .weak profil
71 .set profil,__profil
72 .local pc_scale
73 .comm pc_scale,4,4
74 .local pc_offset
75 .comm pc_offset,8,8
76 .local nsamples
77 .comm nsamples,8,8
78 .local samples
79 .comm samples,8,8
80 .hidden __setitimer
81 .hidden __profile_frequency
82 .hidden __sigaction