clarify the purpose of this project
[nyanglibc.git] / stdlib / ldbl2mpn.shared.s
blobfa38a02bfaf9a793b60ed3116b8b5df752905491
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_long_double
9 .hidden __mpn_extract_long_double
10 .type __mpn_extract_long_double, @function
11 __mpn_extract_long_double:
12 movq %rdi, %r8
13 movl 16(%rsp), %edi
14 movq 8(%rsp), %rsi
15 movl %edi, -16(%rsp)
16 movzbl -15(%rsp), %eax
17 movq %rsi, -24(%rsp)
18 shrb $7, %al
19 movzbl %al, %eax
20 movl %eax, (%rcx)
21 movzwl -16(%rsp), %eax
22 movq %rdi, %rcx
23 andl $32767, %eax
24 subl $16383, %eax
25 andw $32767, %cx
26 movl %eax, (%rdx)
27 movq %rsi, %rax
28 movq %rsi, (%r8)
29 jne .L2
30 testq %rsi, %rsi
31 je .L6
32 movabsq $9223372036854775807, %rcx
33 andq %rcx, %rax
34 testq %rax, %rax
35 movq %rax, (%r8)
36 je .L5
37 bsrq %rax, %rcx
38 xorq $63, %rcx
39 salq %cl, %rax
40 movq %rax, (%r8)
41 movl $-16382, %eax
42 subl %ecx, %eax
43 movl %eax, (%rdx)
44 .L4:
45 movl $1, %eax
46 ret
47 .p2align 4,,10
48 .p2align 3
49 .L2:
50 testq %rsi, %rsi
51 jne .L4
52 cmpw $32767, %cx
53 je .L4
54 .L6:
55 movl $0, (%rdx)
56 movl $1, %eax
57 ret
58 .p2align 4,,10
59 .p2align 3
60 .L5:
61 movabsq $-9223372036854775808, %rax
62 movq %rax, (%r8)
63 movl $-16382, (%rdx)
64 movl $1, %eax
65 ret
66 .size __mpn_extract_long_double, .-__mpn_extract_long_double