clarify the purpose of this project
[nyanglibc.git] / stdlib / float1282mpn.shared.s
blob9a1375639c679772beddd6540899d45eca782642
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 __mpn_extract_float128
9 .hidden __mpn_extract_float128
10 .type __mpn_extract_float128, @function
11 __mpn_extract_float128:
12 movaps %xmm0, -24(%rsp)
13 movq -16(%rsp), %r8
14 movq -24(%rsp), %rsi
15 movq %r8, %rax
16 movdqa -24(%rsp), %xmm1
17 shrq $63, %rax
18 movl %eax, (%rcx)
19 movq %r8, %rax
20 movl %r8d, %r8d
21 shrq $48, %rax
22 pextrw $7, %xmm1, %ecx
23 andl $32767, %eax
24 subl $16383, %eax
25 movl %eax, (%rdx)
26 pextrw $6, %xmm1, %eax
27 movq %rsi, (%rdi)
28 salq $32, %rax
29 orq %r8, %rax
30 testw $32767, %cx
31 movq %rax, 8(%rdi)
32 jne .L2
33 testq %rsi, %rsi
34 je .L10
35 testq %rax, %rax
36 jne .L4
37 bsrq %rsi, %rax
38 xorq $63, %rax
39 cmpl $14, %eax
40 movl %eax, %r8d
41 jg .L11
42 movl $15, %ecx
43 movq %rsi, %r10
44 subl %eax, %ecx
45 shrq %cl, %r10
46 leal 49(%rax), %ecx
47 movq %r10, 8(%rdi)
48 salq %cl, %rsi
49 movq %rsi, (%rdi)
50 .L8:
51 movl $-16431, %eax
52 subl %r8d, %eax
53 movl %eax, (%rdx)
54 movl $2, %eax
55 ret
56 .p2align 4,,10
57 .p2align 3
58 .L2:
59 movabsq $281474976710656, %rdx
60 orq %rdx, %rax
61 movq %rax, 8(%rdi)
62 movl $2, %eax
63 ret
64 .p2align 4,,10
65 .p2align 3
66 .L10:
67 testq %rax, %rax
68 je .L12
69 .L4:
70 bsrq %rax, %r8
71 movl $64, %ecx
72 movq %rsi, %r9
73 xorq $63, %r8
74 subl $15, %r8d
75 subl %r8d, %ecx
76 shrq %cl, %r9
77 movl %r8d, %ecx
78 salq %cl, %rax
79 salq %cl, %rsi
80 orq %r9, %rax
81 movq %rsi, (%rdi)
82 movq %rax, 8(%rdi)
83 movl $-16382, %eax
84 subl %r8d, %eax
85 movl %eax, (%rdx)
86 movl $2, %eax
87 ret
88 .p2align 4,,10
89 .p2align 3
90 .L12:
91 movl $0, (%rdx)
92 movl $2, %eax
93 ret
94 .p2align 4,,10
95 .p2align 3
96 .L11:
97 leal -15(%rax), %ecx
98 movq $0, (%rdi)
99 salq %cl, %rsi
100 movq %rsi, 8(%rdi)
101 jmp .L8
102 .size __mpn_extract_float128, .-__mpn_extract_float128