23 * MONADIC.GEN 1.4 1/16/92
25 * MONADIC.GEN 1.3 4/30/91
27 * MONADIC.GEN --- generic MONADIC template
29 * This version saves all registers that will be used by the emulation
30 * routines and restores all but FP0 on exit. The FPSR is
31 * updated to reflect the result of the operation. Return value
32 * is placed in FP0 for single, double and extended results.
34 * The package subroutines expect the incoming FPCR to be zeroed
35 * since they need extended precision to work properly. The
36 * 'final' FPCR is expected in d1 so that the calculated result
37 * can be properly sized and rounded. Also, if the incoming FPCR
38 * has enabled any exceptions, the exception will be taken on the
39 * final fmovem in this template.
42 * 1. Remove the movem.l at the entry and exit of
43 * each routine if your compiler treats those
44 * registers as scratch.
45 * 2. Likewise, don't save FP0/FP1 if they are scratch
47 * 3. Delete handling of the fpsr if you only care about
49 * 4. Some (most?) C compilers convert all float arguments
50 * to double, and provide no support at all for extended
51 * precision so remove the facoss and facosx entry points.
52 * 5. Move the result to d0/d1 if the compiler is that old.
54 * Copyright (C) Motorola, Inc. 1991
57 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
58 * The copyright notice above does not evidence any
59 * actual or intended publication of such source code.
71 movem.l d0-d1/a0-a1,USER_DA(a6)
72 fmovem.x fp0-fp3,USER_FP0(a6)
73 fmove.l fpsr,USER_FPSR(a6)
74 fmove.l fpcr,USER_FPCR(a6)
75 fmove.l fpcr,d1 ; user's rounding mode/precision
76 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
78 * copy, convert and tag input argument
87 bsr sacos ; normalized (regular) number
95 cmp.b #$40,d0 ; infinity?
105 bsr sacosd ; assuming a denorm...
108 fmove.l fpsr,d0 ; update status register
109 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
112 * Result is now in FP0
114 movem.l USER_DA(a6),d0-d1/a0-a1
115 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
122 movem.l d0-d1/a0-a1,USER_DA(a6)
123 fmovem.x fp0-fp3,USER_FP0(a6)
124 fmove.l fpsr,USER_FPSR(a6)
125 fmove.l fpcr,USER_FPCR(a6)
126 fmove.l fpcr,d1 ; user's rounding mode/precision
127 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
129 * copy, convert and tag input argument
132 fmove.x fp0,ETEMP(a6)
138 bsr sacos ; normalized (regular) number
141 cmp.b #$20,d0 ; zero?
146 cmp.b #$40,d0 ; infinity?
156 bsr sacosd ; assuming a denorm...
159 fmove.l fpsr,d0 ; update status register
160 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
163 * Result is now in FP0
165 movem.l USER_DA(a6),d0-d1/a0-a1
166 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
173 movem.l d0-d1/a0-a1,USER_DA(a6)
174 fmovem.x fp0-fp3,USER_FP0(a6)
175 fmove.l fpsr,USER_FPSR(a6)
176 fmove.l fpcr,USER_FPCR(a6)
177 fmove.l fpcr,d1 ; user's rounding mode/precision
178 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
180 * copy, convert and tag input argument
183 fmove.x fp0,ETEMP(a6)
189 bsr sacos ; normalized (regular) number
192 cmp.b #$20,d0 ; zero?
197 cmp.b #$40,d0 ; infinity?
207 bsr sacosd ; assuming a denorm...
210 fmove.l fpsr,d0 ; update status register
211 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
214 * Result is now in FP0
216 movem.l USER_DA(a6),d0-d1/a0-a1
217 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
222 * MONADIC.GEN 1.4 1/16/92
224 * MONADIC.GEN 1.3 4/30/91
226 * MONADIC.GEN --- generic MONADIC template
228 * This version saves all registers that will be used by the emulation
229 * routines and restores all but FP0 on exit. The FPSR is
230 * updated to reflect the result of the operation. Return value
231 * is placed in FP0 for single, double and extended results.
233 * The package subroutines expect the incoming FPCR to be zeroed
234 * since they need extended precision to work properly. The
235 * 'final' FPCR is expected in d1 so that the calculated result
236 * can be properly sized and rounded. Also, if the incoming FPCR
237 * has enabled any exceptions, the exception will be taken on the
238 * final fmovem in this template.
241 * 1. Remove the movem.l at the entry and exit of
242 * each routine if your compiler treats those
243 * registers as scratch.
244 * 2. Likewise, don't save FP0/FP1 if they are scratch
246 * 3. Delete handling of the fpsr if you only care about
248 * 4. Some (most?) C compilers convert all float arguments
249 * to double, and provide no support at all for extended
250 * precision so remove the fasins and fasinx entry points.
251 * 5. Move the result to d0/d1 if the compiler is that old.
253 * Copyright (C) Motorola, Inc. 1991
254 * All Rights Reserved
256 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
257 * The copyright notice above does not evidence any
258 * actual or intended publication of such source code.
270 movem.l d0-d1/a0-a1,USER_DA(a6)
271 fmovem.x fp0-fp3,USER_FP0(a6)
272 fmove.l fpsr,USER_FPSR(a6)
273 fmove.l fpcr,USER_FPCR(a6)
274 fmove.l fpcr,d1 ; user's rounding mode/precision
275 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
277 * copy, convert and tag input argument
280 fmove.x fp0,ETEMP(a6)
286 bsr sasin ; normalized (regular) number
289 cmp.b #$20,d0 ; zero?
294 cmp.b #$40,d0 ; infinity?
304 bsr sasind ; assuming a denorm...
307 fmove.l fpsr,d0 ; update status register
308 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
311 * Result is now in FP0
313 movem.l USER_DA(a6),d0-d1/a0-a1
314 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
321 movem.l d0-d1/a0-a1,USER_DA(a6)
322 fmovem.x fp0-fp3,USER_FP0(a6)
323 fmove.l fpsr,USER_FPSR(a6)
324 fmove.l fpcr,USER_FPCR(a6)
325 fmove.l fpcr,d1 ; user's rounding mode/precision
326 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
328 * copy, convert and tag input argument
331 fmove.x fp0,ETEMP(a6)
337 bsr sasin ; normalized (regular) number
340 cmp.b #$20,d0 ; zero?
345 cmp.b #$40,d0 ; infinity?
355 bsr sasind ; assuming a denorm...
358 fmove.l fpsr,d0 ; update status register
359 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
362 * Result is now in FP0
364 movem.l USER_DA(a6),d0-d1/a0-a1
365 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
372 movem.l d0-d1/a0-a1,USER_DA(a6)
373 fmovem.x fp0-fp3,USER_FP0(a6)
374 fmove.l fpsr,USER_FPSR(a6)
375 fmove.l fpcr,USER_FPCR(a6)
376 fmove.l fpcr,d1 ; user's rounding mode/precision
377 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
379 * copy, convert and tag input argument
382 fmove.x fp0,ETEMP(a6)
388 bsr sasin ; normalized (regular) number
391 cmp.b #$20,d0 ; zero?
396 cmp.b #$40,d0 ; infinity?
406 bsr sasind ; assuming a denorm...
409 fmove.l fpsr,d0 ; update status register
410 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
413 * Result is now in FP0
415 movem.l USER_DA(a6),d0-d1/a0-a1
416 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
421 * MONADIC.GEN 1.4 1/16/92
423 * MONADIC.GEN 1.3 4/30/91
425 * MONADIC.GEN --- generic MONADIC template
427 * This version saves all registers that will be used by the emulation
428 * routines and restores all but FP0 on exit. The FPSR is
429 * updated to reflect the result of the operation. Return value
430 * is placed in FP0 for single, double and extended results.
432 * The package subroutines expect the incoming FPCR to be zeroed
433 * since they need extended precision to work properly. The
434 * 'final' FPCR is expected in d1 so that the calculated result
435 * can be properly sized and rounded. Also, if the incoming FPCR
436 * has enabled any exceptions, the exception will be taken on the
437 * final fmovem in this template.
440 * 1. Remove the movem.l at the entry and exit of
441 * each routine if your compiler treats those
442 * registers as scratch.
443 * 2. Likewise, don't save FP0/FP1 if they are scratch
445 * 3. Delete handling of the fpsr if you only care about
447 * 4. Some (most?) C compilers convert all float arguments
448 * to double, and provide no support at all for extended
449 * precision so remove the fatans and fatanx entry points.
450 * 5. Move the result to d0/d1 if the compiler is that old.
452 * Copyright (C) Motorola, Inc. 1991
453 * All Rights Reserved
455 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
456 * The copyright notice above does not evidence any
457 * actual or intended publication of such source code.
469 movem.l d0-d1/a0-a1,USER_DA(a6)
470 fmovem.x fp0-fp3,USER_FP0(a6)
471 fmove.l fpsr,USER_FPSR(a6)
472 fmove.l fpcr,USER_FPCR(a6)
473 fmove.l fpcr,d1 ; user's rounding mode/precision
474 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
476 * copy, convert and tag input argument
479 fmove.x fp0,ETEMP(a6)
485 bsr satan ; normalized (regular) number
488 cmp.b #$20,d0 ; zero?
493 cmp.b #$40,d0 ; infinity?
503 bsr satand ; assuming a denorm...
506 fmove.l fpsr,d0 ; update status register
507 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
510 * Result is now in FP0
512 movem.l USER_DA(a6),d0-d1/a0-a1
513 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
520 movem.l d0-d1/a0-a1,USER_DA(a6)
521 fmovem.x fp0-fp3,USER_FP0(a6)
522 fmove.l fpsr,USER_FPSR(a6)
523 fmove.l fpcr,USER_FPCR(a6)
524 fmove.l fpcr,d1 ; user's rounding mode/precision
525 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
527 * copy, convert and tag input argument
530 fmove.x fp0,ETEMP(a6)
536 bsr satan ; normalized (regular) number
539 cmp.b #$20,d0 ; zero?
544 cmp.b #$40,d0 ; infinity?
554 bsr satand ; assuming a denorm...
557 fmove.l fpsr,d0 ; update status register
558 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
561 * Result is now in FP0
563 movem.l USER_DA(a6),d0-d1/a0-a1
564 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
571 movem.l d0-d1/a0-a1,USER_DA(a6)
572 fmovem.x fp0-fp3,USER_FP0(a6)
573 fmove.l fpsr,USER_FPSR(a6)
574 fmove.l fpcr,USER_FPCR(a6)
575 fmove.l fpcr,d1 ; user's rounding mode/precision
576 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
578 * copy, convert and tag input argument
581 fmove.x fp0,ETEMP(a6)
587 bsr satan ; normalized (regular) number
590 cmp.b #$20,d0 ; zero?
595 cmp.b #$40,d0 ; infinity?
605 bsr satand ; assuming a denorm...
608 fmove.l fpsr,d0 ; update status register
609 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
612 * Result is now in FP0
614 movem.l USER_DA(a6),d0-d1/a0-a1
615 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
620 * MONADIC.GEN 1.4 1/16/92
622 * MONADIC.GEN 1.3 4/30/91
624 * MONADIC.GEN --- generic MONADIC template
626 * This version saves all registers that will be used by the emulation
627 * routines and restores all but FP0 on exit. The FPSR is
628 * updated to reflect the result of the operation. Return value
629 * is placed in FP0 for single, double and extended results.
631 * The package subroutines expect the incoming FPCR to be zeroed
632 * since they need extended precision to work properly. The
633 * 'final' FPCR is expected in d1 so that the calculated result
634 * can be properly sized and rounded. Also, if the incoming FPCR
635 * has enabled any exceptions, the exception will be taken on the
636 * final fmovem in this template.
639 * 1. Remove the movem.l at the entry and exit of
640 * each routine if your compiler treats those
641 * registers as scratch.
642 * 2. Likewise, don't save FP0/FP1 if they are scratch
644 * 3. Delete handling of the fpsr if you only care about
646 * 4. Some (most?) C compilers convert all float arguments
647 * to double, and provide no support at all for extended
648 * precision so remove the fatanhs and fatanhx entry points.
649 * 5. Move the result to d0/d1 if the compiler is that old.
651 * Copyright (C) Motorola, Inc. 1991
652 * All Rights Reserved
654 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
655 * The copyright notice above does not evidence any
656 * actual or intended publication of such source code.
668 movem.l d0-d1/a0-a1,USER_DA(a6)
669 fmovem.x fp0-fp3,USER_FP0(a6)
670 fmove.l fpsr,USER_FPSR(a6)
671 fmove.l fpcr,USER_FPCR(a6)
672 fmove.l fpcr,d1 ; user's rounding mode/precision
673 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
675 * copy, convert and tag input argument
678 fmove.x fp0,ETEMP(a6)
684 bsr satanh ; normalized (regular) number
687 cmp.b #$20,d0 ; zero?
692 cmp.b #$40,d0 ; infinity?
702 bsr satanhd ; assuming a denorm...
705 fmove.l fpsr,d0 ; update status register
706 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
709 * Result is now in FP0
711 movem.l USER_DA(a6),d0-d1/a0-a1
712 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
719 movem.l d0-d1/a0-a1,USER_DA(a6)
720 fmovem.x fp0-fp3,USER_FP0(a6)
721 fmove.l fpsr,USER_FPSR(a6)
722 fmove.l fpcr,USER_FPCR(a6)
723 fmove.l fpcr,d1 ; user's rounding mode/precision
724 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
726 * copy, convert and tag input argument
729 fmove.x fp0,ETEMP(a6)
735 bsr satanh ; normalized (regular) number
738 cmp.b #$20,d0 ; zero?
743 cmp.b #$40,d0 ; infinity?
753 bsr satanhd ; assuming a denorm...
756 fmove.l fpsr,d0 ; update status register
757 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
760 * Result is now in FP0
762 movem.l USER_DA(a6),d0-d1/a0-a1
763 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
770 movem.l d0-d1/a0-a1,USER_DA(a6)
771 fmovem.x fp0-fp3,USER_FP0(a6)
772 fmove.l fpsr,USER_FPSR(a6)
773 fmove.l fpcr,USER_FPCR(a6)
774 fmove.l fpcr,d1 ; user's rounding mode/precision
775 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
777 * copy, convert and tag input argument
780 fmove.x fp0,ETEMP(a6)
786 bsr satanh ; normalized (regular) number
789 cmp.b #$20,d0 ; zero?
794 cmp.b #$40,d0 ; infinity?
804 bsr satanhd ; assuming a denorm...
807 fmove.l fpsr,d0 ; update status register
808 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
811 * Result is now in FP0
813 movem.l USER_DA(a6),d0-d1/a0-a1
814 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
819 * MONADIC.GEN 1.4 1/16/92
821 * MONADIC.GEN 1.3 4/30/91
823 * MONADIC.GEN --- generic MONADIC template
825 * This version saves all registers that will be used by the emulation
826 * routines and restores all but FP0 on exit. The FPSR is
827 * updated to reflect the result of the operation. Return value
828 * is placed in FP0 for single, double and extended results.
830 * The package subroutines expect the incoming FPCR to be zeroed
831 * since they need extended precision to work properly. The
832 * 'final' FPCR is expected in d1 so that the calculated result
833 * can be properly sized and rounded. Also, if the incoming FPCR
834 * has enabled any exceptions, the exception will be taken on the
835 * final fmovem in this template.
838 * 1. Remove the movem.l at the entry and exit of
839 * each routine if your compiler treats those
840 * registers as scratch.
841 * 2. Likewise, don't save FP0/FP1 if they are scratch
843 * 3. Delete handling of the fpsr if you only care about
845 * 4. Some (most?) C compilers convert all float arguments
846 * to double, and provide no support at all for extended
847 * precision so remove the fcoss and fcosx entry points.
848 * 5. Move the result to d0/d1 if the compiler is that old.
850 * Copyright (C) Motorola, Inc. 1991
851 * All Rights Reserved
853 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
854 * The copyright notice above does not evidence any
855 * actual or intended publication of such source code.
867 movem.l d0-d1/a0-a1,USER_DA(a6)
868 fmovem.x fp0-fp3,USER_FP0(a6)
869 fmove.l fpsr,USER_FPSR(a6)
870 fmove.l fpcr,USER_FPCR(a6)
871 fmove.l fpcr,d1 ; user's rounding mode/precision
872 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
874 * copy, convert and tag input argument
877 fmove.x fp0,ETEMP(a6)
883 bsr scos ; normalized (regular) number
886 cmp.b #$20,d0 ; zero?
891 cmp.b #$40,d0 ; infinity?
901 bsr scosd ; assuming a denorm...
904 fmove.l fpsr,d0 ; update status register
905 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
908 * Result is now in FP0
910 movem.l USER_DA(a6),d0-d1/a0-a1
911 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
918 movem.l d0-d1/a0-a1,USER_DA(a6)
919 fmovem.x fp0-fp3,USER_FP0(a6)
920 fmove.l fpsr,USER_FPSR(a6)
921 fmove.l fpcr,USER_FPCR(a6)
922 fmove.l fpcr,d1 ; user's rounding mode/precision
923 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
925 * copy, convert and tag input argument
928 fmove.x fp0,ETEMP(a6)
934 bsr scos ; normalized (regular) number
937 cmp.b #$20,d0 ; zero?
942 cmp.b #$40,d0 ; infinity?
952 bsr scosd ; assuming a denorm...
955 fmove.l fpsr,d0 ; update status register
956 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
959 * Result is now in FP0
961 movem.l USER_DA(a6),d0-d1/a0-a1
962 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
969 movem.l d0-d1/a0-a1,USER_DA(a6)
970 fmovem.x fp0-fp3,USER_FP0(a6)
971 fmove.l fpsr,USER_FPSR(a6)
972 fmove.l fpcr,USER_FPCR(a6)
973 fmove.l fpcr,d1 ; user's rounding mode/precision
974 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
976 * copy, convert and tag input argument
979 fmove.x fp0,ETEMP(a6)
985 bsr scos ; normalized (regular) number
988 cmp.b #$20,d0 ; zero?
993 cmp.b #$40,d0 ; infinity?
1003 bsr scosd ; assuming a denorm...
1006 fmove.l fpsr,d0 ; update status register
1007 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1010 * Result is now in FP0
1012 movem.l USER_DA(a6),d0-d1/a0-a1
1013 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1018 * MONADIC.GEN 1.4 1/16/92
1020 * MONADIC.GEN 1.3 4/30/91
1022 * MONADIC.GEN --- generic MONADIC template
1024 * This version saves all registers that will be used by the emulation
1025 * routines and restores all but FP0 on exit. The FPSR is
1026 * updated to reflect the result of the operation. Return value
1027 * is placed in FP0 for single, double and extended results.
1029 * The package subroutines expect the incoming FPCR to be zeroed
1030 * since they need extended precision to work properly. The
1031 * 'final' FPCR is expected in d1 so that the calculated result
1032 * can be properly sized and rounded. Also, if the incoming FPCR
1033 * has enabled any exceptions, the exception will be taken on the
1034 * final fmovem in this template.
1037 * 1. Remove the movem.l at the entry and exit of
1038 * each routine if your compiler treats those
1039 * registers as scratch.
1040 * 2. Likewise, don't save FP0/FP1 if they are scratch
1042 * 3. Delete handling of the fpsr if you only care about
1044 * 4. Some (most?) C compilers convert all float arguments
1045 * to double, and provide no support at all for extended
1046 * precision so remove the fcoshs and fcoshx entry points.
1047 * 5. Move the result to d0/d1 if the compiler is that old.
1049 * Copyright (C) Motorola, Inc. 1991
1050 * All Rights Reserved
1052 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
1053 * The copyright notice above does not evidence any
1054 * actual or intended publication of such source code.
1065 link a6,#-LOCAL_SIZE
1066 movem.l d0-d1/a0-a1,USER_DA(a6)
1067 fmovem.x fp0-fp3,USER_FP0(a6)
1068 fmove.l fpsr,USER_FPSR(a6)
1069 fmove.l fpcr,USER_FPCR(a6)
1070 fmove.l fpcr,d1 ; user's rounding mode/precision
1071 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1073 * copy, convert and tag input argument
1076 fmove.x fp0,ETEMP(a6)
1082 bsr scosh ; normalized (regular) number
1085 cmp.b #$20,d0 ; zero?
1090 cmp.b #$40,d0 ; infinity?
1095 cmp.b #$60,d0 ; NaN?
1100 bsr scoshd ; assuming a denorm...
1103 fmove.l fpsr,d0 ; update status register
1104 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1107 * Result is now in FP0
1109 movem.l USER_DA(a6),d0-d1/a0-a1
1110 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1116 link a6,#-LOCAL_SIZE
1117 movem.l d0-d1/a0-a1,USER_DA(a6)
1118 fmovem.x fp0-fp3,USER_FP0(a6)
1119 fmove.l fpsr,USER_FPSR(a6)
1120 fmove.l fpcr,USER_FPCR(a6)
1121 fmove.l fpcr,d1 ; user's rounding mode/precision
1122 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1124 * copy, convert and tag input argument
1127 fmove.x fp0,ETEMP(a6)
1133 bsr scosh ; normalized (regular) number
1136 cmp.b #$20,d0 ; zero?
1141 cmp.b #$40,d0 ; infinity?
1146 cmp.b #$60,d0 ; NaN?
1151 bsr scoshd ; assuming a denorm...
1154 fmove.l fpsr,d0 ; update status register
1155 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1158 * Result is now in FP0
1160 movem.l USER_DA(a6),d0-d1/a0-a1
1161 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1167 link a6,#-LOCAL_SIZE
1168 movem.l d0-d1/a0-a1,USER_DA(a6)
1169 fmovem.x fp0-fp3,USER_FP0(a6)
1170 fmove.l fpsr,USER_FPSR(a6)
1171 fmove.l fpcr,USER_FPCR(a6)
1172 fmove.l fpcr,d1 ; user's rounding mode/precision
1173 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1175 * copy, convert and tag input argument
1178 fmove.x fp0,ETEMP(a6)
1184 bsr scosh ; normalized (regular) number
1187 cmp.b #$20,d0 ; zero?
1192 cmp.b #$40,d0 ; infinity?
1197 cmp.b #$60,d0 ; NaN?
1202 bsr scoshd ; assuming a denorm...
1205 fmove.l fpsr,d0 ; update status register
1206 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1209 * Result is now in FP0
1211 movem.l USER_DA(a6),d0-d1/a0-a1
1212 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1217 * MONADIC.GEN 1.4 1/16/92
1219 * MONADIC.GEN 1.3 4/30/91
1221 * MONADIC.GEN --- generic MONADIC template
1223 * This version saves all registers that will be used by the emulation
1224 * routines and restores all but FP0 on exit. The FPSR is
1225 * updated to reflect the result of the operation. Return value
1226 * is placed in FP0 for single, double and extended results.
1228 * The package subroutines expect the incoming FPCR to be zeroed
1229 * since they need extended precision to work properly. The
1230 * 'final' FPCR is expected in d1 so that the calculated result
1231 * can be properly sized and rounded. Also, if the incoming FPCR
1232 * has enabled any exceptions, the exception will be taken on the
1233 * final fmovem in this template.
1236 * 1. Remove the movem.l at the entry and exit of
1237 * each routine if your compiler treats those
1238 * registers as scratch.
1239 * 2. Likewise, don't save FP0/FP1 if they are scratch
1241 * 3. Delete handling of the fpsr if you only care about
1243 * 4. Some (most?) C compilers convert all float arguments
1244 * to double, and provide no support at all for extended
1245 * precision so remove the fetoxs and fetoxx entry points.
1246 * 5. Move the result to d0/d1 if the compiler is that old.
1248 * Copyright (C) Motorola, Inc. 1991
1249 * All Rights Reserved
1251 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
1252 * The copyright notice above does not evidence any
1253 * actual or intended publication of such source code.
1264 link a6,#-LOCAL_SIZE
1265 movem.l d0-d1/a0-a1,USER_DA(a6)
1266 fmovem.x fp0-fp3,USER_FP0(a6)
1267 fmove.l fpsr,USER_FPSR(a6)
1268 fmove.l fpcr,USER_FPCR(a6)
1269 fmove.l fpcr,d1 ; user's rounding mode/precision
1270 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1272 * copy, convert and tag input argument
1275 fmove.x fp0,ETEMP(a6)
1281 bsr setox ; normalized (regular) number
1284 cmp.b #$20,d0 ; zero?
1289 cmp.b #$40,d0 ; infinity?
1294 cmp.b #$60,d0 ; NaN?
1299 bsr setoxd ; assuming a denorm...
1302 fmove.l fpsr,d0 ; update status register
1303 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1306 * Result is now in FP0
1308 movem.l USER_DA(a6),d0-d1/a0-a1
1309 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1315 link a6,#-LOCAL_SIZE
1316 movem.l d0-d1/a0-a1,USER_DA(a6)
1317 fmovem.x fp0-fp3,USER_FP0(a6)
1318 fmove.l fpsr,USER_FPSR(a6)
1319 fmove.l fpcr,USER_FPCR(a6)
1320 fmove.l fpcr,d1 ; user's rounding mode/precision
1321 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1323 * copy, convert and tag input argument
1326 fmove.x fp0,ETEMP(a6)
1332 bsr setox ; normalized (regular) number
1335 cmp.b #$20,d0 ; zero?
1340 cmp.b #$40,d0 ; infinity?
1345 cmp.b #$60,d0 ; NaN?
1350 bsr setoxd ; assuming a denorm...
1353 fmove.l fpsr,d0 ; update status register
1354 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1357 * Result is now in FP0
1359 movem.l USER_DA(a6),d0-d1/a0-a1
1360 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1366 link a6,#-LOCAL_SIZE
1367 movem.l d0-d1/a0-a1,USER_DA(a6)
1368 fmovem.x fp0-fp3,USER_FP0(a6)
1369 fmove.l fpsr,USER_FPSR(a6)
1370 fmove.l fpcr,USER_FPCR(a6)
1371 fmove.l fpcr,d1 ; user's rounding mode/precision
1372 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1374 * copy, convert and tag input argument
1377 fmove.x fp0,ETEMP(a6)
1383 bsr setox ; normalized (regular) number
1386 cmp.b #$20,d0 ; zero?
1391 cmp.b #$40,d0 ; infinity?
1396 cmp.b #$60,d0 ; NaN?
1401 bsr setoxd ; assuming a denorm...
1404 fmove.l fpsr,d0 ; update status register
1405 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1408 * Result is now in FP0
1410 movem.l USER_DA(a6),d0-d1/a0-a1
1411 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1416 * MONADIC.GEN 1.4 1/16/92
1418 * MONADIC.GEN 1.3 4/30/91
1420 * MONADIC.GEN --- generic MONADIC template
1422 * This version saves all registers that will be used by the emulation
1423 * routines and restores all but FP0 on exit. The FPSR is
1424 * updated to reflect the result of the operation. Return value
1425 * is placed in FP0 for single, double and extended results.
1427 * The package subroutines expect the incoming FPCR to be zeroed
1428 * since they need extended precision to work properly. The
1429 * 'final' FPCR is expected in d1 so that the calculated result
1430 * can be properly sized and rounded. Also, if the incoming FPCR
1431 * has enabled any exceptions, the exception will be taken on the
1432 * final fmovem in this template.
1435 * 1. Remove the movem.l at the entry and exit of
1436 * each routine if your compiler treats those
1437 * registers as scratch.
1438 * 2. Likewise, don't save FP0/FP1 if they are scratch
1440 * 3. Delete handling of the fpsr if you only care about
1442 * 4. Some (most?) C compilers convert all float arguments
1443 * to double, and provide no support at all for extended
1444 * precision so remove the fetoxm1s and fetoxm1x entry points.
1445 * 5. Move the result to d0/d1 if the compiler is that old.
1447 * Copyright (C) Motorola, Inc. 1991
1448 * All Rights Reserved
1450 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
1451 * The copyright notice above does not evidence any
1452 * actual or intended publication of such source code.
1463 link a6,#-LOCAL_SIZE
1464 movem.l d0-d1/a0-a1,USER_DA(a6)
1465 fmovem.x fp0-fp3,USER_FP0(a6)
1466 fmove.l fpsr,USER_FPSR(a6)
1467 fmove.l fpcr,USER_FPCR(a6)
1468 fmove.l fpcr,d1 ; user's rounding mode/precision
1469 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1471 * copy, convert and tag input argument
1474 fmove.x fp0,ETEMP(a6)
1480 bsr setoxm1 ; normalized (regular) number
1483 cmp.b #$20,d0 ; zero?
1488 cmp.b #$40,d0 ; infinity?
1493 cmp.b #$60,d0 ; NaN?
1498 bsr setoxm1d ; assuming a denorm...
1501 fmove.l fpsr,d0 ; update status register
1502 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1505 * Result is now in FP0
1507 movem.l USER_DA(a6),d0-d1/a0-a1
1508 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1514 link a6,#-LOCAL_SIZE
1515 movem.l d0-d1/a0-a1,USER_DA(a6)
1516 fmovem.x fp0-fp3,USER_FP0(a6)
1517 fmove.l fpsr,USER_FPSR(a6)
1518 fmove.l fpcr,USER_FPCR(a6)
1519 fmove.l fpcr,d1 ; user's rounding mode/precision
1520 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1522 * copy, convert and tag input argument
1525 fmove.x fp0,ETEMP(a6)
1531 bsr setoxm1 ; normalized (regular) number
1534 cmp.b #$20,d0 ; zero?
1539 cmp.b #$40,d0 ; infinity?
1544 cmp.b #$60,d0 ; NaN?
1549 bsr setoxm1d ; assuming a denorm...
1552 fmove.l fpsr,d0 ; update status register
1553 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1556 * Result is now in FP0
1558 movem.l USER_DA(a6),d0-d1/a0-a1
1559 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1565 link a6,#-LOCAL_SIZE
1566 movem.l d0-d1/a0-a1,USER_DA(a6)
1567 fmovem.x fp0-fp3,USER_FP0(a6)
1568 fmove.l fpsr,USER_FPSR(a6)
1569 fmove.l fpcr,USER_FPCR(a6)
1570 fmove.l fpcr,d1 ; user's rounding mode/precision
1571 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1573 * copy, convert and tag input argument
1576 fmove.x fp0,ETEMP(a6)
1582 bsr setoxm1 ; normalized (regular) number
1585 cmp.b #$20,d0 ; zero?
1590 cmp.b #$40,d0 ; infinity?
1595 cmp.b #$60,d0 ; NaN?
1600 bsr setoxm1d ; assuming a denorm...
1603 fmove.l fpsr,d0 ; update status register
1604 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1607 * Result is now in FP0
1609 movem.l USER_DA(a6),d0-d1/a0-a1
1610 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1615 * MONADIC.GEN 1.4 1/16/92
1617 * MONADIC.GEN 1.3 4/30/91
1619 * MONADIC.GEN --- generic MONADIC template
1621 * This version saves all registers that will be used by the emulation
1622 * routines and restores all but FP0 on exit. The FPSR is
1623 * updated to reflect the result of the operation. Return value
1624 * is placed in FP0 for single, double and extended results.
1626 * The package subroutines expect the incoming FPCR to be zeroed
1627 * since they need extended precision to work properly. The
1628 * 'final' FPCR is expected in d1 so that the calculated result
1629 * can be properly sized and rounded. Also, if the incoming FPCR
1630 * has enabled any exceptions, the exception will be taken on the
1631 * final fmovem in this template.
1634 * 1. Remove the movem.l at the entry and exit of
1635 * each routine if your compiler treats those
1636 * registers as scratch.
1637 * 2. Likewise, don't save FP0/FP1 if they are scratch
1639 * 3. Delete handling of the fpsr if you only care about
1641 * 4. Some (most?) C compilers convert all float arguments
1642 * to double, and provide no support at all for extended
1643 * precision so remove the fgetexps and fgetexpx entry points.
1644 * 5. Move the result to d0/d1 if the compiler is that old.
1646 * Copyright (C) Motorola, Inc. 1991
1647 * All Rights Reserved
1649 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
1650 * The copyright notice above does not evidence any
1651 * actual or intended publication of such source code.
1662 link a6,#-LOCAL_SIZE
1663 movem.l d0-d1/a0-a1,USER_DA(a6)
1664 fmovem.x fp0-fp3,USER_FP0(a6)
1665 fmove.l fpsr,USER_FPSR(a6)
1666 fmove.l fpcr,USER_FPCR(a6)
1667 fmove.l fpcr,d1 ; user's rounding mode/precision
1668 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1670 * copy, convert and tag input argument
1673 fmove.x fp0,ETEMP(a6)
1679 bsr sgetexp ; normalized (regular) number
1682 cmp.b #$20,d0 ; zero?
1687 cmp.b #$40,d0 ; infinity?
1692 cmp.b #$60,d0 ; NaN?
1697 bsr sgetexpd ; assuming a denorm...
1700 fmove.l fpsr,d0 ; update status register
1701 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1704 * Result is now in FP0
1706 movem.l USER_DA(a6),d0-d1/a0-a1
1707 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1713 link a6,#-LOCAL_SIZE
1714 movem.l d0-d1/a0-a1,USER_DA(a6)
1715 fmovem.x fp0-fp3,USER_FP0(a6)
1716 fmove.l fpsr,USER_FPSR(a6)
1717 fmove.l fpcr,USER_FPCR(a6)
1718 fmove.l fpcr,d1 ; user's rounding mode/precision
1719 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1721 * copy, convert and tag input argument
1724 fmove.x fp0,ETEMP(a6)
1730 bsr sgetexp ; normalized (regular) number
1733 cmp.b #$20,d0 ; zero?
1738 cmp.b #$40,d0 ; infinity?
1743 cmp.b #$60,d0 ; NaN?
1748 bsr sgetexpd ; assuming a denorm...
1751 fmove.l fpsr,d0 ; update status register
1752 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1755 * Result is now in FP0
1757 movem.l USER_DA(a6),d0-d1/a0-a1
1758 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1764 link a6,#-LOCAL_SIZE
1765 movem.l d0-d1/a0-a1,USER_DA(a6)
1766 fmovem.x fp0-fp3,USER_FP0(a6)
1767 fmove.l fpsr,USER_FPSR(a6)
1768 fmove.l fpcr,USER_FPCR(a6)
1769 fmove.l fpcr,d1 ; user's rounding mode/precision
1770 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1772 * copy, convert and tag input argument
1775 fmove.x fp0,ETEMP(a6)
1781 bsr sgetexp ; normalized (regular) number
1784 cmp.b #$20,d0 ; zero?
1789 cmp.b #$40,d0 ; infinity?
1794 cmp.b #$60,d0 ; NaN?
1799 bsr sgetexpd ; assuming a denorm...
1802 fmove.l fpsr,d0 ; update status register
1803 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1806 * Result is now in FP0
1808 movem.l USER_DA(a6),d0-d1/a0-a1
1809 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1814 * MONADIC.GEN 1.4 1/16/92
1816 * MONADIC.GEN 1.3 4/30/91
1818 * MONADIC.GEN --- generic MONADIC template
1820 * This version saves all registers that will be used by the emulation
1821 * routines and restores all but FP0 on exit. The FPSR is
1822 * updated to reflect the result of the operation. Return value
1823 * is placed in FP0 for single, double and extended results.
1825 * The package subroutines expect the incoming FPCR to be zeroed
1826 * since they need extended precision to work properly. The
1827 * 'final' FPCR is expected in d1 so that the calculated result
1828 * can be properly sized and rounded. Also, if the incoming FPCR
1829 * has enabled any exceptions, the exception will be taken on the
1830 * final fmovem in this template.
1833 * 1. Remove the movem.l at the entry and exit of
1834 * each routine if your compiler treats those
1835 * registers as scratch.
1836 * 2. Likewise, don't save FP0/FP1 if they are scratch
1838 * 3. Delete handling of the fpsr if you only care about
1840 * 4. Some (most?) C compilers convert all float arguments
1841 * to double, and provide no support at all for extended
1842 * precision so remove the fsins and fsinx entry points.
1843 * 5. Move the result to d0/d1 if the compiler is that old.
1845 * Copyright (C) Motorola, Inc. 1991
1846 * All Rights Reserved
1848 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
1849 * The copyright notice above does not evidence any
1850 * actual or intended publication of such source code.
1861 link a6,#-LOCAL_SIZE
1862 movem.l d0-d1/a0-a1,USER_DA(a6)
1863 fmovem.x fp0-fp3,USER_FP0(a6)
1864 fmove.l fpsr,USER_FPSR(a6)
1865 fmove.l fpcr,USER_FPCR(a6)
1866 fmove.l fpcr,d1 ; user's rounding mode/precision
1867 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1869 * copy, convert and tag input argument
1872 fmove.x fp0,ETEMP(a6)
1878 bsr ssin ; normalized (regular) number
1881 cmp.b #$20,d0 ; zero?
1886 cmp.b #$40,d0 ; infinity?
1891 cmp.b #$60,d0 ; NaN?
1896 bsr ssind ; assuming a denorm...
1899 fmove.l fpsr,d0 ; update status register
1900 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1903 * Result is now in FP0
1905 movem.l USER_DA(a6),d0-d1/a0-a1
1906 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1912 link a6,#-LOCAL_SIZE
1913 movem.l d0-d1/a0-a1,USER_DA(a6)
1914 fmovem.x fp0-fp3,USER_FP0(a6)
1915 fmove.l fpsr,USER_FPSR(a6)
1916 fmove.l fpcr,USER_FPCR(a6)
1917 fmove.l fpcr,d1 ; user's rounding mode/precision
1918 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1920 * copy, convert and tag input argument
1923 fmove.x fp0,ETEMP(a6)
1929 bsr ssin ; normalized (regular) number
1932 cmp.b #$20,d0 ; zero?
1937 cmp.b #$40,d0 ; infinity?
1942 cmp.b #$60,d0 ; NaN?
1947 bsr ssind ; assuming a denorm...
1950 fmove.l fpsr,d0 ; update status register
1951 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
1954 * Result is now in FP0
1956 movem.l USER_DA(a6),d0-d1/a0-a1
1957 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
1963 link a6,#-LOCAL_SIZE
1964 movem.l d0-d1/a0-a1,USER_DA(a6)
1965 fmovem.x fp0-fp3,USER_FP0(a6)
1966 fmove.l fpsr,USER_FPSR(a6)
1967 fmove.l fpcr,USER_FPCR(a6)
1968 fmove.l fpcr,d1 ; user's rounding mode/precision
1969 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
1971 * copy, convert and tag input argument
1974 fmove.x fp0,ETEMP(a6)
1980 bsr ssin ; normalized (regular) number
1983 cmp.b #$20,d0 ; zero?
1988 cmp.b #$40,d0 ; infinity?
1993 cmp.b #$60,d0 ; NaN?
1998 bsr ssind ; assuming a denorm...
2001 fmove.l fpsr,d0 ; update status register
2002 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2005 * Result is now in FP0
2007 movem.l USER_DA(a6),d0-d1/a0-a1
2008 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2013 * MONADIC.GEN 1.4 1/16/92
2015 * MONADIC.GEN 1.3 4/30/91
2017 * MONADIC.GEN --- generic MONADIC template
2019 * This version saves all registers that will be used by the emulation
2020 * routines and restores all but FP0 on exit. The FPSR is
2021 * updated to reflect the result of the operation. Return value
2022 * is placed in FP0 for single, double and extended results.
2024 * The package subroutines expect the incoming FPCR to be zeroed
2025 * since they need extended precision to work properly. The
2026 * 'final' FPCR is expected in d1 so that the calculated result
2027 * can be properly sized and rounded. Also, if the incoming FPCR
2028 * has enabled any exceptions, the exception will be taken on the
2029 * final fmovem in this template.
2032 * 1. Remove the movem.l at the entry and exit of
2033 * each routine if your compiler treats those
2034 * registers as scratch.
2035 * 2. Likewise, don't save FP0/FP1 if they are scratch
2037 * 3. Delete handling of the fpsr if you only care about
2039 * 4. Some (most?) C compilers convert all float arguments
2040 * to double, and provide no support at all for extended
2041 * precision so remove the fsinhs and fsinhx entry points.
2042 * 5. Move the result to d0/d1 if the compiler is that old.
2044 * Copyright (C) Motorola, Inc. 1991
2045 * All Rights Reserved
2047 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
2048 * The copyright notice above does not evidence any
2049 * actual or intended publication of such source code.
2060 link a6,#-LOCAL_SIZE
2061 movem.l d0-d1/a0-a1,USER_DA(a6)
2062 fmovem.x fp0-fp3,USER_FP0(a6)
2063 fmove.l fpsr,USER_FPSR(a6)
2064 fmove.l fpcr,USER_FPCR(a6)
2065 fmove.l fpcr,d1 ; user's rounding mode/precision
2066 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2068 * copy, convert and tag input argument
2071 fmove.x fp0,ETEMP(a6)
2077 bsr ssinh ; normalized (regular) number
2080 cmp.b #$20,d0 ; zero?
2085 cmp.b #$40,d0 ; infinity?
2090 cmp.b #$60,d0 ; NaN?
2095 bsr ssinhd ; assuming a denorm...
2098 fmove.l fpsr,d0 ; update status register
2099 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2102 * Result is now in FP0
2104 movem.l USER_DA(a6),d0-d1/a0-a1
2105 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2111 link a6,#-LOCAL_SIZE
2112 movem.l d0-d1/a0-a1,USER_DA(a6)
2113 fmovem.x fp0-fp3,USER_FP0(a6)
2114 fmove.l fpsr,USER_FPSR(a6)
2115 fmove.l fpcr,USER_FPCR(a6)
2116 fmove.l fpcr,d1 ; user's rounding mode/precision
2117 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2119 * copy, convert and tag input argument
2122 fmove.x fp0,ETEMP(a6)
2128 bsr ssinh ; normalized (regular) number
2131 cmp.b #$20,d0 ; zero?
2136 cmp.b #$40,d0 ; infinity?
2141 cmp.b #$60,d0 ; NaN?
2146 bsr ssinhd ; assuming a denorm...
2149 fmove.l fpsr,d0 ; update status register
2150 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2153 * Result is now in FP0
2155 movem.l USER_DA(a6),d0-d1/a0-a1
2156 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2162 link a6,#-LOCAL_SIZE
2163 movem.l d0-d1/a0-a1,USER_DA(a6)
2164 fmovem.x fp0-fp3,USER_FP0(a6)
2165 fmove.l fpsr,USER_FPSR(a6)
2166 fmove.l fpcr,USER_FPCR(a6)
2167 fmove.l fpcr,d1 ; user's rounding mode/precision
2168 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2170 * copy, convert and tag input argument
2173 fmove.x fp0,ETEMP(a6)
2179 bsr ssinh ; normalized (regular) number
2182 cmp.b #$20,d0 ; zero?
2187 cmp.b #$40,d0 ; infinity?
2192 cmp.b #$60,d0 ; NaN?
2197 bsr ssinhd ; assuming a denorm...
2200 fmove.l fpsr,d0 ; update status register
2201 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2204 * Result is now in FP0
2206 movem.l USER_DA(a6),d0-d1/a0-a1
2207 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2212 * MONADIC.GEN 1.4 1/16/92
2214 * MONADIC.GEN 1.3 4/30/91
2216 * MONADIC.GEN --- generic MONADIC template
2218 * This version saves all registers that will be used by the emulation
2219 * routines and restores all but FP0 on exit. The FPSR is
2220 * updated to reflect the result of the operation. Return value
2221 * is placed in FP0 for single, double and extended results.
2223 * The package subroutines expect the incoming FPCR to be zeroed
2224 * since they need extended precision to work properly. The
2225 * 'final' FPCR is expected in d1 so that the calculated result
2226 * can be properly sized and rounded. Also, if the incoming FPCR
2227 * has enabled any exceptions, the exception will be taken on the
2228 * final fmovem in this template.
2231 * 1. Remove the movem.l at the entry and exit of
2232 * each routine if your compiler treats those
2233 * registers as scratch.
2234 * 2. Likewise, don't save FP0/FP1 if they are scratch
2236 * 3. Delete handling of the fpsr if you only care about
2238 * 4. Some (most?) C compilers convert all float arguments
2239 * to double, and provide no support at all for extended
2240 * precision so remove the ftans and ftanx entry points.
2241 * 5. Move the result to d0/d1 if the compiler is that old.
2243 * Copyright (C) Motorola, Inc. 1991
2244 * All Rights Reserved
2246 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
2247 * The copyright notice above does not evidence any
2248 * actual or intended publication of such source code.
2259 link a6,#-LOCAL_SIZE
2260 movem.l d0-d1/a0-a1,USER_DA(a6)
2261 fmovem.x fp0-fp3,USER_FP0(a6)
2262 fmove.l fpsr,USER_FPSR(a6)
2263 fmove.l fpcr,USER_FPCR(a6)
2264 fmove.l fpcr,d1 ; user's rounding mode/precision
2265 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2267 * copy, convert and tag input argument
2270 fmove.x fp0,ETEMP(a6)
2276 bsr stan ; normalized (regular) number
2279 cmp.b #$20,d0 ; zero?
2284 cmp.b #$40,d0 ; infinity?
2289 cmp.b #$60,d0 ; NaN?
2294 bsr stand ; assuming a denorm...
2297 fmove.l fpsr,d0 ; update status register
2298 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2301 * Result is now in FP0
2303 movem.l USER_DA(a6),d0-d1/a0-a1
2304 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2310 link a6,#-LOCAL_SIZE
2311 movem.l d0-d1/a0-a1,USER_DA(a6)
2312 fmovem.x fp0-fp3,USER_FP0(a6)
2313 fmove.l fpsr,USER_FPSR(a6)
2314 fmove.l fpcr,USER_FPCR(a6)
2315 fmove.l fpcr,d1 ; user's rounding mode/precision
2316 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2318 * copy, convert and tag input argument
2321 fmove.x fp0,ETEMP(a6)
2327 bsr stan ; normalized (regular) number
2330 cmp.b #$20,d0 ; zero?
2335 cmp.b #$40,d0 ; infinity?
2340 cmp.b #$60,d0 ; NaN?
2345 bsr stand ; assuming a denorm...
2348 fmove.l fpsr,d0 ; update status register
2349 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2352 * Result is now in FP0
2354 movem.l USER_DA(a6),d0-d1/a0-a1
2355 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2361 link a6,#-LOCAL_SIZE
2362 movem.l d0-d1/a0-a1,USER_DA(a6)
2363 fmovem.x fp0-fp3,USER_FP0(a6)
2364 fmove.l fpsr,USER_FPSR(a6)
2365 fmove.l fpcr,USER_FPCR(a6)
2366 fmove.l fpcr,d1 ; user's rounding mode/precision
2367 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2369 * copy, convert and tag input argument
2372 fmove.x fp0,ETEMP(a6)
2378 bsr stan ; normalized (regular) number
2381 cmp.b #$20,d0 ; zero?
2386 cmp.b #$40,d0 ; infinity?
2391 cmp.b #$60,d0 ; NaN?
2396 bsr stand ; assuming a denorm...
2399 fmove.l fpsr,d0 ; update status register
2400 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2403 * Result is now in FP0
2405 movem.l USER_DA(a6),d0-d1/a0-a1
2406 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2411 * MONADIC.GEN 1.4 1/16/92
2413 * MONADIC.GEN 1.3 4/30/91
2415 * MONADIC.GEN --- generic MONADIC template
2417 * This version saves all registers that will be used by the emulation
2418 * routines and restores all but FP0 on exit. The FPSR is
2419 * updated to reflect the result of the operation. Return value
2420 * is placed in FP0 for single, double and extended results.
2422 * The package subroutines expect the incoming FPCR to be zeroed
2423 * since they need extended precision to work properly. The
2424 * 'final' FPCR is expected in d1 so that the calculated result
2425 * can be properly sized and rounded. Also, if the incoming FPCR
2426 * has enabled any exceptions, the exception will be taken on the
2427 * final fmovem in this template.
2430 * 1. Remove the movem.l at the entry and exit of
2431 * each routine if your compiler treats those
2432 * registers as scratch.
2433 * 2. Likewise, don't save FP0/FP1 if they are scratch
2435 * 3. Delete handling of the fpsr if you only care about
2437 * 4. Some (most?) C compilers convert all float arguments
2438 * to double, and provide no support at all for extended
2439 * precision so remove the ftanhs and ftanhx entry points.
2440 * 5. Move the result to d0/d1 if the compiler is that old.
2442 * Copyright (C) Motorola, Inc. 1991
2443 * All Rights Reserved
2445 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
2446 * The copyright notice above does not evidence any
2447 * actual or intended publication of such source code.
2458 link a6,#-LOCAL_SIZE
2459 movem.l d0-d1/a0-a1,USER_DA(a6)
2460 fmovem.x fp0-fp3,USER_FP0(a6)
2461 fmove.l fpsr,USER_FPSR(a6)
2462 fmove.l fpcr,USER_FPCR(a6)
2463 fmove.l fpcr,d1 ; user's rounding mode/precision
2464 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2466 * copy, convert and tag input argument
2469 fmove.x fp0,ETEMP(a6)
2475 bsr stanh ; normalized (regular) number
2478 cmp.b #$20,d0 ; zero?
2483 cmp.b #$40,d0 ; infinity?
2488 cmp.b #$60,d0 ; NaN?
2493 bsr stanhd ; assuming a denorm...
2496 fmove.l fpsr,d0 ; update status register
2497 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2500 * Result is now in FP0
2502 movem.l USER_DA(a6),d0-d1/a0-a1
2503 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2509 link a6,#-LOCAL_SIZE
2510 movem.l d0-d1/a0-a1,USER_DA(a6)
2511 fmovem.x fp0-fp3,USER_FP0(a6)
2512 fmove.l fpsr,USER_FPSR(a6)
2513 fmove.l fpcr,USER_FPCR(a6)
2514 fmove.l fpcr,d1 ; user's rounding mode/precision
2515 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2517 * copy, convert and tag input argument
2520 fmove.x fp0,ETEMP(a6)
2526 bsr stanh ; normalized (regular) number
2529 cmp.b #$20,d0 ; zero?
2534 cmp.b #$40,d0 ; infinity?
2539 cmp.b #$60,d0 ; NaN?
2544 bsr stanhd ; assuming a denorm...
2547 fmove.l fpsr,d0 ; update status register
2548 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2551 * Result is now in FP0
2553 movem.l USER_DA(a6),d0-d1/a0-a1
2554 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2560 link a6,#-LOCAL_SIZE
2561 movem.l d0-d1/a0-a1,USER_DA(a6)
2562 fmovem.x fp0-fp3,USER_FP0(a6)
2563 fmove.l fpsr,USER_FPSR(a6)
2564 fmove.l fpcr,USER_FPCR(a6)
2565 fmove.l fpcr,d1 ; user's rounding mode/precision
2566 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2568 * copy, convert and tag input argument
2571 fmove.x fp0,ETEMP(a6)
2577 bsr stanh ; normalized (regular) number
2580 cmp.b #$20,d0 ; zero?
2585 cmp.b #$40,d0 ; infinity?
2590 cmp.b #$60,d0 ; NaN?
2595 bsr stanhd ; assuming a denorm...
2598 fmove.l fpsr,d0 ; update status register
2599 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2602 * Result is now in FP0
2604 movem.l USER_DA(a6),d0-d1/a0-a1
2605 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2610 * MONADIC.GEN 1.4 1/16/92
2612 * MONADIC.GEN 1.3 4/30/91
2614 * MONADIC.GEN --- generic MONADIC template
2616 * This version saves all registers that will be used by the emulation
2617 * routines and restores all but FP0 on exit. The FPSR is
2618 * updated to reflect the result of the operation. Return value
2619 * is placed in FP0 for single, double and extended results.
2621 * The package subroutines expect the incoming FPCR to be zeroed
2622 * since they need extended precision to work properly. The
2623 * 'final' FPCR is expected in d1 so that the calculated result
2624 * can be properly sized and rounded. Also, if the incoming FPCR
2625 * has enabled any exceptions, the exception will be taken on the
2626 * final fmovem in this template.
2629 * 1. Remove the movem.l at the entry and exit of
2630 * each routine if your compiler treats those
2631 * registers as scratch.
2632 * 2. Likewise, don't save FP0/FP1 if they are scratch
2634 * 3. Delete handling of the fpsr if you only care about
2636 * 4. Some (most?) C compilers convert all float arguments
2637 * to double, and provide no support at all for extended
2638 * precision so remove the ftentoxs and ftentoxx entry points.
2639 * 5. Move the result to d0/d1 if the compiler is that old.
2641 * Copyright (C) Motorola, Inc. 1991
2642 * All Rights Reserved
2644 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
2645 * The copyright notice above does not evidence any
2646 * actual or intended publication of such source code.
2657 link a6,#-LOCAL_SIZE
2658 movem.l d0-d1/a0-a1,USER_DA(a6)
2659 fmovem.x fp0-fp3,USER_FP0(a6)
2660 fmove.l fpsr,USER_FPSR(a6)
2661 fmove.l fpcr,USER_FPCR(a6)
2662 fmove.l fpcr,d1 ; user's rounding mode/precision
2663 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2665 * copy, convert and tag input argument
2668 fmove.x fp0,ETEMP(a6)
2674 bsr stentox ; normalized (regular) number
2677 cmp.b #$20,d0 ; zero?
2682 cmp.b #$40,d0 ; infinity?
2687 cmp.b #$60,d0 ; NaN?
2692 bsr stentoxd ; assuming a denorm...
2695 fmove.l fpsr,d0 ; update status register
2696 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2699 * Result is now in FP0
2701 movem.l USER_DA(a6),d0-d1/a0-a1
2702 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2708 link a6,#-LOCAL_SIZE
2709 movem.l d0-d1/a0-a1,USER_DA(a6)
2710 fmovem.x fp0-fp3,USER_FP0(a6)
2711 fmove.l fpsr,USER_FPSR(a6)
2712 fmove.l fpcr,USER_FPCR(a6)
2713 fmove.l fpcr,d1 ; user's rounding mode/precision
2714 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2716 * copy, convert and tag input argument
2719 fmove.x fp0,ETEMP(a6)
2725 bsr stentox ; normalized (regular) number
2728 cmp.b #$20,d0 ; zero?
2733 cmp.b #$40,d0 ; infinity?
2738 cmp.b #$60,d0 ; NaN?
2743 bsr stentoxd ; assuming a denorm...
2746 fmove.l fpsr,d0 ; update status register
2747 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2750 * Result is now in FP0
2752 movem.l USER_DA(a6),d0-d1/a0-a1
2753 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2759 link a6,#-LOCAL_SIZE
2760 movem.l d0-d1/a0-a1,USER_DA(a6)
2761 fmovem.x fp0-fp3,USER_FP0(a6)
2762 fmove.l fpsr,USER_FPSR(a6)
2763 fmove.l fpcr,USER_FPCR(a6)
2764 fmove.l fpcr,d1 ; user's rounding mode/precision
2765 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2767 * copy, convert and tag input argument
2770 fmove.x fp0,ETEMP(a6)
2776 bsr stentox ; normalized (regular) number
2779 cmp.b #$20,d0 ; zero?
2784 cmp.b #$40,d0 ; infinity?
2789 cmp.b #$60,d0 ; NaN?
2794 bsr stentoxd ; assuming a denorm...
2797 fmove.l fpsr,d0 ; update status register
2798 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2801 * Result is now in FP0
2803 movem.l USER_DA(a6),d0-d1/a0-a1
2804 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2809 * MONADIC.GEN 1.4 1/16/92
2811 * MONADIC.GEN 1.3 4/30/91
2813 * MONADIC.GEN --- generic MONADIC template
2815 * This version saves all registers that will be used by the emulation
2816 * routines and restores all but FP0 on exit. The FPSR is
2817 * updated to reflect the result of the operation. Return value
2818 * is placed in FP0 for single, double and extended results.
2820 * The package subroutines expect the incoming FPCR to be zeroed
2821 * since they need extended precision to work properly. The
2822 * 'final' FPCR is expected in d1 so that the calculated result
2823 * can be properly sized and rounded. Also, if the incoming FPCR
2824 * has enabled any exceptions, the exception will be taken on the
2825 * final fmovem in this template.
2828 * 1. Remove the movem.l at the entry and exit of
2829 * each routine if your compiler treats those
2830 * registers as scratch.
2831 * 2. Likewise, don't save FP0/FP1 if they are scratch
2833 * 3. Delete handling of the fpsr if you only care about
2835 * 4. Some (most?) C compilers convert all float arguments
2836 * to double, and provide no support at all for extended
2837 * precision so remove the ftwotoxs and ftwotoxx entry points.
2838 * 5. Move the result to d0/d1 if the compiler is that old.
2840 * Copyright (C) Motorola, Inc. 1991
2841 * All Rights Reserved
2843 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
2844 * The copyright notice above does not evidence any
2845 * actual or intended publication of such source code.
2856 link a6,#-LOCAL_SIZE
2857 movem.l d0-d1/a0-a1,USER_DA(a6)
2858 fmovem.x fp0-fp3,USER_FP0(a6)
2859 fmove.l fpsr,USER_FPSR(a6)
2860 fmove.l fpcr,USER_FPCR(a6)
2861 fmove.l fpcr,d1 ; user's rounding mode/precision
2862 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2864 * copy, convert and tag input argument
2867 fmove.x fp0,ETEMP(a6)
2873 bsr stwotox ; normalized (regular) number
2876 cmp.b #$20,d0 ; zero?
2881 cmp.b #$40,d0 ; infinity?
2886 cmp.b #$60,d0 ; NaN?
2891 bsr stwotoxd ; assuming a denorm...
2894 fmove.l fpsr,d0 ; update status register
2895 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2898 * Result is now in FP0
2900 movem.l USER_DA(a6),d0-d1/a0-a1
2901 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2907 link a6,#-LOCAL_SIZE
2908 movem.l d0-d1/a0-a1,USER_DA(a6)
2909 fmovem.x fp0-fp3,USER_FP0(a6)
2910 fmove.l fpsr,USER_FPSR(a6)
2911 fmove.l fpcr,USER_FPCR(a6)
2912 fmove.l fpcr,d1 ; user's rounding mode/precision
2913 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2915 * copy, convert and tag input argument
2918 fmove.x fp0,ETEMP(a6)
2924 bsr stwotox ; normalized (regular) number
2927 cmp.b #$20,d0 ; zero?
2932 cmp.b #$40,d0 ; infinity?
2937 cmp.b #$60,d0 ; NaN?
2942 bsr stwotoxd ; assuming a denorm...
2945 fmove.l fpsr,d0 ; update status register
2946 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
2949 * Result is now in FP0
2951 movem.l USER_DA(a6),d0-d1/a0-a1
2952 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
2958 link a6,#-LOCAL_SIZE
2959 movem.l d0-d1/a0-a1,USER_DA(a6)
2960 fmovem.x fp0-fp3,USER_FP0(a6)
2961 fmove.l fpsr,USER_FPSR(a6)
2962 fmove.l fpcr,USER_FPCR(a6)
2963 fmove.l fpcr,d1 ; user's rounding mode/precision
2964 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
2966 * copy, convert and tag input argument
2969 fmove.x fp0,ETEMP(a6)
2975 bsr stwotox ; normalized (regular) number
2978 cmp.b #$20,d0 ; zero?
2983 cmp.b #$40,d0 ; infinity?
2988 cmp.b #$60,d0 ; NaN?
2993 bsr stwotoxd ; assuming a denorm...
2996 fmove.l fpsr,d0 ; update status register
2997 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3000 * Result is now in FP0
3002 movem.l USER_DA(a6),d0-d1/a0-a1
3003 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3008 * MONADIC.GEN 1.4 1/16/92
3010 * MONADIC.GEN 1.3 4/30/91
3012 * MONADIC.GEN --- generic MONADIC template
3014 * This version saves all registers that will be used by the emulation
3015 * routines and restores all but FP0 on exit. The FPSR is
3016 * updated to reflect the result of the operation. Return value
3017 * is placed in FP0 for single, double and extended results.
3019 * The package subroutines expect the incoming FPCR to be zeroed
3020 * since they need extended precision to work properly. The
3021 * 'final' FPCR is expected in d1 so that the calculated result
3022 * can be properly sized and rounded. Also, if the incoming FPCR
3023 * has enabled any exceptions, the exception will be taken on the
3024 * final fmovem in this template.
3027 * 1. Remove the movem.l at the entry and exit of
3028 * each routine if your compiler treats those
3029 * registers as scratch.
3030 * 2. Likewise, don't save FP0/FP1 if they are scratch
3032 * 3. Delete handling of the fpsr if you only care about
3034 * 4. Some (most?) C compilers convert all float arguments
3035 * to double, and provide no support at all for extended
3036 * precision so remove the fgetmans and fgetmanx entry points.
3037 * 5. Move the result to d0/d1 if the compiler is that old.
3039 * Copyright (C) Motorola, Inc. 1991
3040 * All Rights Reserved
3042 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
3043 * The copyright notice above does not evidence any
3044 * actual or intended publication of such source code.
3055 link a6,#-LOCAL_SIZE
3056 movem.l d0-d1/a0-a1,USER_DA(a6)
3057 fmovem.x fp0-fp3,USER_FP0(a6)
3058 fmove.l fpsr,USER_FPSR(a6)
3059 fmove.l fpcr,USER_FPCR(a6)
3060 fmove.l fpcr,d1 ; user's rounding mode/precision
3061 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3063 * copy, convert and tag input argument
3066 fmove.x fp0,ETEMP(a6)
3072 bsr sgetman ; normalized (regular) number
3075 cmp.b #$20,d0 ; zero?
3080 cmp.b #$40,d0 ; infinity?
3085 cmp.b #$60,d0 ; NaN?
3090 bsr sgetmand ; assuming a denorm...
3093 fmove.l fpsr,d0 ; update status register
3094 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3097 * Result is now in FP0
3099 movem.l USER_DA(a6),d0-d1/a0-a1
3100 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3106 link a6,#-LOCAL_SIZE
3107 movem.l d0-d1/a0-a1,USER_DA(a6)
3108 fmovem.x fp0-fp3,USER_FP0(a6)
3109 fmove.l fpsr,USER_FPSR(a6)
3110 fmove.l fpcr,USER_FPCR(a6)
3111 fmove.l fpcr,d1 ; user's rounding mode/precision
3112 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3114 * copy, convert and tag input argument
3117 fmove.x fp0,ETEMP(a6)
3123 bsr sgetman ; normalized (regular) number
3126 cmp.b #$20,d0 ; zero?
3131 cmp.b #$40,d0 ; infinity?
3136 cmp.b #$60,d0 ; NaN?
3141 bsr sgetmand ; assuming a denorm...
3144 fmove.l fpsr,d0 ; update status register
3145 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3148 * Result is now in FP0
3150 movem.l USER_DA(a6),d0-d1/a0-a1
3151 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3157 link a6,#-LOCAL_SIZE
3158 movem.l d0-d1/a0-a1,USER_DA(a6)
3159 fmovem.x fp0-fp3,USER_FP0(a6)
3160 fmove.l fpsr,USER_FPSR(a6)
3161 fmove.l fpcr,USER_FPCR(a6)
3162 fmove.l fpcr,d1 ; user's rounding mode/precision
3163 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3165 * copy, convert and tag input argument
3168 fmove.x fp0,ETEMP(a6)
3174 bsr sgetman ; normalized (regular) number
3177 cmp.b #$20,d0 ; zero?
3182 cmp.b #$40,d0 ; infinity?
3187 cmp.b #$60,d0 ; NaN?
3192 bsr sgetmand ; assuming a denorm...
3195 fmove.l fpsr,d0 ; update status register
3196 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3199 * Result is now in FP0
3201 movem.l USER_DA(a6),d0-d1/a0-a1
3202 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3207 * MONADIC.GEN 1.4 1/16/92
3209 * MONADIC.GEN 1.3 4/30/91
3211 * MONADIC.GEN --- generic MONADIC template
3213 * This version saves all registers that will be used by the emulation
3214 * routines and restores all but FP0 on exit. The FPSR is
3215 * updated to reflect the result of the operation. Return value
3216 * is placed in FP0 for single, double and extended results.
3218 * The package subroutines expect the incoming FPCR to be zeroed
3219 * since they need extended precision to work properly. The
3220 * 'final' FPCR is expected in d1 so that the calculated result
3221 * can be properly sized and rounded. Also, if the incoming FPCR
3222 * has enabled any exceptions, the exception will be taken on the
3223 * final fmovem in this template.
3226 * 1. Remove the movem.l at the entry and exit of
3227 * each routine if your compiler treats those
3228 * registers as scratch.
3229 * 2. Likewise, don't save FP0/FP1 if they are scratch
3231 * 3. Delete handling of the fpsr if you only care about
3233 * 4. Some (most?) C compilers convert all float arguments
3234 * to double, and provide no support at all for extended
3235 * precision so remove the flogns and flognx entry points.
3236 * 5. Move the result to d0/d1 if the compiler is that old.
3238 * Copyright (C) Motorola, Inc. 1991
3239 * All Rights Reserved
3241 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
3242 * The copyright notice above does not evidence any
3243 * actual or intended publication of such source code.
3254 link a6,#-LOCAL_SIZE
3255 movem.l d0-d1/a0-a1,USER_DA(a6)
3256 fmovem.x fp0-fp3,USER_FP0(a6)
3257 fmove.l fpsr,USER_FPSR(a6)
3258 fmove.l fpcr,USER_FPCR(a6)
3259 fmove.l fpcr,d1 ; user's rounding mode/precision
3260 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3262 * copy, convert and tag input argument
3265 fmove.x fp0,ETEMP(a6)
3271 bsr sslogn ; normalized (regular) number
3274 cmp.b #$20,d0 ; zero?
3279 cmp.b #$40,d0 ; infinity?
3284 cmp.b #$60,d0 ; NaN?
3289 bsr sslognd ; assuming a denorm...
3292 fmove.l fpsr,d0 ; update status register
3293 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3296 * Result is now in FP0
3298 movem.l USER_DA(a6),d0-d1/a0-a1
3299 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3305 link a6,#-LOCAL_SIZE
3306 movem.l d0-d1/a0-a1,USER_DA(a6)
3307 fmovem.x fp0-fp3,USER_FP0(a6)
3308 fmove.l fpsr,USER_FPSR(a6)
3309 fmove.l fpcr,USER_FPCR(a6)
3310 fmove.l fpcr,d1 ; user's rounding mode/precision
3311 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3313 * copy, convert and tag input argument
3316 fmove.x fp0,ETEMP(a6)
3322 bsr sslogn ; normalized (regular) number
3325 cmp.b #$20,d0 ; zero?
3330 cmp.b #$40,d0 ; infinity?
3335 cmp.b #$60,d0 ; NaN?
3340 bsr sslognd ; assuming a denorm...
3343 fmove.l fpsr,d0 ; update status register
3344 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3347 * Result is now in FP0
3349 movem.l USER_DA(a6),d0-d1/a0-a1
3350 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3356 link a6,#-LOCAL_SIZE
3357 movem.l d0-d1/a0-a1,USER_DA(a6)
3358 fmovem.x fp0-fp3,USER_FP0(a6)
3359 fmove.l fpsr,USER_FPSR(a6)
3360 fmove.l fpcr,USER_FPCR(a6)
3361 fmove.l fpcr,d1 ; user's rounding mode/precision
3362 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3364 * copy, convert and tag input argument
3367 fmove.x fp0,ETEMP(a6)
3373 bsr sslogn ; normalized (regular) number
3376 cmp.b #$20,d0 ; zero?
3381 cmp.b #$40,d0 ; infinity?
3386 cmp.b #$60,d0 ; NaN?
3391 bsr sslognd ; assuming a denorm...
3394 fmove.l fpsr,d0 ; update status register
3395 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3398 * Result is now in FP0
3400 movem.l USER_DA(a6),d0-d1/a0-a1
3401 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3406 * MONADIC.GEN 1.4 1/16/92
3408 * MONADIC.GEN 1.3 4/30/91
3410 * MONADIC.GEN --- generic MONADIC template
3412 * This version saves all registers that will be used by the emulation
3413 * routines and restores all but FP0 on exit. The FPSR is
3414 * updated to reflect the result of the operation. Return value
3415 * is placed in FP0 for single, double and extended results.
3417 * The package subroutines expect the incoming FPCR to be zeroed
3418 * since they need extended precision to work properly. The
3419 * 'final' FPCR is expected in d1 so that the calculated result
3420 * can be properly sized and rounded. Also, if the incoming FPCR
3421 * has enabled any exceptions, the exception will be taken on the
3422 * final fmovem in this template.
3425 * 1. Remove the movem.l at the entry and exit of
3426 * each routine if your compiler treats those
3427 * registers as scratch.
3428 * 2. Likewise, don't save FP0/FP1 if they are scratch
3430 * 3. Delete handling of the fpsr if you only care about
3432 * 4. Some (most?) C compilers convert all float arguments
3433 * to double, and provide no support at all for extended
3434 * precision so remove the flog2s and flog2x entry points.
3435 * 5. Move the result to d0/d1 if the compiler is that old.
3437 * Copyright (C) Motorola, Inc. 1991
3438 * All Rights Reserved
3440 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
3441 * The copyright notice above does not evidence any
3442 * actual or intended publication of such source code.
3453 link a6,#-LOCAL_SIZE
3454 movem.l d0-d1/a0-a1,USER_DA(a6)
3455 fmovem.x fp0-fp3,USER_FP0(a6)
3456 fmove.l fpsr,USER_FPSR(a6)
3457 fmove.l fpcr,USER_FPCR(a6)
3458 fmove.l fpcr,d1 ; user's rounding mode/precision
3459 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3461 * copy, convert and tag input argument
3464 fmove.x fp0,ETEMP(a6)
3470 bsr sslog2 ; normalized (regular) number
3473 cmp.b #$20,d0 ; zero?
3478 cmp.b #$40,d0 ; infinity?
3483 cmp.b #$60,d0 ; NaN?
3488 bsr sslog2d ; assuming a denorm...
3491 fmove.l fpsr,d0 ; update status register
3492 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3495 * Result is now in FP0
3497 movem.l USER_DA(a6),d0-d1/a0-a1
3498 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3504 link a6,#-LOCAL_SIZE
3505 movem.l d0-d1/a0-a1,USER_DA(a6)
3506 fmovem.x fp0-fp3,USER_FP0(a6)
3507 fmove.l fpsr,USER_FPSR(a6)
3508 fmove.l fpcr,USER_FPCR(a6)
3509 fmove.l fpcr,d1 ; user's rounding mode/precision
3510 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3512 * copy, convert and tag input argument
3515 fmove.x fp0,ETEMP(a6)
3521 bsr sslog2 ; normalized (regular) number
3524 cmp.b #$20,d0 ; zero?
3529 cmp.b #$40,d0 ; infinity?
3534 cmp.b #$60,d0 ; NaN?
3539 bsr sslog2d ; assuming a denorm...
3542 fmove.l fpsr,d0 ; update status register
3543 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3546 * Result is now in FP0
3548 movem.l USER_DA(a6),d0-d1/a0-a1
3549 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3555 link a6,#-LOCAL_SIZE
3556 movem.l d0-d1/a0-a1,USER_DA(a6)
3557 fmovem.x fp0-fp3,USER_FP0(a6)
3558 fmove.l fpsr,USER_FPSR(a6)
3559 fmove.l fpcr,USER_FPCR(a6)
3560 fmove.l fpcr,d1 ; user's rounding mode/precision
3561 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3563 * copy, convert and tag input argument
3566 fmove.x fp0,ETEMP(a6)
3572 bsr sslog2 ; normalized (regular) number
3575 cmp.b #$20,d0 ; zero?
3580 cmp.b #$40,d0 ; infinity?
3585 cmp.b #$60,d0 ; NaN?
3590 bsr sslog2d ; assuming a denorm...
3593 fmove.l fpsr,d0 ; update status register
3594 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3597 * Result is now in FP0
3599 movem.l USER_DA(a6),d0-d1/a0-a1
3600 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3605 * MONADIC.GEN 1.4 1/16/92
3607 * MONADIC.GEN 1.3 4/30/91
3609 * MONADIC.GEN --- generic MONADIC template
3611 * This version saves all registers that will be used by the emulation
3612 * routines and restores all but FP0 on exit. The FPSR is
3613 * updated to reflect the result of the operation. Return value
3614 * is placed in FP0 for single, double and extended results.
3616 * The package subroutines expect the incoming FPCR to be zeroed
3617 * since they need extended precision to work properly. The
3618 * 'final' FPCR is expected in d1 so that the calculated result
3619 * can be properly sized and rounded. Also, if the incoming FPCR
3620 * has enabled any exceptions, the exception will be taken on the
3621 * final fmovem in this template.
3624 * 1. Remove the movem.l at the entry and exit of
3625 * each routine if your compiler treats those
3626 * registers as scratch.
3627 * 2. Likewise, don't save FP0/FP1 if they are scratch
3629 * 3. Delete handling of the fpsr if you only care about
3631 * 4. Some (most?) C compilers convert all float arguments
3632 * to double, and provide no support at all for extended
3633 * precision so remove the flog10s and flog10x entry points.
3634 * 5. Move the result to d0/d1 if the compiler is that old.
3636 * Copyright (C) Motorola, Inc. 1991
3637 * All Rights Reserved
3639 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
3640 * The copyright notice above does not evidence any
3641 * actual or intended publication of such source code.
3652 link a6,#-LOCAL_SIZE
3653 movem.l d0-d1/a0-a1,USER_DA(a6)
3654 fmovem.x fp0-fp3,USER_FP0(a6)
3655 fmove.l fpsr,USER_FPSR(a6)
3656 fmove.l fpcr,USER_FPCR(a6)
3657 fmove.l fpcr,d1 ; user's rounding mode/precision
3658 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3660 * copy, convert and tag input argument
3663 fmove.x fp0,ETEMP(a6)
3669 bsr sslog10 ; normalized (regular) number
3672 cmp.b #$20,d0 ; zero?
3677 cmp.b #$40,d0 ; infinity?
3682 cmp.b #$60,d0 ; NaN?
3687 bsr sslog10d ; assuming a denorm...
3690 fmove.l fpsr,d0 ; update status register
3691 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3694 * Result is now in FP0
3696 movem.l USER_DA(a6),d0-d1/a0-a1
3697 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3703 link a6,#-LOCAL_SIZE
3704 movem.l d0-d1/a0-a1,USER_DA(a6)
3705 fmovem.x fp0-fp3,USER_FP0(a6)
3706 fmove.l fpsr,USER_FPSR(a6)
3707 fmove.l fpcr,USER_FPCR(a6)
3708 fmove.l fpcr,d1 ; user's rounding mode/precision
3709 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3711 * copy, convert and tag input argument
3714 fmove.x fp0,ETEMP(a6)
3720 bsr sslog10 ; normalized (regular) number
3723 cmp.b #$20,d0 ; zero?
3728 cmp.b #$40,d0 ; infinity?
3733 cmp.b #$60,d0 ; NaN?
3738 bsr sslog10d ; assuming a denorm...
3741 fmove.l fpsr,d0 ; update status register
3742 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3745 * Result is now in FP0
3747 movem.l USER_DA(a6),d0-d1/a0-a1
3748 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3754 link a6,#-LOCAL_SIZE
3755 movem.l d0-d1/a0-a1,USER_DA(a6)
3756 fmovem.x fp0-fp3,USER_FP0(a6)
3757 fmove.l fpsr,USER_FPSR(a6)
3758 fmove.l fpcr,USER_FPCR(a6)
3759 fmove.l fpcr,d1 ; user's rounding mode/precision
3760 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3762 * copy, convert and tag input argument
3765 fmove.x fp0,ETEMP(a6)
3771 bsr sslog10 ; normalized (regular) number
3774 cmp.b #$20,d0 ; zero?
3779 cmp.b #$40,d0 ; infinity?
3784 cmp.b #$60,d0 ; NaN?
3789 bsr sslog10d ; assuming a denorm...
3792 fmove.l fpsr,d0 ; update status register
3793 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3796 * Result is now in FP0
3798 movem.l USER_DA(a6),d0-d1/a0-a1
3799 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3804 * MONADIC.GEN 1.4 1/16/92
3806 * MONADIC.GEN 1.3 4/30/91
3808 * MONADIC.GEN --- generic MONADIC template
3810 * This version saves all registers that will be used by the emulation
3811 * routines and restores all but FP0 on exit. The FPSR is
3812 * updated to reflect the result of the operation. Return value
3813 * is placed in FP0 for single, double and extended results.
3815 * The package subroutines expect the incoming FPCR to be zeroed
3816 * since they need extended precision to work properly. The
3817 * 'final' FPCR is expected in d1 so that the calculated result
3818 * can be properly sized and rounded. Also, if the incoming FPCR
3819 * has enabled any exceptions, the exception will be taken on the
3820 * final fmovem in this template.
3823 * 1. Remove the movem.l at the entry and exit of
3824 * each routine if your compiler treats those
3825 * registers as scratch.
3826 * 2. Likewise, don't save FP0/FP1 if they are scratch
3828 * 3. Delete handling of the fpsr if you only care about
3830 * 4. Some (most?) C compilers convert all float arguments
3831 * to double, and provide no support at all for extended
3832 * precision so remove the flognp1s and flognp1x entry points.
3833 * 5. Move the result to d0/d1 if the compiler is that old.
3835 * Copyright (C) Motorola, Inc. 1991
3836 * All Rights Reserved
3838 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
3839 * The copyright notice above does not evidence any
3840 * actual or intended publication of such source code.
3851 link a6,#-LOCAL_SIZE
3852 movem.l d0-d1/a0-a1,USER_DA(a6)
3853 fmovem.x fp0-fp3,USER_FP0(a6)
3854 fmove.l fpsr,USER_FPSR(a6)
3855 fmove.l fpcr,USER_FPCR(a6)
3856 fmove.l fpcr,d1 ; user's rounding mode/precision
3857 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3859 * copy, convert and tag input argument
3862 fmove.x fp0,ETEMP(a6)
3868 bsr sslognp1 ; normalized (regular) number
3871 cmp.b #$20,d0 ; zero?
3876 cmp.b #$40,d0 ; infinity?
3881 cmp.b #$60,d0 ; NaN?
3886 bsr slognp1d ; assuming a denorm...
3889 fmove.l fpsr,d0 ; update status register
3890 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3893 * Result is now in FP0
3895 movem.l USER_DA(a6),d0-d1/a0-a1
3896 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3902 link a6,#-LOCAL_SIZE
3903 movem.l d0-d1/a0-a1,USER_DA(a6)
3904 fmovem.x fp0-fp3,USER_FP0(a6)
3905 fmove.l fpsr,USER_FPSR(a6)
3906 fmove.l fpcr,USER_FPCR(a6)
3907 fmove.l fpcr,d1 ; user's rounding mode/precision
3908 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3910 * copy, convert and tag input argument
3913 fmove.x fp0,ETEMP(a6)
3919 bsr sslognp1 ; normalized (regular) number
3922 cmp.b #$20,d0 ; zero?
3927 cmp.b #$40,d0 ; infinity?
3932 cmp.b #$60,d0 ; NaN?
3937 bsr slognp1d ; assuming a denorm...
3940 fmove.l fpsr,d0 ; update status register
3941 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3944 * Result is now in FP0
3946 movem.l USER_DA(a6),d0-d1/a0-a1
3947 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
3953 link a6,#-LOCAL_SIZE
3954 movem.l d0-d1/a0-a1,USER_DA(a6)
3955 fmovem.x fp0-fp3,USER_FP0(a6)
3956 fmove.l fpsr,USER_FPSR(a6)
3957 fmove.l fpcr,USER_FPCR(a6)
3958 fmove.l fpcr,d1 ; user's rounding mode/precision
3959 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
3961 * copy, convert and tag input argument
3964 fmove.x fp0,ETEMP(a6)
3970 bsr sslognp1 ; normalized (regular) number
3973 cmp.b #$20,d0 ; zero?
3978 cmp.b #$40,d0 ; infinity?
3983 cmp.b #$60,d0 ; NaN?
3988 bsr slognp1d ; assuming a denorm...
3991 fmove.l fpsr,d0 ; update status register
3992 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
3995 * Result is now in FP0
3997 movem.l USER_DA(a6),d0-d1/a0-a1
3998 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4003 * MONADIC.GEN 1.4 1/16/92
4005 * MONADIC.GEN 1.3 4/30/91
4007 * MONADIC.GEN --- generic MONADIC template
4009 * This version saves all registers that will be used by the emulation
4010 * routines and restores all but FP0 on exit. The FPSR is
4011 * updated to reflect the result of the operation. Return value
4012 * is placed in FP0 for single, double and extended results.
4014 * The package subroutines expect the incoming FPCR to be zeroed
4015 * since they need extended precision to work properly. The
4016 * 'final' FPCR is expected in d1 so that the calculated result
4017 * can be properly sized and rounded. Also, if the incoming FPCR
4018 * has enabled any exceptions, the exception will be taken on the
4019 * final fmovem in this template.
4022 * 1. Remove the movem.l at the entry and exit of
4023 * each routine if your compiler treats those
4024 * registers as scratch.
4025 * 2. Likewise, don't save FP0/FP1 if they are scratch
4027 * 3. Delete handling of the fpsr if you only care about
4029 * 4. Some (most?) C compilers convert all float arguments
4030 * to double, and provide no support at all for extended
4031 * precision so remove the fints and fintx entry points.
4032 * 5. Move the result to d0/d1 if the compiler is that old.
4034 * Copyright (C) Motorola, Inc. 1991
4035 * All Rights Reserved
4037 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
4038 * The copyright notice above does not evidence any
4039 * actual or intended publication of such source code.
4050 link a6,#-LOCAL_SIZE
4051 movem.l d0-d1/a0-a1,USER_DA(a6)
4052 fmovem.x fp0-fp3,USER_FP0(a6)
4053 fmove.l fpsr,USER_FPSR(a6)
4054 fmove.l fpcr,USER_FPCR(a6)
4055 fmove.l fpcr,d1 ; user's rounding mode/precision
4056 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4058 * copy, convert and tag input argument
4061 fmove.x fp0,ETEMP(a6)
4067 bsr l_sint ; normalized (regular) number
4070 cmp.b #$20,d0 ; zero?
4075 cmp.b #$40,d0 ; infinity?
4080 cmp.b #$60,d0 ; NaN?
4085 bsr l_sintd ; assuming a denorm...
4088 fmove.l fpsr,d0 ; update status register
4089 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4092 * Result is now in FP0
4094 movem.l USER_DA(a6),d0-d1/a0-a1
4095 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4101 link a6,#-LOCAL_SIZE
4102 movem.l d0-d1/a0-a1,USER_DA(a6)
4103 fmovem.x fp0-fp3,USER_FP0(a6)
4104 fmove.l fpsr,USER_FPSR(a6)
4105 fmove.l fpcr,USER_FPCR(a6)
4106 fmove.l fpcr,d1 ; user's rounding mode/precision
4107 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4109 * copy, convert and tag input argument
4112 fmove.x fp0,ETEMP(a6)
4118 bsr l_sint ; normalized (regular) number
4121 cmp.b #$20,d0 ; zero?
4126 cmp.b #$40,d0 ; infinity?
4131 cmp.b #$60,d0 ; NaN?
4136 bsr l_sintd ; assuming a denorm...
4139 fmove.l fpsr,d0 ; update status register
4140 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4143 * Result is now in FP0
4145 movem.l USER_DA(a6),d0-d1/a0-a1
4146 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4152 link a6,#-LOCAL_SIZE
4153 movem.l d0-d1/a0-a1,USER_DA(a6)
4154 fmovem.x fp0-fp3,USER_FP0(a6)
4155 fmove.l fpsr,USER_FPSR(a6)
4156 fmove.l fpcr,USER_FPCR(a6)
4157 fmove.l fpcr,d1 ; user's rounding mode/precision
4158 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4160 * copy, convert and tag input argument
4163 fmove.x fp0,ETEMP(a6)
4169 bsr l_sint ; normalized (regular) number
4172 cmp.b #$20,d0 ; zero?
4177 cmp.b #$40,d0 ; infinity?
4182 cmp.b #$60,d0 ; NaN?
4187 bsr l_sintd ; assuming a denorm...
4190 fmove.l fpsr,d0 ; update status register
4191 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4194 * Result is now in FP0
4196 movem.l USER_DA(a6),d0-d1/a0-a1
4197 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4202 * MONADIC.GEN 1.4 1/16/92
4204 * MONADIC.GEN 1.3 4/30/91
4206 * MONADIC.GEN --- generic MONADIC template
4208 * This version saves all registers that will be used by the emulation
4209 * routines and restores all but FP0 on exit. The FPSR is
4210 * updated to reflect the result of the operation. Return value
4211 * is placed in FP0 for single, double and extended results.
4213 * The package subroutines expect the incoming FPCR to be zeroed
4214 * since they need extended precision to work properly. The
4215 * 'final' FPCR is expected in d1 so that the calculated result
4216 * can be properly sized and rounded. Also, if the incoming FPCR
4217 * has enabled any exceptions, the exception will be taken on the
4218 * final fmovem in this template.
4221 * 1. Remove the movem.l at the entry and exit of
4222 * each routine if your compiler treats those
4223 * registers as scratch.
4224 * 2. Likewise, don't save FP0/FP1 if they are scratch
4226 * 3. Delete handling of the fpsr if you only care about
4228 * 4. Some (most?) C compilers convert all float arguments
4229 * to double, and provide no support at all for extended
4230 * precision so remove the fintrzs and fintrzx entry points.
4231 * 5. Move the result to d0/d1 if the compiler is that old.
4233 * Copyright (C) Motorola, Inc. 1991
4234 * All Rights Reserved
4236 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
4237 * The copyright notice above does not evidence any
4238 * actual or intended publication of such source code.
4249 link a6,#-LOCAL_SIZE
4250 movem.l d0-d1/a0-a1,USER_DA(a6)
4251 fmovem.x fp0-fp3,USER_FP0(a6)
4252 fmove.l fpsr,USER_FPSR(a6)
4253 fmove.l fpcr,USER_FPCR(a6)
4254 fmove.l fpcr,d1 ; user's rounding mode/precision
4255 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4257 * copy, convert and tag input argument
4260 fmove.x fp0,ETEMP(a6)
4266 bsr l_sintrz ; normalized (regular) number
4269 cmp.b #$20,d0 ; zero?
4274 cmp.b #$40,d0 ; infinity?
4279 cmp.b #$60,d0 ; NaN?
4284 bsr snzrinx ; assuming a denorm...
4287 fmove.l fpsr,d0 ; update status register
4288 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4291 * Result is now in FP0
4293 movem.l USER_DA(a6),d0-d1/a0-a1
4294 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4300 link a6,#-LOCAL_SIZE
4301 movem.l d0-d1/a0-a1,USER_DA(a6)
4302 fmovem.x fp0-fp3,USER_FP0(a6)
4303 fmove.l fpsr,USER_FPSR(a6)
4304 fmove.l fpcr,USER_FPCR(a6)
4305 fmove.l fpcr,d1 ; user's rounding mode/precision
4306 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4308 * copy, convert and tag input argument
4311 fmove.x fp0,ETEMP(a6)
4317 bsr l_sintrz ; normalized (regular) number
4320 cmp.b #$20,d0 ; zero?
4325 cmp.b #$40,d0 ; infinity?
4330 cmp.b #$60,d0 ; NaN?
4335 bsr snzrinx ; assuming a denorm...
4338 fmove.l fpsr,d0 ; update status register
4339 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4342 * Result is now in FP0
4344 movem.l USER_DA(a6),d0-d1/a0-a1
4345 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4351 link a6,#-LOCAL_SIZE
4352 movem.l d0-d1/a0-a1,USER_DA(a6)
4353 fmovem.x fp0-fp3,USER_FP0(a6)
4354 fmove.l fpsr,USER_FPSR(a6)
4355 fmove.l fpcr,USER_FPCR(a6)
4356 fmove.l fpcr,d1 ; user's rounding mode/precision
4357 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4359 * copy, convert and tag input argument
4362 fmove.x fp0,ETEMP(a6)
4368 bsr l_sintrz ; normalized (regular) number
4371 cmp.b #$20,d0 ; zero?
4376 cmp.b #$40,d0 ; infinity?
4381 cmp.b #$60,d0 ; NaN?
4386 bsr snzrinx ; assuming a denorm...
4389 fmove.l fpsr,d0 ; update status register
4390 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4393 * Result is now in FP0
4395 movem.l USER_DA(a6),d0-d1/a0-a1
4396 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4401 * DYADIC.GEN 1.2 4/30/91
4403 * DYADIC.GEN --- generic DYADIC template
4405 * This version saves all registers that will be used by the emulation
4406 * routines and restores all but FP0 on exit. The FPSR is
4407 * updated to reflect the result of the operation. Return value
4408 * is placed in FP0 for single, double and extended results.
4410 * The package subroutines expect the incoming FPCR to be zeroed
4411 * since they need extended precision to work properly. The
4412 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
4413 * can be properly sized and rounded. Also, if the incoming FPCR
4414 * has enabled any exceptions, the exception will be taken on the
4415 * final fmovem in this template.
4418 * 1. Remove the movem.l at the entry and exit of
4419 * each routine if your compiler treats those
4420 * registers as scratch.
4421 * 2. Likewise, don't save FP0/FP1 if they are scratch
4423 * 3. Delete updating of the fpsr if you only care about
4425 * 4. Remove the frems and fremx entry points if your compiler
4426 * treats everything as doubles.
4427 * 5. Move the result to d0/d1 if the compiler is that old.
4430 * Copyright (C) Motorola, Inc. 1991
4431 * All Rights Reserved
4433 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
4434 * The copyright notice above does not evidence any
4435 * actual or intended publication of such source code.
4442 link a6,#-LOCAL_SIZE
4443 movem.l d0-d1/a0-a1,USER_DA(a6)
4444 fmovem.x fp0-fp3,USER_FP0(a6)
4445 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4446 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4448 * copy, convert and tag input arguments
4451 fmove.x fp0,FPTEMP(a6)
4457 fmove.x fp0,ETEMP(a6)
4464 fmove.l fpsr,d0 ; update status register
4465 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4467 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4471 * Result is now in FP0
4473 movem.l USER_DA(a6),d0-d1/a0-a1
4474 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4480 link a6,#-LOCAL_SIZE
4481 movem.l d0-d1/a0-a1,USER_DA(a6)
4482 fmovem.x fp0-fp3,USER_FP0(a6)
4483 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4484 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4486 * copy, convert and tag input arguments
4489 fmove.x fp0,FPTEMP(a6)
4495 fmove.x fp0,ETEMP(a6)
4502 fmove.l fpsr,d0 ; update status register
4503 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4505 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4509 * Result is now in FP0
4511 movem.l USER_DA(a6),d0-d1/a0-a1
4512 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4518 link a6,#-LOCAL_SIZE
4519 movem.l d0-d1/a0-a1,USER_DA(a6)
4520 fmovem.x fp0-fp3,USER_FP0(a6)
4521 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4522 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4524 * copy, convert and tag input arguments
4527 fmove.x fp0,FPTEMP(a6)
4533 fmove.x fp0,ETEMP(a6)
4540 fmove.l fpsr,d0 ; update status register
4541 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4543 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4547 * Result is now in FP0
4549 movem.l USER_DA(a6),d0-d1/a0-a1
4550 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4555 * DYADIC.GEN 1.2 4/30/91
4557 * DYADIC.GEN --- generic DYADIC template
4559 * This version saves all registers that will be used by the emulation
4560 * routines and restores all but FP0 on exit. The FPSR is
4561 * updated to reflect the result of the operation. Return value
4562 * is placed in FP0 for single, double and extended results.
4564 * The package subroutines expect the incoming FPCR to be zeroed
4565 * since they need extended precision to work properly. The
4566 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
4567 * can be properly sized and rounded. Also, if the incoming FPCR
4568 * has enabled any exceptions, the exception will be taken on the
4569 * final fmovem in this template.
4572 * 1. Remove the movem.l at the entry and exit of
4573 * each routine if your compiler treats those
4574 * registers as scratch.
4575 * 2. Likewise, don't save FP0/FP1 if they are scratch
4577 * 3. Delete updating of the fpsr if you only care about
4579 * 4. Remove the fmods and fmodx entry points if your compiler
4580 * treats everything as doubles.
4581 * 5. Move the result to d0/d1 if the compiler is that old.
4584 * Copyright (C) Motorola, Inc. 1991
4585 * All Rights Reserved
4587 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
4588 * The copyright notice above does not evidence any
4589 * actual or intended publication of such source code.
4596 link a6,#-LOCAL_SIZE
4597 movem.l d0-d1/a0-a1,USER_DA(a6)
4598 fmovem.x fp0-fp3,USER_FP0(a6)
4599 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4600 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4602 * copy, convert and tag input arguments
4605 fmove.x fp0,FPTEMP(a6)
4611 fmove.x fp0,ETEMP(a6)
4618 fmove.l fpsr,d0 ; update status register
4619 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4621 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4625 * Result is now in FP0
4627 movem.l USER_DA(a6),d0-d1/a0-a1
4628 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4634 link a6,#-LOCAL_SIZE
4635 movem.l d0-d1/a0-a1,USER_DA(a6)
4636 fmovem.x fp0-fp3,USER_FP0(a6)
4637 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4638 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4640 * copy, convert and tag input arguments
4643 fmove.x fp0,FPTEMP(a6)
4649 fmove.x fp0,ETEMP(a6)
4656 fmove.l fpsr,d0 ; update status register
4657 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4659 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4663 * Result is now in FP0
4665 movem.l USER_DA(a6),d0-d1/a0-a1
4666 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4672 link a6,#-LOCAL_SIZE
4673 movem.l d0-d1/a0-a1,USER_DA(a6)
4674 fmovem.x fp0-fp3,USER_FP0(a6)
4675 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4676 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4678 * copy, convert and tag input arguments
4681 fmove.x fp0,FPTEMP(a6)
4687 fmove.x fp0,ETEMP(a6)
4694 fmove.l fpsr,d0 ; update status register
4695 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4697 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4701 * Result is now in FP0
4703 movem.l USER_DA(a6),d0-d1/a0-a1
4704 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4709 * DYADIC.GEN 1.2 4/30/91
4711 * DYADIC.GEN --- generic DYADIC template
4713 * This version saves all registers that will be used by the emulation
4714 * routines and restores all but FP0 on exit. The FPSR is
4715 * updated to reflect the result of the operation. Return value
4716 * is placed in FP0 for single, double and extended results.
4718 * The package subroutines expect the incoming FPCR to be zeroed
4719 * since they need extended precision to work properly. The
4720 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
4721 * can be properly sized and rounded. Also, if the incoming FPCR
4722 * has enabled any exceptions, the exception will be taken on the
4723 * final fmovem in this template.
4726 * 1. Remove the movem.l at the entry and exit of
4727 * each routine if your compiler treats those
4728 * registers as scratch.
4729 * 2. Likewise, don't save FP0/FP1 if they are scratch
4731 * 3. Delete updating of the fpsr if you only care about
4733 * 4. Remove the fscales and fscalex entry points if your compiler
4734 * treats everything as doubles.
4735 * 5. Move the result to d0/d1 if the compiler is that old.
4738 * Copyright (C) Motorola, Inc. 1991
4739 * All Rights Reserved
4741 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
4742 * The copyright notice above does not evidence any
4743 * actual or intended publication of such source code.
4750 link a6,#-LOCAL_SIZE
4751 movem.l d0-d1/a0-a1,USER_DA(a6)
4752 fmovem.x fp0-fp3,USER_FP0(a6)
4753 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4754 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4756 * copy, convert and tag input arguments
4759 fmove.x fp0,FPTEMP(a6)
4765 fmove.x fp0,ETEMP(a6)
4772 fmove.l fpsr,d0 ; update status register
4773 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4775 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4779 * Result is now in FP0
4781 movem.l USER_DA(a6),d0-d1/a0-a1
4782 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4788 link a6,#-LOCAL_SIZE
4789 movem.l d0-d1/a0-a1,USER_DA(a6)
4790 fmovem.x fp0-fp3,USER_FP0(a6)
4791 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4792 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4794 * copy, convert and tag input arguments
4797 fmove.x fp0,FPTEMP(a6)
4803 fmove.x fp0,ETEMP(a6)
4810 fmove.l fpsr,d0 ; update status register
4811 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4813 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4817 * Result is now in FP0
4819 movem.l USER_DA(a6),d0-d1/a0-a1
4820 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4826 link a6,#-LOCAL_SIZE
4827 movem.l d0-d1/a0-a1,USER_DA(a6)
4828 fmovem.x fp0-fp3,USER_FP0(a6)
4829 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
4830 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4832 * copy, convert and tag input arguments
4835 fmove.x fp0,FPTEMP(a6)
4841 fmove.x fp0,ETEMP(a6)
4848 fmove.l fpsr,d0 ; update status register
4849 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
4851 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
4855 * Result is now in FP0
4857 movem.l USER_DA(a6),d0-d1/a0-a1
4858 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4863 * MONADIC.GEN 1.4 1/16/92
4865 * MONADIC.GEN 1.3 4/30/91
4867 * MONADIC.GEN --- generic MONADIC template
4869 * This version saves all registers that will be used by the emulation
4870 * routines and restores all but FP0 on exit. The FPSR is
4871 * updated to reflect the result of the operation. Return value
4872 * is placed in FP0 for single, double and extended results.
4874 * The package subroutines expect the incoming FPCR to be zeroed
4875 * since they need extended precision to work properly. The
4876 * 'final' FPCR is expected in d1 so that the calculated result
4877 * can be properly sized and rounded. Also, if the incoming FPCR
4878 * has enabled any exceptions, the exception will be taken on the
4879 * final fmovem in this template.
4882 * 1. Remove the movem.l at the entry and exit of
4883 * each routine if your compiler treats those
4884 * registers as scratch.
4885 * 2. Likewise, don't save FP0/FP1 if they are scratch
4887 * 3. Delete handling of the fpsr if you only care about
4889 * 4. Some (most?) C compilers convert all float arguments
4890 * to double, and provide no support at all for extended
4891 * precision so remove the fabss and fabsx entry points.
4892 * 5. Move the result to d0/d1 if the compiler is that old.
4894 * Copyright (C) Motorola, Inc. 1991
4895 * All Rights Reserved
4897 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
4898 * The copyright notice above does not evidence any
4899 * actual or intended publication of such source code.
4910 link a6,#-LOCAL_SIZE
4911 movem.l d0-d1/a0-a1,USER_DA(a6)
4912 fmovem.x fp0-fp3,USER_FP0(a6)
4913 fmove.l fpsr,USER_FPSR(a6)
4914 fmove.l fpcr,USER_FPCR(a6)
4915 fmove.l fpcr,d1 ; user's rounding mode/precision
4916 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4918 * copy, convert and tag input argument
4921 fmove.x fp0,ETEMP(a6)
4927 bsr sabs ; normalized (regular) number
4930 cmp.b #$20,d0 ; zero?
4935 cmp.b #$40,d0 ; infinity?
4940 cmp.b #$60,d0 ; NaN?
4945 bsr sabs ; assuming a denorm...
4948 fmove.l fpsr,d0 ; update status register
4949 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
4952 * Result is now in FP0
4954 movem.l USER_DA(a6),d0-d1/a0-a1
4955 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
4961 link a6,#-LOCAL_SIZE
4962 movem.l d0-d1/a0-a1,USER_DA(a6)
4963 fmovem.x fp0-fp3,USER_FP0(a6)
4964 fmove.l fpsr,USER_FPSR(a6)
4965 fmove.l fpcr,USER_FPCR(a6)
4966 fmove.l fpcr,d1 ; user's rounding mode/precision
4967 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
4969 * copy, convert and tag input argument
4972 fmove.x fp0,ETEMP(a6)
4978 bsr sabs ; normalized (regular) number
4981 cmp.b #$20,d0 ; zero?
4986 cmp.b #$40,d0 ; infinity?
4991 cmp.b #$60,d0 ; NaN?
4996 bsr sabs ; assuming a denorm...
4999 fmove.l fpsr,d0 ; update status register
5000 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5003 * Result is now in FP0
5005 movem.l USER_DA(a6),d0-d1/a0-a1
5006 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5012 link a6,#-LOCAL_SIZE
5013 movem.l d0-d1/a0-a1,USER_DA(a6)
5014 fmovem.x fp0-fp3,USER_FP0(a6)
5015 fmove.l fpsr,USER_FPSR(a6)
5016 fmove.l fpcr,USER_FPCR(a6)
5017 fmove.l fpcr,d1 ; user's rounding mode/precision
5018 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5020 * copy, convert and tag input argument
5023 fmove.x fp0,ETEMP(a6)
5029 bsr sabs ; normalized (regular) number
5032 cmp.b #$20,d0 ; zero?
5037 cmp.b #$40,d0 ; infinity?
5042 cmp.b #$60,d0 ; NaN?
5047 bsr sabs ; assuming a denorm...
5050 fmove.l fpsr,d0 ; update status register
5051 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5054 * Result is now in FP0
5056 movem.l USER_DA(a6),d0-d1/a0-a1
5057 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5062 * MONADIC.GEN 1.4 1/16/92
5064 * MONADIC.GEN 1.3 4/30/91
5066 * MONADIC.GEN --- generic MONADIC template
5068 * This version saves all registers that will be used by the emulation
5069 * routines and restores all but FP0 on exit. The FPSR is
5070 * updated to reflect the result of the operation. Return value
5071 * is placed in FP0 for single, double and extended results.
5073 * The package subroutines expect the incoming FPCR to be zeroed
5074 * since they need extended precision to work properly. The
5075 * 'final' FPCR is expected in d1 so that the calculated result
5076 * can be properly sized and rounded. Also, if the incoming FPCR
5077 * has enabled any exceptions, the exception will be taken on the
5078 * final fmovem in this template.
5081 * 1. Remove the movem.l at the entry and exit of
5082 * each routine if your compiler treats those
5083 * registers as scratch.
5084 * 2. Likewise, don't save FP0/FP1 if they are scratch
5086 * 3. Delete handling of the fpsr if you only care about
5088 * 4. Some (most?) C compilers convert all float arguments
5089 * to double, and provide no support at all for extended
5090 * precision so remove the fnegs and fnegx entry points.
5091 * 5. Move the result to d0/d1 if the compiler is that old.
5093 * Copyright (C) Motorola, Inc. 1991
5094 * All Rights Reserved
5096 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
5097 * The copyright notice above does not evidence any
5098 * actual or intended publication of such source code.
5109 link a6,#-LOCAL_SIZE
5110 movem.l d0-d1/a0-a1,USER_DA(a6)
5111 fmovem.x fp0-fp3,USER_FP0(a6)
5112 fmove.l fpsr,USER_FPSR(a6)
5113 fmove.l fpcr,USER_FPCR(a6)
5114 fmove.l fpcr,d1 ; user's rounding mode/precision
5115 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5117 * copy, convert and tag input argument
5120 fmove.x fp0,ETEMP(a6)
5126 bsr sneg ; normalized (regular) number
5129 cmp.b #$20,d0 ; zero?
5134 cmp.b #$40,d0 ; infinity?
5139 cmp.b #$60,d0 ; NaN?
5144 bsr sneg ; assuming a denorm...
5147 fmove.l fpsr,d0 ; update status register
5148 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5151 * Result is now in FP0
5153 movem.l USER_DA(a6),d0-d1/a0-a1
5154 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5160 link a6,#-LOCAL_SIZE
5161 movem.l d0-d1/a0-a1,USER_DA(a6)
5162 fmovem.x fp0-fp3,USER_FP0(a6)
5163 fmove.l fpsr,USER_FPSR(a6)
5164 fmove.l fpcr,USER_FPCR(a6)
5165 fmove.l fpcr,d1 ; user's rounding mode/precision
5166 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5168 * copy, convert and tag input argument
5171 fmove.x fp0,ETEMP(a6)
5177 bsr sneg ; normalized (regular) number
5180 cmp.b #$20,d0 ; zero?
5185 cmp.b #$40,d0 ; infinity?
5190 cmp.b #$60,d0 ; NaN?
5195 bsr sneg ; assuming a denorm...
5198 fmove.l fpsr,d0 ; update status register
5199 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5202 * Result is now in FP0
5204 movem.l USER_DA(a6),d0-d1/a0-a1
5205 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5211 link a6,#-LOCAL_SIZE
5212 movem.l d0-d1/a0-a1,USER_DA(a6)
5213 fmovem.x fp0-fp3,USER_FP0(a6)
5214 fmove.l fpsr,USER_FPSR(a6)
5215 fmove.l fpcr,USER_FPCR(a6)
5216 fmove.l fpcr,d1 ; user's rounding mode/precision
5217 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5219 * copy, convert and tag input argument
5222 fmove.x fp0,ETEMP(a6)
5228 bsr sneg ; normalized (regular) number
5231 cmp.b #$20,d0 ; zero?
5236 cmp.b #$40,d0 ; infinity?
5241 cmp.b #$60,d0 ; NaN?
5246 bsr sneg ; assuming a denorm...
5249 fmove.l fpsr,d0 ; update status register
5250 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5253 * Result is now in FP0
5255 movem.l USER_DA(a6),d0-d1/a0-a1
5256 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5261 * MONADIC.GEN 1.4 1/16/92
5263 * MONADIC.GEN 1.3 4/30/91
5265 * MONADIC.GEN --- generic MONADIC template
5267 * This version saves all registers that will be used by the emulation
5268 * routines and restores all but FP0 on exit. The FPSR is
5269 * updated to reflect the result of the operation. Return value
5270 * is placed in FP0 for single, double and extended results.
5272 * The package subroutines expect the incoming FPCR to be zeroed
5273 * since they need extended precision to work properly. The
5274 * 'final' FPCR is expected in d1 so that the calculated result
5275 * can be properly sized and rounded. Also, if the incoming FPCR
5276 * has enabled any exceptions, the exception will be taken on the
5277 * final fmovem in this template.
5280 * 1. Remove the movem.l at the entry and exit of
5281 * each routine if your compiler treats those
5282 * registers as scratch.
5283 * 2. Likewise, don't save FP0/FP1 if they are scratch
5285 * 3. Delete handling of the fpsr if you only care about
5287 * 4. Some (most?) C compilers convert all float arguments
5288 * to double, and provide no support at all for extended
5289 * precision so remove the fsqrts and fsqrtx entry points.
5290 * 5. Move the result to d0/d1 if the compiler is that old.
5292 * Copyright (C) Motorola, Inc. 1991
5293 * All Rights Reserved
5295 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
5296 * The copyright notice above does not evidence any
5297 * actual or intended publication of such source code.
5308 link a6,#-LOCAL_SIZE
5309 movem.l d0-d1/a0-a1,USER_DA(a6)
5310 fmovem.x fp0-fp3,USER_FP0(a6)
5311 fmove.l fpsr,USER_FPSR(a6)
5312 fmove.l fpcr,USER_FPCR(a6)
5313 fmove.l fpcr,d1 ; user's rounding mode/precision
5314 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5316 * copy, convert and tag input argument
5319 fmove.x fp0,ETEMP(a6)
5325 bsr ssqrt ; normalized (regular) number
5328 cmp.b #$20,d0 ; zero?
5333 cmp.b #$40,d0 ; infinity?
5338 cmp.b #$60,d0 ; NaN?
5343 bsr ssqrt ; assuming a denorm...
5346 fmove.l fpsr,d0 ; update status register
5347 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5350 * Result is now in FP0
5352 movem.l USER_DA(a6),d0-d1/a0-a1
5353 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5359 link a6,#-LOCAL_SIZE
5360 movem.l d0-d1/a0-a1,USER_DA(a6)
5361 fmovem.x fp0-fp3,USER_FP0(a6)
5362 fmove.l fpsr,USER_FPSR(a6)
5363 fmove.l fpcr,USER_FPCR(a6)
5364 fmove.l fpcr,d1 ; user's rounding mode/precision
5365 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5367 * copy, convert and tag input argument
5370 fmove.x fp0,ETEMP(a6)
5376 bsr ssqrt ; normalized (regular) number
5379 cmp.b #$20,d0 ; zero?
5384 cmp.b #$40,d0 ; infinity?
5389 cmp.b #$60,d0 ; NaN?
5394 bsr ssqrt ; assuming a denorm...
5397 fmove.l fpsr,d0 ; update status register
5398 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5401 * Result is now in FP0
5403 movem.l USER_DA(a6),d0-d1/a0-a1
5404 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5410 link a6,#-LOCAL_SIZE
5411 movem.l d0-d1/a0-a1,USER_DA(a6)
5412 fmovem.x fp0-fp3,USER_FP0(a6)
5413 fmove.l fpsr,USER_FPSR(a6)
5414 fmove.l fpcr,USER_FPCR(a6)
5415 fmove.l fpcr,d1 ; user's rounding mode/precision
5416 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5418 * copy, convert and tag input argument
5421 fmove.x fp0,ETEMP(a6)
5427 bsr ssqrt ; normalized (regular) number
5430 cmp.b #$20,d0 ; zero?
5435 cmp.b #$40,d0 ; infinity?
5440 cmp.b #$60,d0 ; NaN?
5445 bsr ssqrt ; assuming a denorm...
5448 fmove.l fpsr,d0 ; update status register
5449 or.b USER_FPSR+3(a6),d0 ;add previously accrued exceptions
5452 * Result is now in FP0
5454 movem.l USER_DA(a6),d0-d1/a0-a1
5455 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5460 * DYADIC.GEN 1.2 4/30/91
5462 * DYADIC.GEN --- generic DYADIC template
5464 * This version saves all registers that will be used by the emulation
5465 * routines and restores all but FP0 on exit. The FPSR is
5466 * updated to reflect the result of the operation. Return value
5467 * is placed in FP0 for single, double and extended results.
5469 * The package subroutines expect the incoming FPCR to be zeroed
5470 * since they need extended precision to work properly. The
5471 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
5472 * can be properly sized and rounded. Also, if the incoming FPCR
5473 * has enabled any exceptions, the exception will be taken on the
5474 * final fmovem in this template.
5477 * 1. Remove the movem.l at the entry and exit of
5478 * each routine if your compiler treats those
5479 * registers as scratch.
5480 * 2. Likewise, don't save FP0/FP1 if they are scratch
5482 * 3. Delete updating of the fpsr if you only care about
5484 * 4. Remove the fadds and faddx entry points if your compiler
5485 * treats everything as doubles.
5486 * 5. Move the result to d0/d1 if the compiler is that old.
5489 * Copyright (C) Motorola, Inc. 1991
5490 * All Rights Reserved
5492 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
5493 * The copyright notice above does not evidence any
5494 * actual or intended publication of such source code.
5501 link a6,#-LOCAL_SIZE
5502 movem.l d0-d1/a0-a1,USER_DA(a6)
5503 fmovem.x fp0-fp3,USER_FP0(a6)
5504 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5505 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5507 * copy, convert and tag input arguments
5510 fmove.x fp0,FPTEMP(a6)
5516 fmove.x fp0,ETEMP(a6)
5523 fmove.l fpsr,d0 ; update status register
5524 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5526 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5530 * Result is now in FP0
5532 movem.l USER_DA(a6),d0-d1/a0-a1
5533 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5539 link a6,#-LOCAL_SIZE
5540 movem.l d0-d1/a0-a1,USER_DA(a6)
5541 fmovem.x fp0-fp3,USER_FP0(a6)
5542 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5543 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5545 * copy, convert and tag input arguments
5548 fmove.x fp0,FPTEMP(a6)
5554 fmove.x fp0,ETEMP(a6)
5561 fmove.l fpsr,d0 ; update status register
5562 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5564 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5568 * Result is now in FP0
5570 movem.l USER_DA(a6),d0-d1/a0-a1
5571 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5577 link a6,#-LOCAL_SIZE
5578 movem.l d0-d1/a0-a1,USER_DA(a6)
5579 fmovem.x fp0-fp3,USER_FP0(a6)
5580 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5581 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5583 * copy, convert and tag input arguments
5586 fmove.x fp0,FPTEMP(a6)
5592 fmove.x fp0,ETEMP(a6)
5599 fmove.l fpsr,d0 ; update status register
5600 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5602 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5606 * Result is now in FP0
5608 movem.l USER_DA(a6),d0-d1/a0-a1
5609 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5614 * DYADIC.GEN 1.2 4/30/91
5616 * DYADIC.GEN --- generic DYADIC template
5618 * This version saves all registers that will be used by the emulation
5619 * routines and restores all but FP0 on exit. The FPSR is
5620 * updated to reflect the result of the operation. Return value
5621 * is placed in FP0 for single, double and extended results.
5623 * The package subroutines expect the incoming FPCR to be zeroed
5624 * since they need extended precision to work properly. The
5625 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
5626 * can be properly sized and rounded. Also, if the incoming FPCR
5627 * has enabled any exceptions, the exception will be taken on the
5628 * final fmovem in this template.
5631 * 1. Remove the movem.l at the entry and exit of
5632 * each routine if your compiler treats those
5633 * registers as scratch.
5634 * 2. Likewise, don't save FP0/FP1 if they are scratch
5636 * 3. Delete updating of the fpsr if you only care about
5638 * 4. Remove the fsubs and fsubx entry points if your compiler
5639 * treats everything as doubles.
5640 * 5. Move the result to d0/d1 if the compiler is that old.
5643 * Copyright (C) Motorola, Inc. 1991
5644 * All Rights Reserved
5646 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
5647 * The copyright notice above does not evidence any
5648 * actual or intended publication of such source code.
5655 link a6,#-LOCAL_SIZE
5656 movem.l d0-d1/a0-a1,USER_DA(a6)
5657 fmovem.x fp0-fp3,USER_FP0(a6)
5658 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5659 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5661 * copy, convert and tag input arguments
5664 fmove.x fp0,FPTEMP(a6)
5670 fmove.x fp0,ETEMP(a6)
5677 fmove.l fpsr,d0 ; update status register
5678 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5680 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5684 * Result is now in FP0
5686 movem.l USER_DA(a6),d0-d1/a0-a1
5687 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5693 link a6,#-LOCAL_SIZE
5694 movem.l d0-d1/a0-a1,USER_DA(a6)
5695 fmovem.x fp0-fp3,USER_FP0(a6)
5696 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5697 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5699 * copy, convert and tag input arguments
5702 fmove.x fp0,FPTEMP(a6)
5708 fmove.x fp0,ETEMP(a6)
5715 fmove.l fpsr,d0 ; update status register
5716 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5718 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5722 * Result is now in FP0
5724 movem.l USER_DA(a6),d0-d1/a0-a1
5725 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5731 link a6,#-LOCAL_SIZE
5732 movem.l d0-d1/a0-a1,USER_DA(a6)
5733 fmovem.x fp0-fp3,USER_FP0(a6)
5734 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5735 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5737 * copy, convert and tag input arguments
5740 fmove.x fp0,FPTEMP(a6)
5746 fmove.x fp0,ETEMP(a6)
5753 fmove.l fpsr,d0 ; update status register
5754 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5756 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5760 * Result is now in FP0
5762 movem.l USER_DA(a6),d0-d1/a0-a1
5763 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5768 * DYADIC.GEN 1.2 4/30/91
5770 * DYADIC.GEN --- generic DYADIC template
5772 * This version saves all registers that will be used by the emulation
5773 * routines and restores all but FP0 on exit. The FPSR is
5774 * updated to reflect the result of the operation. Return value
5775 * is placed in FP0 for single, double and extended results.
5777 * The package subroutines expect the incoming FPCR to be zeroed
5778 * since they need extended precision to work properly. The
5779 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
5780 * can be properly sized and rounded. Also, if the incoming FPCR
5781 * has enabled any exceptions, the exception will be taken on the
5782 * final fmovem in this template.
5785 * 1. Remove the movem.l at the entry and exit of
5786 * each routine if your compiler treats those
5787 * registers as scratch.
5788 * 2. Likewise, don't save FP0/FP1 if they are scratch
5790 * 3. Delete updating of the fpsr if you only care about
5792 * 4. Remove the fmuls and fmulx entry points if your compiler
5793 * treats everything as doubles.
5794 * 5. Move the result to d0/d1 if the compiler is that old.
5797 * Copyright (C) Motorola, Inc. 1991
5798 * All Rights Reserved
5800 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
5801 * The copyright notice above does not evidence any
5802 * actual or intended publication of such source code.
5809 link a6,#-LOCAL_SIZE
5810 movem.l d0-d1/a0-a1,USER_DA(a6)
5811 fmovem.x fp0-fp3,USER_FP0(a6)
5812 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5813 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5815 * copy, convert and tag input arguments
5818 fmove.x fp0,FPTEMP(a6)
5824 fmove.x fp0,ETEMP(a6)
5831 fmove.l fpsr,d0 ; update status register
5832 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5834 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5838 * Result is now in FP0
5840 movem.l USER_DA(a6),d0-d1/a0-a1
5841 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5847 link a6,#-LOCAL_SIZE
5848 movem.l d0-d1/a0-a1,USER_DA(a6)
5849 fmovem.x fp0-fp3,USER_FP0(a6)
5850 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5851 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5853 * copy, convert and tag input arguments
5856 fmove.x fp0,FPTEMP(a6)
5862 fmove.x fp0,ETEMP(a6)
5869 fmove.l fpsr,d0 ; update status register
5870 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5872 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5876 * Result is now in FP0
5878 movem.l USER_DA(a6),d0-d1/a0-a1
5879 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5885 link a6,#-LOCAL_SIZE
5886 movem.l d0-d1/a0-a1,USER_DA(a6)
5887 fmovem.x fp0-fp3,USER_FP0(a6)
5888 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5889 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5891 * copy, convert and tag input arguments
5894 fmove.x fp0,FPTEMP(a6)
5900 fmove.x fp0,ETEMP(a6)
5907 fmove.l fpsr,d0 ; update status register
5908 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5910 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5914 * Result is now in FP0
5916 movem.l USER_DA(a6),d0-d1/a0-a1
5917 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
5922 * DYADIC.GEN 1.2 4/30/91
5924 * DYADIC.GEN --- generic DYADIC template
5926 * This version saves all registers that will be used by the emulation
5927 * routines and restores all but FP0 on exit. The FPSR is
5928 * updated to reflect the result of the operation. Return value
5929 * is placed in FP0 for single, double and extended results.
5931 * The package subroutines expect the incoming FPCR to be zeroed
5932 * since they need extended precision to work properly. The
5933 * 'final' FPCR is expected in USER_FPCR(a6) so that the calculated result
5934 * can be properly sized and rounded. Also, if the incoming FPCR
5935 * has enabled any exceptions, the exception will be taken on the
5936 * final fmovem in this template.
5939 * 1. Remove the movem.l at the entry and exit of
5940 * each routine if your compiler treats those
5941 * registers as scratch.
5942 * 2. Likewise, don't save FP0/FP1 if they are scratch
5944 * 3. Delete updating of the fpsr if you only care about
5946 * 4. Remove the fdivs and fdivx entry points if your compiler
5947 * treats everything as doubles.
5948 * 5. Move the result to d0/d1 if the compiler is that old.
5951 * Copyright (C) Motorola, Inc. 1991
5952 * All Rights Reserved
5954 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF MOTOROLA
5955 * The copyright notice above does not evidence any
5956 * actual or intended publication of such source code.
5963 link a6,#-LOCAL_SIZE
5964 movem.l d0-d1/a0-a1,USER_DA(a6)
5965 fmovem.x fp0-fp3,USER_FP0(a6)
5966 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
5967 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
5969 * copy, convert and tag input arguments
5972 fmove.x fp0,FPTEMP(a6)
5978 fmove.x fp0,ETEMP(a6)
5985 fmove.l fpsr,d0 ; update status register
5986 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
5988 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
5992 * Result is now in FP0
5994 movem.l USER_DA(a6),d0-d1/a0-a1
5995 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
6001 link a6,#-LOCAL_SIZE
6002 movem.l d0-d1/a0-a1,USER_DA(a6)
6003 fmovem.x fp0-fp3,USER_FP0(a6)
6004 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
6005 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
6007 * copy, convert and tag input arguments
6010 fmove.x fp0,FPTEMP(a6)
6016 fmove.x fp0,ETEMP(a6)
6023 fmove.l fpsr,d0 ; update status register
6024 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
6026 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
6030 * Result is now in FP0
6032 movem.l USER_DA(a6),d0-d1/a0-a1
6033 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored
6039 link a6,#-LOCAL_SIZE
6040 movem.l d0-d1/a0-a1,USER_DA(a6)
6041 fmovem.x fp0-fp3,USER_FP0(a6)
6042 fmovem.l fpsr/fpcr,USER_FPSR(a6) ; user's rounding mode/precision
6043 fmove.l #0,fpcr ; force rounding mode/prec to extended,rn
6045 * copy, convert and tag input arguments
6048 fmove.x fp0,FPTEMP(a6)
6054 fmove.x fp0,ETEMP(a6)
6061 fmove.l fpsr,d0 ; update status register
6062 or.b FPSR_AEXCEPT(a6),d0 ;add previously accrued exceptions
6064 or.b FPSR_QBYTE(a6),d0 ; pickup sign of quotient byte
6068 * Result is now in FP0
6070 movem.l USER_DA(a6),d0-d1/a0-a1
6071 fmovem.x USER_FP1(a6),fp1-fp3 ; note: FP0 not restored