Lines Matching refs:fs
36 #define _FP_UNPACK_CANONICAL(fs, wc, X) \ argument
41 _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_IMPLBIT_##fs; \
43 X##_e -= _FP_EXPBIAS_##fs; \
55 _shift -= _FP_FRACXBITS_##fs; \
57 X##_e -= _FP_EXPBIAS_##fs - 1 + _shift; \
68 case _FP_EXPMAX_##fs: \
75 if (!(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \
89 #define _FP_PACK_CANONICAL(fs, wc, X) \ argument
94 X##_e += _FP_EXPBIAS_##fs; \
98 if (_FP_FRAC_OVERP_##wc(fs, X)) \
100 _FP_FRAC_CLEAR_OVERP_##wc(fs, X); \
104 if (X##_e >= _FP_EXPMAX_##fs) \
122 X##_e = _FP_EXPMAX_##fs; \
128 X##_e = _FP_EXPMAX_##fs - 1; \
139 if (X##_e <= _FP_WFRACBITS_##fs) \
141 _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \
143 if (_FP_FRAC_HIGH_##fs(X) \
144 & (_FP_OVERFLOW_##fs >> 1)) \
177 X##_e = _FP_EXPMAX_##fs; \
182 X##_e = _FP_EXPMAX_##fs; \
185 _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \
186 X##_s = _FP_NANSIGN_##fs; \
189 _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \
197 #define _FP_ISSIGNAN(fs, wc, X) \ argument
200 if (X##_e == _FP_EXPMAX_##fs) \
203 && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \
217 #define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \ argument
229 if (diff <= _FP_WFRACBITS_##fs) \
230 _FP_FRAC_SRS_##wc(X, diff, _FP_WFRACBITS_##fs); \
239 if (diff <= _FP_WFRACBITS_##fs) \
240 _FP_FRAC_SRS_##wc(Y, diff, _FP_WFRACBITS_##fs); \
253 if (_FP_FRAC_OVERP_##wc(fs, R)) \
255 _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \
282 diff -= _FP_WFRACXBITS_##fs; \
294 _FP_CHOOSENAN(fs, wc, R, X, Y, OP); \
321 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
322 R##_s = _FP_NANSIGN_##fs; \
355 #define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+') argument
356 #define _FP_SUB(fs, wc, R, X, Y) \ argument
359 _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-'); \
368 #define _FP_NEG(fs, wc, R, X) \ argument
381 #define _FP_MUL(fs, wc, R, X, Y) \ argument
390 _FP_MUL_MEAT_##fs(R,X,Y); \
392 if (_FP_FRAC_OVERP_##wc(fs, R)) \
393 _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \
399 _FP_CHOOSENAN(fs, wc, R, X, Y, '*'); \
428 R##_s = _FP_NANSIGN_##fs; \
430 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
444 #define _FP_DIV(fs, wc, R, X, Y) \ argument
453 _FP_DIV_MEAT_##fs(R,X,Y); \
457 _FP_CHOOSENAN(fs, wc, R, X, Y, '/'); \
491 R##_s = _FP_NANSIGN_##fs; \
493 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
508 #define _FP_CMP(fs, wc, ret, X, Y, un) \ argument
511 if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \
512 || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \
548 #define _FP_CMP_EQ(fs, wc, ret, X, Y) \ argument
551 if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \
552 || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \
568 #define _FP_SQRT(fs, wc, R, X) \ argument
582 R##_s = _FP_NANSIGN_##fs; \
584 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
602 R##_s = _FP_NANSIGN_##fs; \
603 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
613 q = _FP_OVERFLOW_##fs >> 1; \
634 #define _FP_TO_INT(fs, wc, r, X, rsize, rsigned) \ argument
653 || X##_e >= rsize - 1 + _FP_WFRACBITS_##fs) \
657 _FP_FRAC_SLL_##wc(X, (X##_e - _FP_WFRACBITS_##fs + 1)); \
680 r <<= X##_e - _FP_WFRACBITS_##fs; \
684 if (X##_e >= _FP_WFRACBITS_##fs) \
685 _FP_FRAC_SLL_##wc(X, (X##_e - _FP_WFRACBITS_##fs + 1)); \
686 else if (X##_e < _FP_WFRACBITS_##fs - 1) \
688 _FP_FRAC_SRS_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 2), \
689 _FP_WFRACBITS_##fs); \
703 #define _FP_TO_INT_ROUND(fs, wc, r, X, rsize, rsigned) \ argument
709 if (X##_e >= _FP_FRACBITS_##fs - 1) \
711 if (X##_e < rsize - 1 + _FP_WFRACBITS_##fs) \
713 if (X##_e >= _FP_WFRACBITS_##fs - 1) \
716 r <<= X##_e - _FP_WFRACBITS_##fs + 1; \
721 + _FP_FRACBITS_##fs - 1); \
731 _FP_FRAC_SRS_##wc(X, _FP_FRACBITS_##fs - 1 - X##_e, \
732 _FP_WFRACBITS_##fs); \
764 #define _FP_FROM_INT(fs, wc, X, r, rsize, rtype) \ argument
784 if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs < X##_e) \
785 __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
787 if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
788 _FP_FRAC_SLL_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 1)); \