Lines Matching refs:R

159 #define _FP_CHOOSENAN_SEMIRAW(fs, wc, R, X, Y, OP)			\  argument
165 _FP_CHOOSENAN (fs, wc, R, X, Y, OP); \
166 _FP_FRAC_SLL_##wc (R, _FP_WORKBITS); \
408 #define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \ argument
417 R##_s = X##_s; \
421 R##_e = X##_e; \
428 _FP_FRAC_COPY_##wc (R, X); \
437 _FP_FRAC_ADD_##wc (R, X, Y); \
443 _FP_FRAC_COPY_##wc (R, X); \
453 _FP_FRAC_COPY_##wc (R, X); \
469 _FP_FRAC_ADD_##wc (R, X, Y); \
474 R##_e = Y##_e; \
481 _FP_FRAC_COPY_##wc (R, Y); \
490 _FP_FRAC_ADD_##wc (R, Y, X); \
496 _FP_FRAC_COPY_##wc (R, Y); \
506 _FP_FRAC_COPY_##wc (R, Y); \
522 _FP_FRAC_ADD_##wc (R, Y, X); \
532 R##_e = 0; \
537 _FP_FRAC_COPY_##wc (R, Y); \
543 _FP_FRAC_COPY_##wc (R, X); \
549 _FP_FRAC_ADD_##wc (R, X, Y); \
550 if (_FP_FRAC_HIGH_##fs (R) & _FP_IMPLBIT_SH_##fs) \
553 _FP_FRAC_HIGH_##fs (R) \
555 R##_e = 1; \
565 R##_e = _FP_EXPMAX_##fs; \
567 _FP_FRAC_COPY_##wc (R, Y); \
569 _FP_FRAC_COPY_##wc (R, X); \
571 _FP_CHOOSENAN_SEMIRAW (fs, wc, R, X, Y, OP); \
578 _FP_FRAC_ADD_##wc (R, X, Y); \
579 R##_e = X##_e + 1; \
580 _FP_FRAC_SRS_##wc (R, 1, _FP_WFRACBITS_##fs); \
581 if (R##_e == _FP_EXPMAX_##fs) \
583 _FP_OVERFLOW_SEMIRAW (fs, wc, R); \
587 if (_FP_FRAC_HIGH_##fs (R) & _FP_IMPLBIT_SH_##fs) \
590 _FP_FRAC_HIGH_##fs (R) &= ~(_FP_W_TYPE) _FP_IMPLBIT_SH_##fs; \
591 R##_e++; \
592 _FP_FRAC_SRS_##wc (R, 1, _FP_WFRACBITS_##fs); \
593 if (R##_e == _FP_EXPMAX_##fs) \
595 _FP_OVERFLOW_SEMIRAW (fs, wc, R); \
606 R##_e = X##_e; \
607 R##_s = X##_s; \
614 _FP_FRAC_COPY_##wc (R, X); \
623 _FP_FRAC_SUB_##wc (R, X, Y); \
629 _FP_FRAC_COPY_##wc (R, X); \
639 _FP_FRAC_COPY_##wc (R, X); \
655 _FP_FRAC_SUB_##wc (R, X, Y); \
660 R##_e = Y##_e; \
661 R##_s = Y##_s; \
668 _FP_FRAC_COPY_##wc (R, Y); \
677 _FP_FRAC_SUB_##wc (R, Y, X); \
683 _FP_FRAC_COPY_##wc (R, Y); \
693 _FP_FRAC_COPY_##wc (R, Y); \
709 _FP_FRAC_SUB_##wc (R, Y, X); \
719 R##_e = 0; \
722 _FP_FRAC_COPY_##wc (R, Y); \
724 R##_s = (FP_ROUNDMODE == FP_RND_MINF); \
728 R##_s = Y##_s; \
735 _FP_FRAC_COPY_##wc (R, X); \
736 R##_s = X##_s; \
742 _FP_FRAC_SUB_##wc (R, X, Y); \
743 R##_s = X##_s; \
744 if (_FP_FRAC_HIGH_##fs (R) & _FP_IMPLBIT_SH_##fs) \
747 _FP_FRAC_SUB_##wc (R, Y, X); \
748 R##_s = Y##_s; \
750 else if (_FP_FRAC_ZEROP_##wc (R)) \
751 R##_s = (FP_ROUNDMODE == FP_RND_MINF); \
760 R##_e = _FP_EXPMAX_##fs; \
766 R##_s = _FP_NANSIGN_##fs; \
767 _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
768 _FP_FRAC_SLL_##wc (R, _FP_WORKBITS); \
775 R##_s = Y##_s; \
776 _FP_FRAC_COPY_##wc (R, Y); \
784 R##_s = X##_s; \
785 _FP_FRAC_COPY_##wc (R, X); \
790 _FP_CHOOSENAN_SEMIRAW (fs, wc, R, X, Y, OP); \
798 R##_e = X##_e; \
799 _FP_FRAC_SUB_##wc (R, X, Y); \
800 R##_s = X##_s; \
801 if (_FP_FRAC_HIGH_##fs (R) & _FP_IMPLBIT_SH_##fs) \
804 _FP_FRAC_SUB_##wc (R, Y, X); \
805 R##_s = Y##_s; \
807 else if (_FP_FRAC_ZEROP_##wc (R)) \
809 R##_e = 0; \
810 R##_s = (FP_ROUNDMODE == FP_RND_MINF); \
816 if (_FP_FRAC_HIGH_##fs (R) & _FP_IMPLBIT_SH_##fs) \
821 _FP_FRAC_HIGH_##fs (R) &= _FP_IMPLBIT_SH_##fs - 1; \
823 _FP_FRAC_CLZ_##wc (_FP_ADD_INTERNAL_diff, R); \
825 _FP_FRAC_SLL_##wc (R, _FP_ADD_INTERNAL_diff); \
826 if (R##_e <= _FP_ADD_INTERNAL_diff) \
830 = _FP_ADD_INTERNAL_diff - R##_e + 1; \
831 _FP_FRAC_SRS_##wc (R, _FP_ADD_INTERNAL_diff, \
833 R##_e = 0; \
837 R##_e -= _FP_ADD_INTERNAL_diff; \
838 _FP_FRAC_HIGH_##fs (R) &= ~(_FP_W_TYPE) _FP_IMPLBIT_SH_##fs; \
846 #define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL (fs, wc, R, X, Y, '+') argument
847 #define _FP_SUB(fs, wc, R, X, Y) \ argument
852 _FP_ADD_INTERNAL (fs, wc, R, X, Y, '-'); \
859 #define _FP_NEG(fs, wc, R, X) \ argument
862 _FP_FRAC_COPY_##wc (R, X); \
863 R##_e = X##_e; \
864 R##_s = 1 ^ X##_s; \
871 #define _FP_MUL(fs, wc, R, X, Y) \ argument
874 R##_s = X##_s ^ Y##_s; \
875 R##_e = X##_e + Y##_e + 1; \
879 R##_c = FP_CLS_NORMAL; \
881 _FP_MUL_MEAT_##fs (R, X, Y); \
883 if (_FP_FRAC_OVERP_##wc (fs, R)) \
884 _FP_FRAC_SRS_##wc (R, 1, _FP_WFRACBITS_##fs); \
886 R##_e--; \
890 _FP_CHOOSENAN (fs, wc, R, X, Y, '*'); \
896 R##_s = X##_s; \
903 _FP_FRAC_COPY_##wc (R, X); \
904 R##_c = X##_c; \
910 R##_s = Y##_s; \
915 _FP_FRAC_COPY_##wc (R, Y); \
916 R##_c = Y##_c; \
921 R##_s = _FP_NANSIGN_##fs; \
922 R##_c = FP_CLS_NAN; \
923 _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
936 #define _FP_FMA(fs, wc, dwc, R, X, Y, Z) \ argument
950 R##_s = Z##_s; \
951 _FP_FRAC_COPY_##wc (R, Z); \
952 R##_c = Z##_c; \
956 R##_c = FP_CLS_NORMAL; \
957 R##_s = _FP_FMA_T##_s; \
958 R##_e = _FP_FMA_T##_e; \
960 _FP_MUL_MEAT_##fs (R, X, Y); \
962 if (_FP_FRAC_OVERP_##wc (fs, R)) \
963 _FP_FRAC_SRS_##wc (R, 1, _FP_WFRACBITS_##fs); \
965 R##_e--; \
973 R##_e = _FP_FMA_T##_e; \
993 R##_s = _FP_FMA_T##_s; \
1003 R##_s = Z##_s; \
1011 R##_e = Z##_e; \
1012 R##_s = Z##_s; \
1031 R##_s = Z##_s; \
1033 R##_s = (FP_ROUNDMODE == FP_RND_MINF); \
1034 _FP_FRAC_SET_##wc (R, _FP_ZEROFRAC_##wc); \
1035 R##_c = FP_CLS_ZERO; \
1042 R##_e -= _FP_FMA_rlz; \
1049 _FP_FRAC_COPY_##wc##_##dwc (R, _FP_FMA_RD); \
1050 R##_c = FP_CLS_NORMAL; \
1102 _FP_CHOOSENAN (fs, wc, R, _FP_FMA_T, Z, '+'); \
1110 R##_s = _FP_FMA_T##_s; \
1111 _FP_FRAC_COPY_##wc (R, _FP_FMA_T); \
1112 R##_c = _FP_FMA_T##_c; \
1119 R##_s = Z##_s; \
1120 _FP_FRAC_COPY_##wc (R, Z); \
1121 R##_c = Z##_c; \
1122 R##_e = Z##_e; \
1128 R##_s = Z##_s; \
1129 _FP_FRAC_COPY_##wc (R, Z); \
1130 R##_c = Z##_c; \
1134 R##_s = _FP_NANSIGN_##fs; \
1135 R##_c = FP_CLS_NAN; \
1136 _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
1143 R##_s = Z##_s; \
1145 R##_s = (FP_ROUNDMODE == FP_RND_MINF); \
1146 _FP_FRAC_COPY_##wc (R, Z); \
1147 R##_c = Z##_c; \
1160 #define _FP_DIV(fs, wc, R, X, Y) \ argument
1163 R##_s = X##_s ^ Y##_s; \
1164 R##_e = X##_e - Y##_e; \
1168 R##_c = FP_CLS_NORMAL; \
1170 _FP_DIV_MEAT_##fs (R, X, Y); \
1174 _FP_CHOOSENAN (fs, wc, R, X, Y, '/'); \
1180 R##_s = X##_s; \
1181 _FP_FRAC_COPY_##wc (R, X); \
1182 R##_c = X##_c; \
1188 R##_s = Y##_s; \
1189 _FP_FRAC_COPY_##wc (R, Y); \
1190 R##_c = Y##_c; \
1196 R##_c = FP_CLS_ZERO; \
1204 R##_c = FP_CLS_INF; \
1209 R##_s = _FP_NANSIGN_##fs; \
1210 R##_c = FP_CLS_NAN; \
1211 _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
1389 #define _FP_SQRT(fs, wc, R, X) \ argument
1398 _FP_FRAC_COPY_##wc (R, X); \
1399 R##_s = X##_s; \
1400 R##_c = FP_CLS_NAN; \
1405 R##_s = _FP_NANSIGN_##fs; \
1406 R##_c = FP_CLS_NAN; /* NAN */ \
1407 _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
1412 R##_s = 0; \
1413 R##_c = FP_CLS_INF; /* sqrt(+inf) = +inf */ \
1417 R##_s = X##_s; \
1418 R##_c = FP_CLS_ZERO; /* sqrt(+-0) = +-0 */ \
1421 R##_s = 0; \
1424 R##_c = FP_CLS_NAN; /* NAN */ \
1425 R##_s = _FP_NANSIGN_##fs; \
1426 _FP_FRAC_SET_##wc (R, _FP_NANFRAC_##fs); \
1430 R##_c = FP_CLS_NORMAL; \
1433 R##_e = X##_e >> 1; \
1435 _FP_FRAC_SET_##wc (R, _FP_ZEROFRAC_##wc); \
1437 _FP_SQRT_MEAT_##wc (R, _FP_SQRT_S, _FP_SQRT_T, X, \
2096 #define _FP_DIV_MEAT_N_loop(fs, wc, R, X, Y) \ argument
2104 _FP_FRAC_SET_##wc (R, _FP_ZEROFRAC_##wc); \
2117 _FP_FRAC_LOW_##wc (R) |= 1; \
2121 R##_e--; \
2128 _FP_FRAC_SLL_##wc (R, 1); \
2136 _FP_FRAC_LOW_##wc (R) |= 1; \
2142 _FP_FRAC_LOW_##wc (R) \
2147 #define _FP_DIV_MEAT_1_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 1, R, X, Y) argument
2148 #define _FP_DIV_MEAT_2_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 2, R, X, Y) argument
2149 #define _FP_DIV_MEAT_4_loop(fs, R, X, Y) _FP_DIV_MEAT_N_loop (fs, 4, R, X, Y) argument