Lines Matching +full:1 +full:a0

9  * 1. Redistributions of source code must retain the above copyright
50 * only the lower half) most function have to return the %a0
64 jmi 1f
66 jmi 1f
69 1: printf ,"oops:%p,%p,%p\n",3,%a2@(TASK_MM-8),%a2@(TASK_MM-4),%a2@(TASK_MM)
95 | %a0 = destination (ptr to struct fp_ext)
98 printf PCONV,"l2e: %p -> %p(",2,%d0,%a0
102 jpl 1f | positive?
103 moveq #1,%d1
105 1: swap %d1
107 move.l %d1,(%a0)+ | set sign / exp
108 move.l %d0,(%a0)+ | set mantissa
109 clr.l (%a0)
110 subq.l #8,%a0 | restore %a0
111 printx PCONV,%a0@
116 clr.l (%a0)+
117 clr.l (%a0)+
118 clr.l (%a0)
119 subq.l #8,%a0
120 printx PCONV,%a0@
126 | %a0 = dest (struct fp_ext *)
129 printf PCONV,"s2e: %p -> %p(",2,%d0,%a0
140 9: move.l %d1,(%a0)+ | fp_ext.sign, fp_ext.exp
141 move.l %d0,(%a0)+ | high lword of fp_ext.mant
142 clr.l (%a0) | low lword = 0
143 subq.l #8,%a0
144 printx PCONV,%a0@
164 printf PCONV,"d2e: %p%p -> %p(",3,%d0,%d1,%a0
178 9: move.l %d1,(%a0)+ | fp_ext.sign, fp_ext.exp
179 move.l %d0,(%a0)+
184 move.l %d0,(%a0)
187 or.l %d1,-(%a0)
188 subq.l #4,%a0
189 printx PCONV,%a0@
209 | args: %a0 = dest (struct fp_ext *)
210 | returns 0 in %d0 for a NaN, otherwise 1
213 printf PCONV,"e2e: %p(",1,%a0
214 printx PCONV,%a0@
216 move.l (%a0)+,%d0
219 move.l (%a0),%d0
223 subq.l #4,%a0
225 move.b (%a0),%d0
228 printf PCONV,"%p(",1,%a0
229 printx PCONV,%a0@
231 moveq #1,%d0
236 clr.b (%a0)
241 btst #0,(11,%a0) | test lsb bit
243 lsl.b #1,%d0 | check low bits
246 addq.l #1,(8,%a0)
248 addq.l #1,(4,%a0)
250 move.w #0x8000,(4,%a0)
251 addq.w #1,(2,%a0)
252 9: printf PNORM,"%p(",1,%a0
253 printx PNORM,%a0@
259 jhi 1f | %d2 > 2, round to +infinity
260 tst.b (1,%a0) | to -inf
263 1: tst.b (1,%a0) | to +inf
271 move.l (4,%a0),%d0
275 move.b (-4,%a0),%d0
279 clr.w -(%a0)
280 subq.l #2,%a0
281 printf PNORM,"%p(",1,%a0
282 printx PNORM,%a0@
284 moveq #1,%d0
289 move.w -(%a0),%d2
291 jcc 1f
295 1: move.w %d2,(%a0)+
300 move.l %d0,(%a0)+
301 move.l (%a0),%d0
304 move.l %d0,(%a0)
308 or.l %d1,-(%a0)
312 move.b (-4,%a0),%d0
315 jcc 1f
316 clr.b (-4,%a0)
318 or.l %d0,(4,%a0)
320 1: addq.w #8,%d2
322 move.b %d0,(-4,%a0)
324 or.l %d0,(4,%a0)
331 move.w -(%a0),%d2
333 jcc 1f
337 1: move.w %d2,(%a0)+
340 clr.l (4,%a0)
342 jcs 1f
344 move.l %d0,(%a0) | into the higher lword
347 move.b (-4,%a0),%d0
348 clr.b (-4,%a0)
351 bfins %d0,(%a0){%d1,#8}
354 1: neg.w %d1 | lower lword is splitted between
355 bfins %d0,(%a0){%d1,#32} | higher and lower lword
366 move.w -(%a0),%d2
368 jcc 1f
372 1: move.w %d2,(%a0)+
377 1: clr.b (-4,%a0)
379 jcs 1f
382 move.l %d0,(%a0)
384 1: neg.w %d1
385 bfins %d0,(%a0){%d1,#8}
388 move.b %d0,(-4,%a0)
390 move.b %d0,(7,%a0)
393 1: move.l %d0,%d1 | lower lword is splitted between
395 move.l %d0,(%a0)
400 move.l %d0,-(%a0)
404 move.l (%a0)+,%d0
406 1: tst.l (%a0)
408 moveq #1,%d0
409 2: subq.l #8,%a0
410 printf PCONV,"%p(",1,%a0
411 printx PCONV,%a0@
415 3: lsl.l #1,%d0
416 jeq 1b
434 | args: %a0 (struct fp_ext *)
435 | NOTE: it does _not_ modify %a0/%a1 and the upper word of %d2
438 printf PNORM,"ne: %p(",1,%a0
439 printx PNORM,%a0@
441 move.l (%a0)+,%d0
444 move.l (%a0),%d0
448 subq.l #4,%a0
450 move.b (%a0),%d0
453 printf PNORM,"%p(",1,%a0
454 printx PNORM,%a0@
460 clr.b (%a0)
465 btst #0,(11,%a0) | test lsb bit
467 lsl.b #1,%d0 | check low bits
470 addq.l #1,(8,%a0)
472 addq.l #1,(4,%a0)
474 addq.w #1,(2,%a0)
475 move.w #0x8000,(4,%a0)
476 9: printf PNORM,"%p(",1,%a0
477 printx PNORM,%a0@
483 jhi 1f | %d2 > 2, round to +infinity
484 tst.b (1,%a0) | to -inf
487 1: tst.b (1,%a0) | to +inf
496 move.l (4,%a0),%d0
500 move.b (-4,%a0),%d0
504 clr.w -(%a0)
505 subq.l #2,%a0
506 printf PNORM,"%p(",1,%a0
507 printx PNORM,%a0@
513 move.w -(%a0),%d2
515 jcc 1f
520 1: move.w %d2,(%a0)+
525 move.l %d0,(%a0)+
526 move.l (%a0),%d0
529 move.l %d0,(%a0)
533 or.l %d1,-(%a0)
537 move.b (-4,%a0),%d0
540 jcc 1f
541 clr.b (-4,%a0)
543 or.l %d0,(4,%a0)
545 1: addq.w #8,%d2
547 move.b %d0,(-4,%a0)
549 or.l %d0,(4,%a0)
556 move.w -(%a0),%d2
558 jcc 1f
563 1: move.w %d2,(%a0)+
566 clr.l (4,%a0)
568 jcs 1f
570 move.l %d0,(%a0) | into the higher lword
573 move.b (-4,%a0),%d0
574 clr.b (-4,%a0)
577 bfins %d0,(%a0){%d1,#8}
580 1: neg.w %d1 | lower lword is splitted between
581 bfins %d0,(%a0){%d1,#32} | higher and lower lword
592 move.w -(%a0),%d2
594 jcc 1f
598 1: move.w %d2,(%a0)+
603 1: clr.b (-4,%a0)
605 jcs 1f
608 move.l %d0,(%a0)
610 1: neg.w %d1
611 bfins %d0,(%a0){%d1,#8}
614 move.b %d0,(-4,%a0)
616 move.b %d0,(7,%a0)
621 move.l (%a0)+,%d0
623 1: tst.l (%a0)
625 2: subq.l #8,%a0
626 printf PNORM,"%p(",1,%a0
627 printx PNORM,%a0@
632 lsl.l #1,%d1
634 clr.l (-4,%a0)
635 jra 1b
640 move.l %d0,(-4,%a0)
646 | 1: Round to zero
657 | args: %a0 (struct fp_ext *)
660 printf PNORM,"nd: %p(",1,%a0
661 printx PNORM,%a0@
663 move.l (%a0)+,%d2
672 addq.l #4,%a0
673 move.l (%a0),%d0 | low lword of mantissa
680 9: subq.l #8,%a0
681 printf PNORM,"%p(",1,%a0
682 printx PNORM,%a0@
689 and.w #0xf800,(2,%a0) | clear bits 0-10
704 lsl.l #1,%d0 | check low bits
708 add.l #0x800,(%a0)
710 addq.l #1,-(%a0) | extend to high lword
711 jcc 1f | no overflow, good.
715 move.w #0x8000,(%a0)
716 addq.w #1,-(%a0)
717 cmp.w #0x43ff,(%a0)+ | exponent now overflown?
719 1: subq.l #4,%a0
720 printf PNORM,"%p(",1,%a0
721 printx PNORM,%a0@
741 move.w #0x3c01,(-2,%a0) | 2**-1022
744 jcc 1f
746 move.l (%a0),%d0
749 move.l %d0,(%a0)+
750 move.l (%a0),%d0
756 move.l (%a0),%d1
757 move.l %d0,(%a0)
764 1: sub.w #32,%d2
767 move.l (%a0),%d0
768 clr.l (%a0)+
774 tst.l (%a0)
775 jeq 1f
777 1: move.l %d0,(%a0)
783 2: clr.l (%a0)+
784 clr.l (%a0)
785 moveq #1,%d0 | Smallest possible fraction,
789 tst.l (%a0)+
790 jne 1f
791 tst.l (%a0)
792 jne 1f
793 subq.l #8,%a0
794 printf PNORM,"%p(",1,%a0
795 printx PNORM,%a0@
803 1: fp_set_sr FPSR_EXC_UNFL | Set UNFL bit
804 clr.l (%a0)
805 clr.l -(%a0)
806 move.w #0x3c01,-(%a0) | i.e. 2**-1022
807 addq.l #6,%a0
808 moveq #1,%d0
813 and.w (6,%a0),%d0
814 jeq 1f
816 1: fp_set_sr FPSR_EXC_OVFL
819 1: move.w #0x7fff,(-2,%a0)
820 clr.l (%a0)+
821 clr.l (%a0)
822 2: subq.l #8,%a0
823 printf PNORM,"%p(",1,%a0
824 printx PNORM,%a0@
830 tst.b (-3,%a0) | to -inf
831 jne 1b
833 4: tst.b (-3,%a0) | to +inf
834 jeq 1b
835 5: move.w #0x43fe,(-2,%a0)
836 moveq #-1,%d0
837 move.l %d0,(%a0)+
839 move.l %d0,(%a0)
843 subq.l #4,%a0
844 printf PNORM,"%p(",1,%a0
845 printx PNORM,%a0@
851 | args: %a0 (struct fp_ext *)
854 printf PNORM,"ns: %p(",1,%a0
855 printx PNORM,%a0@
857 addq.l #2,%a0
858 move.w (%a0)+,%d2
866 move.l (%a0)+,%d0 | get high lword of mantissa
868 tst.l (%a0) | check the low lword
869 jeq 1f
874 1: clr.l (%a0) | zap it from memory.
879 subq.l #8,%a0
880 printf PNORM,"%p(",1,%a0
881 printx PNORM,%a0@
886 clr.b -(%a0) | clear low byte of high lword
887 subq.l #3,%a0
895 lsl.b #1,%d0 | check low bits
899 add.l #0x100,(%a0)
904 move.w #0x8000,(%a0)
905 addq.w #1,-(%a0)
906 cmp.w #0x407f,(%a0)+ | exponent now overflown?
908 9: subq.l #4,%a0
909 printf PNORM,"%p(",1,%a0
910 printx PNORM,%a0@
917 tst.b (-3,%a0) | to -inf
920 3: tst.b (-3,%a0) | to +inf
927 move.w #0x3f81,(-2,%a0) | 2**-126
932 move.l (%a0),%d0
935 move.l %d0,(%a0)+
940 jeq 1f
943 1: tst.l (%a0)
945 clr (%a0)
949 2: clr.l (%a0)+
950 clr.l (%a0)
951 moveq #1,%d0 | Smallest possible fraction,
955 tst.b (3,%a0)
956 jeq 1f
958 1: fp_set_sr FPSR_EXC_OVFL
961 1: move.w #0x7fff,(-2,%a0)
962 clr.l (%a0)+
963 clr.l (%a0)
964 2: subq.l #8,%a0
965 printf PNORM,"%p(",1,%a0
966 printx PNORM,%a0@
972 tst.b (-3,%a0) | to -inf
973 jne 1b
975 4: tst.b (-3,%a0) | to +inf
976 jeq 1b
977 5: move.w #0x407e,(-2,%a0)
978 move.l #0xffffff00,(%a0)+
979 clr.l (%a0)
983 tst.l (%a0)+
984 jne 1f
985 tst.l (%a0)
986 jne 1f
987 subq.l #8,%a0
988 printf PNORM,"%p(",1,%a0
989 printx PNORM,%a0@
997 1: fp_set_sr FPSR_EXC_UNFL | Set UNFL bit
998 clr.l (%a0)
999 clr.l -(%a0)
1000 move.w #0x3f81,-(%a0) | i.e. 2**-126
1001 addq.l #6,%a0
1002 moveq #1,%d0
1006 subq.l #4,%a0
1007 printf PNORM,"%p(",1,%a0
1008 printx PNORM,%a0@
1016 | args: %a0 (struct fp_ext *)
1019 printf PNORM,"nsf: %p(",1,%a0
1020 printx PNORM,%a0@
1022 addq.l #2,%a0
1023 move.w (%a0)+,%d2
1026 move.l (%a0)+,%d0 | get high lword of mantissa
1028 tst.l (%a0) | check the low lword
1029 jeq 1f
1034 1: clr.l (%a0) | zap it from memory.
1039 subq.l #8,%a0
1040 printf PNORM,"%p(",1,%a0
1041 printx PNORM,%a0@
1046 clr.b -(%a0) | clear low byte of high lword
1047 subq.l #3,%a0
1055 lsl.b #1,%d0 | check low bits
1059 add.l #0x100,(%a0)
1064 move.w #0x8000,(%a0)
1065 addq.w #1,-(%a0)
1066 cmp.w #0x407f,(%a0)+ | exponent now overflown?
1068 9: subq.l #4,%a0
1069 printf PNORM,"%p(",1,%a0
1070 printx PNORM,%a0@
1077 tst.b (-3,%a0) | to -inf
1080 3: tst.b (-3,%a0) | to +inf
1085 tst.b (3,%a0)
1086 jeq 1f
1088 1: fp_set_sr FPSR_EXC_OVFL
1091 1: move.w #0x7fff,(-2,%a0)
1092 clr.l (%a0)+
1093 clr.l (%a0)
1094 2: subq.l #8,%a0
1095 printf PNORM,"%p(",1,%a0
1096 printx PNORM,%a0@
1102 tst.b (-3,%a0) | to -inf
1103 jne 1b
1105 4: tst.b (-3,%a0) | to +inf
1106 jeq 1b
1107 5: move.w #0x407e,(-2,%a0)
1108 move.l #0xffffff00,(%a0)+
1109 clr.l (%a0)
1113 subq.l #4,%a0
1114 printf PNORM,"%p(",1,%a0
1115 printx PNORM,%a0@
1129 | %a0: source (struct fp_ext *)
1134 .set inf,(1<<(\b-1))-1 | i.e. MAXINT
1135 printf PCONV,"e2i%d: %p(",2,#\b,%a0
1136 printx PCONV,%a0@
1138 addq.l #2,%a0
1139 move.w (%a0)+,%d2 | exponent
1147 move.l (%a0),%d0
1151 tst.l (4,%a0)
1156 9: tst.w (-4,%a0)
1157 jne 1f
1160 printf PCONV,"-> %p\n",1,%d0
1162 1: neg.\s %d0
1163 jeq 1f
1165 1: printf PCONV,"-> %p\n",1,%d0
1181 lsl.l #1,%d1 | check low bits
1183 tst.l (4,%a0)
1186 addq.l #1,%d0
1192 tst.w (-4,%a0) | to -inf
1195 3: tst.w (-4,%a0) | to +inf
1204 move.l (4,%a0),%d1 | test guard bit
1206 lsl.l #1,%d1 | check low bits
1212 tst.l (%a0)+
1213 jne 1f
1214 tst.l (%a0)
1216 1: subq.l #4,%a0
1225 tst.w (-4,%a0) | to -inf
1227 subq.\s #1,%d0
1229 2: tst.w (-4,%a0) | to +inf
1231 addq.\s #1,%d0
1232 3: printf PCONV,"-> %p\n",1,%d0
1237 tst.w (-4,%a0)
1238 jeq 1f
1239 addq.\s #1,%d0
1240 1: printf PCONV,"-> %p\n",1,%d0
1243 move.\s (%a0),%d0
1244 tst.l (%a0)
1245 jne 1f
1246 tst.l (%a0)
1250 1: fp_tst_sr FPSR_EXC_SNAN
1251 jne 1f
1253 1: printf PCONV,"-> %p\n",1,%d0
1268 printf PCONV,"e2d: %p(",1,%a0
1269 printx PCONV,%a0@
1271 move.l (%a0)+,%d2
1273 jne 1f
1275 move.l (%a0)+,%d0
1277 1: sub.w #0x3fff-0x3ff,%d2
1278 move.l (%a0)+,%d0
1285 lsl.l #1,%d0
1292 move.l (%a0),%d0
1306 printf PCONV,"e2s: %p(",1,%a0
1307 printx PCONV,%a0@
1309 move.l (%a0)+,%d1
1311 jne 1f
1313 move.l (%a0)+,%d0
1315 1: sub.w #0x3fff-0x7f,%d1
1316 move.l (%a0)+,%d0
1325 printf PCONV,"%08x\n",1,%d0
1356 | printf ,"f: %p\n",1,%a0
1359 subq.w #1,%d0
1361 jne 1f
1364 1: jsr fp_normalize_double
1365 2:| printf ,"f: %p\n",1,%a0
1372 addq.l #1,%a0
1373 tst.b (%a0)+ | sign
1374 jeq 1f
1376 1: cmp.w #0x7fff,(%a0)+ | exponent
1380 tst.l (%a0)+
1382 tst.l (%a0)
1387 move.l (%a0)+,%d2
1388 lsl.l #1,%d2 | ignore high bit
1390 tst.l (%a0)
1404 jne 1f
1407 1: bset #FPSR_AEXC_IOP,%d0 | set IOP bit
1409 jeq 1f
1411 1: btst #FPSR_EXC_UNFL,%d0 | EXC_UNFL
1412 jeq 1f
1414 jeq 1f
1416 1: btst #FPSR_EXC_DZ,%d0 | EXC_INEX1
1417 jeq 1f
1419 1: btst #FPSR_EXC_OVFL,%d0 | EXC_OVFL
1420 jne 1f
1422 jne 1f
1425 1: bset #FPSR_AEXC_INEX,%d0 | set INEX bit
1452 jeq 1f
1454 1: jra fp_end