1/*-
2 * Copyright (c) 2010 by Peter Jeremy <peterjeremy@acm.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 *    notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 *    notice, this list of conditions and the following disclaimer in the
12 *    documentation and/or other materials provided with the distribution.
13 *
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
18 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
19 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
23 * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24 */
25
26/*
27===============================================================================
28
29This GNU assembler source file is part of TestFloat, Release 2a, a package
30of programs for testing the correctness of floating-point arithmetic
31complying to the IEC/IEEE Standard for Floating-Point.
32
33Written by John R. Hauser.  More information is available through the Web
34page `http://HTTP.CS.Berkeley.EDU/~jhauser/arithmetic/TestFloat.html'.
35
36THIS SOFTWARE IS DISTRIBUTED AS IS, FOR FREE.  Although reasonable effort
37has been made to avoid it, THIS SOFTWARE MAY CONTAIN FAULTS THAT WILL AT
38TIMES RESULT IN INCORRECT BEHAVIOR.  USE OF THIS SOFTWARE IS RESTRICTED TO
39PERSONS AND ORGANIZATIONS WHO CAN AND WILL TAKE FULL RESPONSIBILITY FOR ANY
40AND ALL LOSSES, COSTS, OR OTHER PROBLEMS ARISING FROM ITS USE.
41
42Derivative works are acceptable, even for commercial purposes, so long as
43(1) they include prominent notice that the work is derivative, and (2) they
44include prominent notice akin to these four paragraphs for those parts of
45this code that are retained.
46
47===============================================================================
48*/
49
50#include <machine/asm.h>
51__FBSDID("$FreeBSD: releng/10.3/tools/test/testfloat/sparc64/systfloat.S 207151 2010-04-24 12:11:41Z marius $");
52
53	.text
54
55/*
56	.macro i2f32	src=%i0,dst=%f0
57	st	\src,[%sp+2231]
58	ld	[%sp+2231],\dst
59	.endm
60
61	.macro i2f64	src=%i0,dst=%f0
62	stx	\src,[%sp+2231]
63	ldd	[%sp+2231],\dst
64	.endm
65
66	.macro f2i32	src=%f0,dst=%i0
67	st	\src,[%sp+2231]
68	ld	[%sp+2231],\dst
69	.endm
70
71	.macro f2i64	src=%f0,dst=%i0
72	std	\src,[%sp+2231]
73	ldx	[%sp+2231],\dst
74	.endm
75*/
76/*
77-------------------------------------------------------------------------------
78-------------------------------------------------------------------------------
79*/
80	.align	4
81	.global	syst_int32_to_float32
82syst_int32_to_float32:
83	save	%sp,-192,%sp
84
85	st	%i0,[%sp+2231]
86	ld	[%sp+2231],%f0
87	fitos	%f0,%f0
88	st	%f0,[%sp+2231]
89	ld	[%sp+2231],%i0
90
91	ret
92	restore
93
94/*
95-------------------------------------------------------------------------------
96-------------------------------------------------------------------------------
97*/
98	.align	4
99	.global	syst_int32_to_float64
100syst_int32_to_float64:
101	save	%sp,-192,%sp
102
103	st	%i0,[%sp+2231]
104	ld	[%sp+2231],%f0
105	fitod	%f0,%f0
106	std	%f0,[%sp+2231]
107	ldx	[%sp+2231],%i0
108
109	ret
110	restore
111
112/*
113-------------------------------------------------------------------------------
114-------------------------------------------------------------------------------
115*/
116	.align	4
117	.global	syst_int32_to_float128
118syst_int32_to_float128:
119	save	%sp,-192,%sp
120
121	st	%i0,[%sp+2231]
122	ld	[%sp+2231],%f0
123	fitoq	%f0,%f0
124	std	%f0,[%sp+2231]
125	ldx	[%sp+2231],%i0
126	std	%f2,[%sp+2231]
127	ldx	[%sp+2231],%i1
128
129	ret
130	restore
131
132/*
133-------------------------------------------------------------------------------
134-------------------------------------------------------------------------------
135*/
136	.align	4
137	.global	syst_int64_to_float32
138syst_int64_to_float32:
139	save	%sp,-192,%sp
140
141	stx	%i0,[%sp+2231]
142	ldd	[%sp+2231],%f0
143	fxtos	%f0,%f0
144	st	%f0,[%sp+2231]
145	ld	[%sp+2231],%i0
146
147	ret
148	restore
149
150/*
151-------------------------------------------------------------------------------
152-------------------------------------------------------------------------------
153*/
154	.align	4
155	.global	syst_int64_to_float64
156syst_int64_to_float64:
157	save	%sp,-192,%sp
158
159	stx	%i0,[%sp+2231]
160	ldd	[%sp+2231],%f0
161	fxtod	%f0,%f0
162	std	%f0,[%sp+2231]
163	ldx	[%sp+2231],%i0
164
165	ret
166	restore
167
168/*
169-------------------------------------------------------------------------------
170-------------------------------------------------------------------------------
171*/
172	.align	4
173	.global	syst_int64_to_float128
174syst_int64_to_float128:
175	save	%sp,-192,%sp
176
177	stx	%i0,[%sp+2231]
178	ldd	[%sp+2231],%f0
179	fxtoq	%f0,%f0
180	std	%f0,[%sp+2231]
181	ldx	[%sp+2231],%i0
182	std	%f2,[%sp+2231]
183	ldx	[%sp+2231],%i1
184
185	ret
186	restore
187
188/*
189-------------------------------------------------------------------------------
190-------------------------------------------------------------------------------
191*/
192	.align	4
193	.global	syst_float32_to_int32_round_to_zero
194syst_float32_to_int32_round_to_zero:
195	save	%sp,-192,%sp
196
197	st	%i0,[%sp+2231]
198	ld	[%sp+2231],%f0
199	fstoi	%f0,%f0
200	st	%f0,[%sp+2231]
201	ld	[%sp+2231],%i0
202
203	ret
204	restore
205
206/*
207-------------------------------------------------------------------------------
208-------------------------------------------------------------------------------
209*/
210	.align	4
211	.global	syst_float32_to_int64_round_to_zero
212syst_float32_to_int64_round_to_zero:
213	save	%sp,-192,%sp
214
215	st	%i0,[%sp+2231]
216	ld	[%sp+2231],%f0
217	fstox	%f0,%f0
218	std	%f0,[%sp+2231]
219	ldx	[%sp+2231],%i0
220
221	ret
222	restore
223
224/*
225-------------------------------------------------------------------------------
226-------------------------------------------------------------------------------
227*/
228	.align	4
229	.global	syst_float32_to_float64
230syst_float32_to_float64:
231	save	%sp,-192,%sp
232
233	st	%i0,[%sp+2231]
234	ld	[%sp+2231],%f0
235	fstod	%f0,%f0
236	std	%f0,[%sp+2231]
237	ldx	[%sp+2231],%i0
238
239	ret
240	restore
241
242/*
243-------------------------------------------------------------------------------
244-------------------------------------------------------------------------------
245*/
246	.align	4
247	.global	syst_float32_to_float128
248syst_float32_to_float128:
249	save	%sp,-192,%sp
250
251	st	%i0,[%sp+2231]
252	ld	[%sp+2231],%f0
253	fstoq	%f0,%f0
254	std	%f0,[%sp+2231]
255	ldx	[%sp+2231],%i0
256	std	%f2,[%sp+2231]
257	ldx	[%sp+2231],%i1
258
259	ret
260	restore
261
262/*
263-------------------------------------------------------------------------------
264-------------------------------------------------------------------------------
265*/
266	.align	4
267	.global	syst_float32_add
268syst_float32_add:
269	save	%sp,-192,%sp
270
271	st	%i0,[%sp+2231]
272	ld	[%sp+2231],%f0
273	st	%i1,[%sp+2231]
274	ld	[%sp+2231],%f1
275	fadds	%f0,%f1,%f0
276	st	%f0,[%sp+2231]
277	ld	[%sp+2231],%i0
278
279	ret
280	restore
281
282/*
283-------------------------------------------------------------------------------
284-------------------------------------------------------------------------------
285*/
286	.align	4
287	.global	syst_float32_sub
288syst_float32_sub:
289	save	%sp,-192,%sp
290
291	st	%i0,[%sp+2231]
292	ld	[%sp+2231],%f0
293	st	%i1,[%sp+2231]
294	ld	[%sp+2231],%f1
295	fsubs	%f0,%f1,%f0
296	st	%f0,[%sp+2231]
297	ld	[%sp+2231],%i0
298
299	ret
300	restore
301
302/*
303-------------------------------------------------------------------------------
304-------------------------------------------------------------------------------
305*/
306	.align	4
307	.global	syst_float32_mul
308syst_float32_mul:
309	save	%sp,-192,%sp
310
311	st	%i0,[%sp+2231]
312	ld	[%sp+2231],%f0
313	st	%i1,[%sp+2231]
314	ld	[%sp+2231],%f1
315	fmuls	%f0,%f1,%f0
316	st	%f0,[%sp+2231]
317	ld	[%sp+2231],%i0
318
319	ret
320	restore
321
322/*
323-------------------------------------------------------------------------------
324-------------------------------------------------------------------------------
325*/
326	.align	4
327	.global	syst_float32_div
328syst_float32_div:
329	save	%sp,-192,%sp
330
331	st	%i0,[%sp+2231]
332	ld	[%sp+2231],%f0
333	st	%i1,[%sp+2231]
334	ld	[%sp+2231],%f1
335	fdivs	%f0,%f1,%f0
336	st	%f0,[%sp+2231]
337	ld	[%sp+2231],%i0
338
339	ret
340	restore
341
342/*
343-------------------------------------------------------------------------------
344-------------------------------------------------------------------------------
345*/
346	.align	4
347	.global	syst_float32_sqrt
348syst_float32_sqrt:
349	save	%sp,-192,%sp
350
351	st	%i0,[%sp+2231]
352	ld	[%sp+2231],%f0
353	fsqrts	%f0,%f0
354	st	%f0,[%sp+2231]
355	ld	[%sp+2231],%i0
356
357	ret
358	restore
359
360/*
361-------------------------------------------------------------------------------
362-------------------------------------------------------------------------------
363*/
364	.align	4
365	.global	syst_float32_eq
366syst_float32_eq:
367	save	%sp,-192,%sp
368
369	st	%i0,[%sp+2231]
370	ld	[%sp+2231],%f0
371	st	%i1,[%sp+2231]
372	ld	[%sp+2231],%f1
373	fcmps	%fcc0,%f0,%f1
374	mov	0,%i0
375	move	%fcc0,1,%i0
376
377	ret
378	restore
379
380/*
381-------------------------------------------------------------------------------
382-------------------------------------------------------------------------------
383*/
384	.align	4
385	.global	syst_float32_le
386syst_float32_le:
387	save	%sp,-192,%sp
388
389	st	%i0,[%sp+2231]
390	ld	[%sp+2231],%f0
391	st	%i1,[%sp+2231]
392	ld	[%sp+2231],%f1
393	fcmpes	%fcc0,%f0,%f1
394	mov	0,%i0
395	movle	%fcc0,1,%i0
396
397	ret
398	restore
399
400/*
401-------------------------------------------------------------------------------
402-------------------------------------------------------------------------------
403*/
404	.align	4
405	.global	syst_float32_lt
406syst_float32_lt:
407	save	%sp,-192,%sp
408
409	st	%i0,[%sp+2231]
410	ld	[%sp+2231],%f0
411	st	%i1,[%sp+2231]
412	ld	[%sp+2231],%f1
413	fcmpes	%fcc0,%f0,%f1
414	mov	0,%i0
415	movl	%fcc0,1,%i0
416
417	ret
418	restore
419
420/*
421-------------------------------------------------------------------------------
422-------------------------------------------------------------------------------
423*/
424	.align	4
425	.global	syst_float32_eq_signaling
426syst_float32_eq_signaling:
427	save	%sp,-192,%sp
428
429	st	%i0,[%sp+2231]
430	ld	[%sp+2231],%f0
431	st	%i1,[%sp+2231]
432	ld	[%sp+2231],%f1
433	fcmpes	%fcc0,%f0,%f1
434	mov	0,%i0
435	move	%fcc0,1,%i0
436
437	ret
438	restore
439
440/*
441-------------------------------------------------------------------------------
442-------------------------------------------------------------------------------
443*/
444	.align	4
445	.global	syst_float32_le_quiet
446syst_float32_le_quiet:
447	save	%sp,-192,%sp
448
449	st	%i0,[%sp+2231]
450	ld	[%sp+2231],%f0
451	st	%i1,[%sp+2231]
452	ld	[%sp+2231],%f1
453	fcmps	%fcc0,%f0,%f1
454	mov	0,%i0
455	movle	%fcc0,1,%i0
456
457	ret
458	restore
459
460/*
461-------------------------------------------------------------------------------
462-------------------------------------------------------------------------------
463*/
464	.align	4
465	.global	syst_float32_lt_quiet
466syst_float32_lt_quiet:
467	save	%sp,-192,%sp
468
469	st	%i0,[%sp+2231]
470	ld	[%sp+2231],%f0
471	st	%i1,[%sp+2231]
472	ld	[%sp+2231],%f1
473	fcmps	%fcc0,%f0,%f1
474	mov	0,%i0
475	movl	%fcc0,1,%i0
476
477	ret
478	restore
479
480/*
481-------------------------------------------------------------------------------
482-------------------------------------------------------------------------------
483*/
484	.align	4
485	.global	syst_float64_to_int32_round_to_zero
486syst_float64_to_int32_round_to_zero:
487	save	%sp,-192,%sp
488
489	stx	%i0,[%sp+2231]
490	ldd	[%sp+2231],%f0
491	fdtoi	%f0,%f0
492	st	%f0,[%sp+2231]
493	ld	[%sp+2231],%i0
494
495	ret
496	restore
497
498/*
499-------------------------------------------------------------------------------
500-------------------------------------------------------------------------------
501*/
502	.align	4
503	.global	syst_float64_to_int64_round_to_zero
504syst_float64_to_int64_round_to_zero:
505	save	%sp,-192,%sp
506
507	stx	%i0,[%sp+2231]
508	ldd	[%sp+2231],%f0
509	fdtox	%f0,%f0
510	std	%f0,[%sp+2231]
511	ldx	[%sp+2231],%i0
512
513	ret
514	restore
515
516/*
517-------------------------------------------------------------------------------
518-------------------------------------------------------------------------------
519*/
520	.align	4
521	.global	syst_float64_to_float32
522syst_float64_to_float32:
523	save	%sp,-192,%sp
524
525	stx	%i0,[%sp+2231]
526	ldd	[%sp+2231],%f0
527	fdtos	%f0,%f0
528	st	%f0,[%sp+2231]
529	ld	[%sp+2231],%i0
530
531	ret
532	restore
533
534/*
535-------------------------------------------------------------------------------
536-------------------------------------------------------------------------------
537*/
538	.align	4
539	.global	syst_float64_to_float128
540syst_float64_to_float128:
541	save	%sp,-192,%sp
542
543	stx	%i0,[%sp+2231]
544	ldd	[%sp+2231],%f0
545	fdtoq	%f0,%f0
546	std	%f0,[%sp+2231]
547	ldx	[%sp+2231],%i0
548	std	%f2,[%sp+2231]
549	ldx	[%sp+2231],%i1
550
551	ret
552	restore
553
554/*
555-------------------------------------------------------------------------------
556-------------------------------------------------------------------------------
557*/
558	.align	4
559	.global	syst_float64_add
560syst_float64_add:
561	save	%sp,-192,%sp
562
563	stx	%i0,[%sp+2231]
564	ldd	[%sp+2231],%f0
565	stx	%i1,[%sp+2231]
566	ldd	[%sp+2231],%f2
567	faddd	%f0,%f2,%f0
568	std	%f0,[%sp+2231]
569	ldx	[%sp+2231],%i0
570
571	ret
572	restore
573
574/*
575-------------------------------------------------------------------------------
576-------------------------------------------------------------------------------
577*/
578	.align	4
579	.global	syst_float64_sub
580syst_float64_sub:
581	save	%sp,-192,%sp
582
583	stx	%i0,[%sp+2231]
584	ldd	[%sp+2231],%f0
585	stx	%i1,[%sp+2231]
586	ldd	[%sp+2231],%f2
587	fsubd	%f0,%f2,%f0
588	std	%f0,[%sp+2231]
589	ldx	[%sp+2231],%i0
590
591	ret
592	restore
593
594/*
595-------------------------------------------------------------------------------
596-------------------------------------------------------------------------------
597*/
598	.align	4
599	.global	syst_float64_mul
600syst_float64_mul:
601	save	%sp,-192,%sp
602
603	stx	%i0,[%sp+2231]
604	ldd	[%sp+2231],%f0
605	stx	%i1,[%sp+2231]
606	ldd	[%sp+2231],%f2
607	fmuld	%f0,%f2,%f0
608	std	%f0,[%sp+2231]
609	ldx	[%sp+2231],%i0
610
611	ret
612	restore
613
614/*
615-------------------------------------------------------------------------------
616-------------------------------------------------------------------------------
617*/
618	.align	4
619	.global	syst_float64_div
620syst_float64_div:
621	save	%sp,-192,%sp
622
623	stx	%i0,[%sp+2231]
624	ldd	[%sp+2231],%f0
625	stx	%i1,[%sp+2231]
626	ldd	[%sp+2231],%f2
627	fdivd	%f0,%f2,%f0
628	std	%f0,[%sp+2231]
629	ldx	[%sp+2231],%i0
630
631	ret
632	restore
633
634/*
635-------------------------------------------------------------------------------
636-------------------------------------------------------------------------------
637*/
638	.align	4
639	.global	syst_float64_sqrt
640syst_float64_sqrt:
641	save	%sp,-192,%sp
642
643	stx	%i0,[%sp+2231]
644	ldd	[%sp+2231],%f0
645	fsqrtd	%f0,%f0
646	std	%f0,[%sp+2231]
647	ldx	[%sp+2231],%i0
648
649	ret
650	restore
651
652/*
653-------------------------------------------------------------------------------
654-------------------------------------------------------------------------------
655*/
656	.align	4
657	.global	syst_float64_eq
658syst_float64_eq:
659	save	%sp,-192,%sp
660
661	stx	%i0,[%sp+2231]
662	ldd	[%sp+2231],%f0
663	stx	%i1,[%sp+2231]
664	ldd	[%sp+2231],%f2
665	fcmpd	%fcc0,%f0,%f2
666	mov	0,%i0
667	move	%fcc0,1,%i0
668
669	ret
670	restore
671
672/*
673-------------------------------------------------------------------------------
674-------------------------------------------------------------------------------
675*/
676	.align	4
677	.global	syst_float64_le
678syst_float64_le:
679	save	%sp,-192,%sp
680
681	stx	%i0,[%sp+2231]
682	ldd	[%sp+2231],%f0
683	stx	%i1,[%sp+2231]
684	ldd	[%sp+2231],%f2
685	fcmped	%fcc0,%f0,%f2
686	mov	0,%i0
687	movle	%fcc0,1,%i0
688
689	ret
690	restore
691
692/*
693-------------------------------------------------------------------------------
694-------------------------------------------------------------------------------
695*/
696	.align	4
697	.global	syst_float64_lt
698syst_float64_lt:
699	save	%sp,-192,%sp
700
701	stx	%i0,[%sp+2231]
702	ldd	[%sp+2231],%f0
703	stx	%i1,[%sp+2231]
704	ldd	[%sp+2231],%f2
705	fcmped	%fcc0,%f0,%f2
706	mov	0,%i0
707	movl	%fcc0,1,%i0
708
709	ret
710	restore
711
712/*
713-------------------------------------------------------------------------------
714-------------------------------------------------------------------------------
715*/
716	.align	4
717	.global	syst_float64_eq_signaling
718syst_float64_eq_signaling:
719	save	%sp,-192,%sp
720
721	stx	%i0,[%sp+2231]
722	ldd	[%sp+2231],%f0
723	stx	%i1,[%sp+2231]
724	ldd	[%sp+2231],%f2
725	fcmped	%fcc0,%f0,%f2
726	mov	0,%i0
727	move	%fcc0,1,%i0
728
729	ret
730	restore
731
732/*
733-------------------------------------------------------------------------------
734-------------------------------------------------------------------------------
735*/
736	.align	4
737	.global	syst_float64_le_quiet
738syst_float64_le_quiet:
739	save	%sp,-192,%sp
740
741	stx	%i0,[%sp+2231]
742	ldd	[%sp+2231],%f0
743	stx	%i1,[%sp+2231]
744	ldd	[%sp+2231],%f2
745	fcmpd	%fcc0,%f0,%f2
746	mov	0,%i0
747	movle	%fcc0,1,%i0
748
749	ret
750	restore
751
752/*
753-------------------------------------------------------------------------------
754-------------------------------------------------------------------------------
755*/
756	.align	4
757	.global	syst_float64_lt_quiet
758syst_float64_lt_quiet:
759	save	%sp,-192,%sp
760
761	stx	%i0,[%sp+2231]
762	ldd	[%sp+2231],%f0
763	stx	%i1,[%sp+2231]
764	ldd	[%sp+2231],%f2
765	fcmpd	%fcc0,%f0,%f2
766	mov	0,%i0
767	movl	%fcc0,1,%i0
768
769	ret
770	restore
771
772/*
773-------------------------------------------------------------------------------
774-------------------------------------------------------------------------------
775*/
776	.align	4
777	.global	syst_float128_to_int32_round_to_zero
778syst_float128_to_int32_round_to_zero:
779	save	%sp,-192,%sp
780
781	stx	%i0,[%sp+2231]
782	ldd	[%sp+2231],%f0
783	stx	%i1,[%sp+2231]
784	ldd	[%sp+2231],%f2
785	fqtoi	%f0,%f0
786	st	%f0,[%sp+2231]
787	ld	[%sp+2231],%i0
788
789	ret
790	restore
791
792/*
793-------------------------------------------------------------------------------
794-------------------------------------------------------------------------------
795*/
796	.align	4
797	.global	syst_float128_to_int64_round_to_zero
798syst_float128_to_int64_round_to_zero:
799	save	%sp,-192,%sp
800
801	stx	%i0,[%sp+2231]
802	ldd	[%sp+2231],%f0
803	stx	%i1,[%sp+2231]
804	ldd	[%sp+2231],%f2
805	fqtox	%f0,%f0
806	std	%f0,[%sp+2231]
807	ldx	[%sp+2231],%i0
808
809	ret
810	restore
811
812/*
813-------------------------------------------------------------------------------
814-------------------------------------------------------------------------------
815*/
816	.align	4
817	.global	syst_float128_to_float32
818syst_float128_to_float32:
819	save	%sp,-192,%sp
820
821	stx	%i0,[%sp+2231]
822	ldd	[%sp+2231],%f0
823	stx	%i1,[%sp+2231]
824	ldd	[%sp+2231],%f2
825	fqtos	%f0,%f0
826	st	%f0,[%sp+2231]
827	ld	[%sp+2231],%i0
828
829	ret
830	restore
831
832/*
833-------------------------------------------------------------------------------
834-------------------------------------------------------------------------------
835*/
836	.align	4
837	.global	syst_float128_to_float64
838syst_float128_to_float64:
839	save	%sp,-192,%sp
840
841	stx	%i0,[%sp+2231]
842	ldd	[%sp+2231],%f0
843	stx	%i1,[%sp+2231]
844	ldd	[%sp+2231],%f2
845	fqtod	%f0,%f0
846	std	%f0,[%sp+2231]
847	ldx	[%sp+2231],%i0
848
849	ret
850	restore
851
852/*
853-------------------------------------------------------------------------------
854-------------------------------------------------------------------------------
855*/
856	.align	4
857	.global	syst_float128_add
858syst_float128_add:
859	save	%sp,-192,%sp
860
861	stx	%i0,[%sp+2231]
862	ldd	[%sp+2231],%f0
863	stx	%i1,[%sp+2231]
864	ldd	[%sp+2231],%f2
865	stx	%i2,[%sp+2231]
866	ldd	[%sp+2231],%f4
867	stx	%i3,[%sp+2231]
868	ldd	[%sp+2231],%f6
869	faddq	%f0,%f4,%f0
870	std	%f0,[%sp+2231]
871	ldx	[%sp+2231],%i0
872	std	%f2,[%sp+2231]
873	ldx	[%sp+2231],%i1
874
875	ret
876	restore
877
878/*
879-------------------------------------------------------------------------------
880-------------------------------------------------------------------------------
881*/
882	.align	4
883	.global	syst_float128_sub
884syst_float128_sub:
885	save	%sp,-192,%sp
886
887	stx	%i0,[%sp+2231]
888	ldd	[%sp+2231],%f0
889	stx	%i1,[%sp+2231]
890	ldd	[%sp+2231],%f2
891	stx	%i2,[%sp+2231]
892	ldd	[%sp+2231],%f4
893	stx	%i3,[%sp+2231]
894	ldd	[%sp+2231],%f6
895	fsubq	%f0,%f4,%f0
896	std	%f0,[%sp+2231]
897	ldx	[%sp+2231],%i0
898	std	%f2,[%sp+2231]
899	ldx	[%sp+2231],%i1
900
901	ret
902	restore
903
904/*
905-------------------------------------------------------------------------------
906-------------------------------------------------------------------------------
907*/
908	.align	4
909	.global	syst_float128_mul
910syst_float128_mul:
911	save	%sp,-192,%sp
912
913	stx	%i0,[%sp+2231]
914	ldd	[%sp+2231],%f0
915	stx	%i1,[%sp+2231]
916	ldd	[%sp+2231],%f2
917	stx	%i2,[%sp+2231]
918	ldd	[%sp+2231],%f4
919	stx	%i3,[%sp+2231]
920	ldd	[%sp+2231],%f6
921	fmulq	%f0,%f4,%f0
922	std	%f0,[%sp+2231]
923	ldx	[%sp+2231],%i0
924	std	%f2,[%sp+2231]
925	ldx	[%sp+2231],%i1
926
927	ret
928	restore
929
930/*
931-------------------------------------------------------------------------------
932-------------------------------------------------------------------------------
933*/
934	.align	4
935	.global	syst_float128_div
936syst_float128_div:
937	save	%sp,-192,%sp
938
939	stx	%i0,[%sp+2231]
940	ldd	[%sp+2231],%f0
941	stx	%i1,[%sp+2231]
942	ldd	[%sp+2231],%f2
943	stx	%i2,[%sp+2231]
944	ldd	[%sp+2231],%f4
945	stx	%i3,[%sp+2231]
946	ldd	[%sp+2231],%f6
947	fdivq	%f0,%f4,%f0
948	std	%f0,[%sp+2231]
949	ldx	[%sp+2231],%i0
950	std	%f2,[%sp+2231]
951	ldx	[%sp+2231],%i1
952
953	ret
954	restore
955
956/*
957-------------------------------------------------------------------------------
958-------------------------------------------------------------------------------
959*/
960	.align	4
961	.global	syst_float128_sqrt
962syst_float128_sqrt:
963	save	%sp,-192,%sp
964
965	stx	%i0,[%sp+2231]
966	ldd	[%sp+2231],%f0
967	stx	%i1,[%sp+2231]
968	ldd	[%sp+2231],%f2
969	fsqrtq	%f0,%f0
970	std	%f0,[%sp+2231]
971	ldx	[%sp+2231],%i0
972	std	%f2,[%sp+2231]
973	ldx	[%sp+2231],%i1
974
975	ret
976	restore
977
978/*
979-------------------------------------------------------------------------------
980-------------------------------------------------------------------------------
981*/
982	.align	4
983	.global	syst_float128_eq
984syst_float128_eq:
985	save	%sp,-192,%sp
986
987	stx	%i0,[%sp+2231]
988	ldd	[%sp+2231],%f0
989	stx	%i1,[%sp+2231]
990	ldd	[%sp+2231],%f2
991	stx	%i2,[%sp+2231]
992	ldd	[%sp+2231],%f4
993	stx	%i3,[%sp+2231]
994	ldd	[%sp+2231],%f6
995	fcmpq	%fcc0,%f0,%f4
996	mov	0,%i0
997	move	%fcc0,1,%i0
998
999	ret
1000	restore
1001
1002/*
1003-------------------------------------------------------------------------------
1004-------------------------------------------------------------------------------
1005*/
1006	.align	4
1007	.global	syst_float128_le
1008syst_float128_le:
1009	save	%sp,-192,%sp
1010
1011	stx	%i0,[%sp+2231]
1012	ldd	[%sp+2231],%f0
1013	stx	%i1,[%sp+2231]
1014	ldd	[%sp+2231],%f2
1015	stx	%i2,[%sp+2231]
1016	ldd	[%sp+2231],%f4
1017	stx	%i3,[%sp+2231]
1018	ldd	[%sp+2231],%f6
1019	fcmpeq	%fcc0,%f0,%f4
1020	mov	0,%i0
1021	movle	%fcc0,1,%i0
1022
1023	ret
1024	restore
1025
1026/*
1027-------------------------------------------------------------------------------
1028-------------------------------------------------------------------------------
1029*/
1030	.align	4
1031	.global	syst_float128_lt
1032syst_float128_lt:
1033	save	%sp,-192,%sp
1034
1035	stx	%i0,[%sp+2231]
1036	ldd	[%sp+2231],%f0
1037	stx	%i1,[%sp+2231]
1038	ldd	[%sp+2231],%f2
1039	stx	%i2,[%sp+2231]
1040	ldd	[%sp+2231],%f4
1041	stx	%i3,[%sp+2231]
1042	ldd	[%sp+2231],%f6
1043	fcmpeq	%fcc0,%f0,%f4
1044	mov	0,%i0
1045	movl	%fcc0,1,%i0
1046
1047	ret
1048	restore
1049
1050/*
1051-------------------------------------------------------------------------------
1052-------------------------------------------------------------------------------
1053*/
1054	.align	4
1055	.global	syst_float128_eq_signaling
1056syst_float128_eq_signaling:
1057	save	%sp,-192,%sp
1058
1059	stx	%i0,[%sp+2231]
1060	ldd	[%sp+2231],%f0
1061	stx	%i1,[%sp+2231]
1062	ldd	[%sp+2231],%f2
1063	stx	%i2,[%sp+2231]
1064	ldd	[%sp+2231],%f4
1065	stx	%i3,[%sp+2231]
1066	ldd	[%sp+2231],%f6
1067	fcmpeq	%fcc0,%f0,%f4
1068	mov	0,%i0
1069	move	%fcc0,1,%i0
1070
1071	ret
1072	restore
1073
1074/*
1075-------------------------------------------------------------------------------
1076-------------------------------------------------------------------------------
1077*/
1078	.align	4
1079	.global	syst_float128_le_quiet
1080syst_float128_le_quiet:
1081	save	%sp,-192,%sp
1082
1083	stx	%i0,[%sp+2231]
1084	ldd	[%sp+2231],%f0
1085	stx	%i1,[%sp+2231]
1086	ldd	[%sp+2231],%f2
1087	stx	%i2,[%sp+2231]
1088	ldd	[%sp+2231],%f4
1089	stx	%i3,[%sp+2231]
1090	ldd	[%sp+2231],%f6
1091	fcmpq	%fcc0,%f0,%f4
1092	mov	0,%i0
1093	movle	%fcc0,1,%i0
1094
1095	ret
1096	restore
1097
1098/*
1099-------------------------------------------------------------------------------
1100-------------------------------------------------------------------------------
1101*/
1102	.align	4
1103	.global	syst_float128_lt_quiet
1104syst_float128_lt_quiet:
1105	save	%sp,-192,%sp
1106
1107	stx	%i0,[%sp+2231]
1108	ldd	[%sp+2231],%f0
1109	stx	%i1,[%sp+2231]
1110	ldd	[%sp+2231],%f2
1111	stx	%i2,[%sp+2231]
1112	ldd	[%sp+2231],%f4
1113	stx	%i3,[%sp+2231]
1114	ldd	[%sp+2231],%f6
1115	fcmpq	%fcc0,%f0,%f4
1116	mov	0,%i0
1117	movl	%fcc0,1,%i0
1118
1119	ret
1120	restore
1121