clarify the purpose of this project
[nyanglibc.git] / stdlib / strfromd.s
blob0a424f20730574a2ed067dcd7bc006d1dc58c600
1 .text
2 .p2align 4,,15
3 .globl strfromd
4 .type strfromd, @function
5 strfromd:
6 pushq %r15
7 pushq %r14
8 pushq %r13
9 pushq %r12
10 pushq %rbp
11 pushq %rbx
12 subq $360, %rsp
13 cmpb $37, (%rdx)
14 movq %rsp, %rax
15 movq $0, 184(%rsp)
16 movsd %xmm0, (%rsp)
17 movq %rax, 8(%rsp)
18 jne .L14
19 movzbl 1(%rdx), %ebx
20 movq %rdi, %r15
21 cmpb $46, %bl
22 je .L3
23 movsbl %bl, %r14d
24 movl $-1, %r13d
25 .L4:
26 leal -65(%rbx), %eax
27 cmpb $38, %al
28 ja .L14
29 movabsq $485331304561, %rdx
30 btq %rax, %rdx
31 jnc .L14
32 testq %rsi, %rsi
33 je .L24
34 leaq -1(%rsi), %r12
35 leaq 48(%rsp), %rbp
36 .L15:
37 xorl %r8d, %r8d
38 xorl %ecx, %ecx
39 movl $-1, %edx
40 movl $32768, %esi
41 movq %rbp, %rdi
42 andl $-33, %ebx
43 call _IO_no_init@PLT
44 leaq _IO_strn_jumps(%rip), %rax
45 movq %r15, %rcx
46 movq %r12, %rdx
47 movq %r15, %rsi
48 movq %rbp, %rdi
49 movq %rax, 264(%rsp)
50 call _IO_str_init_static_internal@PLT
51 pxor %xmm0, %xmm0
52 cmpb $65, %bl
53 leaq 16(%rsp), %rax
54 movl %r13d, 16(%rsp)
55 movups %xmm0, 20(%rsp)
56 movl %r14d, 24(%rsp)
57 je .L16
58 leaq 8(%rsp), %rcx
59 movq %rbp, %rdi
60 movq __libc_tsd_LOCALE@gottpoff(%rip), %rdx
61 movq %fs:(%rdx), %rsi
62 movq %rax, %rdx
63 call __printf_fp_l
64 .L17:
65 addq $240, %rbp
66 cmpq %rbp, 104(%rsp)
67 je .L1
68 movq 88(%rsp), %rdx
69 movb $0, (%rdx)
70 .L1:
71 addq $360, %rsp
72 popq %rbx
73 popq %rbp
74 popq %r12
75 popq %r13
76 popq %r14
77 popq %r15
78 ret
79 .p2align 4,,10
80 .p2align 3
81 .L24:
82 leaq 48(%rsp), %rbp
83 movl $63, %r12d
84 leaq 240(%rbp), %r15
85 jmp .L15
86 .p2align 4,,10
87 .p2align 3
88 .L16:
89 leaq 8(%rsp), %rdx
90 movq %rax, %rsi
91 movq %rbp, %rdi
92 call __printf_fphex
93 jmp .L17
94 .p2align 4,,10
95 .p2align 3
96 .L3:
97 movsbl 2(%rdx), %r14d
98 leaq 2(%rdx), %rax
99 xorl %r13d, %r13d
100 leal -48(%r14), %edx
101 movl %r14d, %ebx
102 cmpl $9, %edx
103 ja .L4
104 movl %edx, %r13d
105 movl $2147483647, %edi
106 movl $-1, %r8d
107 .L5:
108 movsbl 1(%rax), %r14d
109 leaq 1(%rax), %r9
110 leal -48(%r14), %edx
111 movl %r14d, %ebx
112 cmpl $9, %edx
113 ja .L4
114 testl %r13d, %r13d
115 js .L6
116 cmpl $214748364, %r13d
117 jg .L33
118 leal 0(%r13,%r13,4), %r13d
119 movl %edi, %ecx
120 subl %edx, %ecx
121 addl %r13d, %r13d
122 cmpl %ecx, %r13d
123 jg .L33
124 addl %edx, %r13d
125 .L6:
126 movq %r9, %rax
127 jmp .L5
128 .p2align 4,,10
129 .p2align 3
130 .L33:
131 movsbl 2(%rax), %r14d
132 leal -48(%r14), %edx
133 movl %r14d, %ebx
134 cmpl $9, %edx
135 ja .L22
136 movsbl 3(%rax), %r14d
137 leal -48(%r14), %edx
138 movl %r14d, %ebx
139 cmpl $9, %edx
140 ja .L22
141 movsbl 4(%rax), %r14d
142 leal -48(%r14), %edx
143 movl %r14d, %ebx
144 cmpl $9, %edx
145 ja .L22
146 movsbl 5(%rax), %r14d
147 leaq 5(%rax), %r9
148 leal -48(%r14), %eax
149 movl %r14d, %ebx
150 cmpl $9, %eax
151 ja .L22
152 movl %r8d, %r13d
153 jmp .L6
154 .p2align 4,,10
155 .p2align 3
156 .L22:
157 movl $-1, %r13d
158 jmp .L4
159 .L14:
160 call abort
161 .size strfromd, .-strfromd
162 .weak strfromf32x
163 .set strfromf32x,strfromd
164 .weak strfromf64
165 .set strfromf64,strfromd
166 .hidden abort
167 .hidden __printf_fphex
168 .hidden __printf_fp_l
169 .hidden _IO_strn_jumps