clarify the purpose of this project
[nyanglibc.git] / math / s_scalbn.shared.s
blobb959db92feea06842ce537e9086347458a60da55
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 __scalbn
9 .type __scalbn, @function
10 __scalbn:
11 movq %xmm0, %rax
12 movq %xmm0, %rdx
13 sarq $52, %rax
14 andl $2047, %eax
15 je .L14
16 cmpq $2047, %rax
17 je .L15
18 .L4:
19 cmpl $-50000, %edi
20 jl .L12
21 cmpl $50000, %edi
22 jg .L6
23 movslq %edi, %rdi
24 addq %rax, %rdi
25 cmpq $2046, %rdi
26 jg .L6
27 testq %rdi, %rdi
28 jle .L8
29 movabsq $-9218868437227405313, %rax
30 salq $52, %rdi
31 andq %rax, %rdx
32 orq %rdi, %rdx
33 movq %rdx, -8(%rsp)
34 .L1:
35 movsd -8(%rsp), %xmm0
36 ret
37 .p2align 4,,10
38 .p2align 3
39 .L6:
40 andpd .LC2(%rip), %xmm0
41 orpd .LC4(%rip), %xmm0
42 mulsd .LC5(%rip), %xmm0
43 movsd %xmm0, -8(%rsp)
44 movsd -8(%rsp), %xmm0
45 ret
46 .p2align 4,,10
47 .p2align 3
48 .L8:
49 cmpq $-53, %rdi
50 jge .L9
51 .L12:
52 andpd .LC2(%rip), %xmm0
53 orpd .LC1(%rip), %xmm0
54 mulsd .LC3(%rip), %xmm0
55 movsd %xmm0, -8(%rsp)
56 movsd -8(%rsp), %xmm0
57 ret
58 .p2align 4,,10
59 .p2align 3
60 .L14:
61 movabsq $4503599627370495, %rax
62 movsd %xmm0, -8(%rsp)
63 testq %rax, %rdx
64 je .L1
65 mulsd .LC0(%rip), %xmm0
66 movq %xmm0, %rax
67 movq %xmm0, %rdx
68 sarq $52, %rax
69 andl $2047, %eax
70 subq $54, %rax
71 jmp .L4
72 .p2align 4,,10
73 .p2align 3
74 .L15:
75 addsd %xmm0, %xmm0
76 movsd %xmm0, -8(%rsp)
77 jmp .L1
78 .p2align 4,,10
79 .p2align 3
80 .L9:
81 addq $54, %rdi
82 movabsq $-9218868437227405313, %rax
83 salq $52, %rdi
84 andq %rax, %rdx
85 orq %rdx, %rdi
86 movq %rdi, -8(%rsp)
87 movsd -8(%rsp), %xmm1
88 mulsd .LC6(%rip), %xmm1
89 movsd %xmm1, -8(%rsp)
90 jmp .L1
91 .size __scalbn, .-__scalbn
92 .section .rodata.cst8,"aM",@progbits,8
93 .align 8
94 .LC0:
95 .long 0
96 .long 1129316352
97 .section .rodata.cst16,"aM",@progbits,16
98 .align 16
99 .LC1:
100 .long 3271095129
101 .long 27618847
102 .long 0
103 .long 0
104 .align 16
105 .LC2:
106 .long 0
107 .long -2147483648
108 .long 0
109 .long 0
110 .section .rodata.cst8
111 .align 8
112 .LC3:
113 .long 3271095129
114 .long 27618847
115 .section .rodata.cst16
116 .align 16
117 .LC4:
118 .long 2281731484
119 .long 2117592124
120 .long 0
121 .long 0
122 .section .rodata.cst8
123 .align 8
124 .LC5:
125 .long 2281731484
126 .long 2117592124
127 .align 8
128 .LC6:
129 .long 0
130 .long 1016070144