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); \
142 if (_FP_FRAC_HIGH_##fs(X) \
143 & (_FP_OVERFLOW_##fs >> 1)) \
151 if (_FP_FRAC_HIGH_##fs(X) \
152 & (_FP_OVERFLOW_##fs >> 1)) \
189 X##_e = _FP_EXPMAX_##fs; \
194 X##_e = _FP_EXPMAX_##fs; \
197 _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \
198 X##_s = _FP_NANSIGN_##fs; \
201 _FP_FRAC_HIGH_RAW_##fs(X) |= _FP_QNANBIT_##fs; \
209 #define _FP_ISSIGNAN(fs, wc, X) \ argument
212 if (X##_e == _FP_EXPMAX_##fs) \
215 && !(_FP_FRAC_HIGH_RAW_##fs(X) & _FP_QNANBIT_##fs)) \
229 #define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \ argument
241 if (diff <= _FP_WFRACBITS_##fs) \
242 _FP_FRAC_SRS_##wc(X, diff, _FP_WFRACBITS_##fs); \
251 if (diff <= _FP_WFRACBITS_##fs) \
252 _FP_FRAC_SRS_##wc(Y, diff, _FP_WFRACBITS_##fs); \
265 if (_FP_FRAC_OVERP_##wc(fs, R)) \
267 _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \
294 diff -= _FP_WFRACXBITS_##fs; \
306 _FP_CHOOSENAN(fs, wc, R, X, Y, OP); \
335 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
336 R##_s = _FP_NANSIGN_##fs; \
369 #define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+') argument
370 #define _FP_SUB(fs, wc, R, X, Y) \ argument
373 _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-'); \
382 #define _FP_NEG(fs, wc, R, X) \ argument
395 #define _FP_MUL(fs, wc, R, X, Y) \ argument
404 _FP_MUL_MEAT_##fs(R,X,Y); \
406 if (_FP_FRAC_OVERP_##wc(fs, R)) \
407 _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \
413 _FP_CHOOSENAN(fs, wc, R, X, Y, '*'); \
444 R##_s = _FP_NANSIGN_##fs; \
446 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
460 #define _FP_DIV(fs, wc, R, X, Y) \ argument
469 _FP_DIV_MEAT_##fs(R,X,Y); \
473 _FP_CHOOSENAN(fs, wc, R, X, Y, '/'); \
507 R##_s = _FP_NANSIGN_##fs; \
509 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
514 R##_s = _FP_NANSIGN_##fs; \
516 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
531 #define _FP_CMP(fs, wc, ret, X, Y, un) \ argument
534 if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \
535 || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \
571 #define _FP_CMP_EQ(fs, wc, ret, X, Y) \ argument
574 if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \
575 || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \
591 #define _FP_SQRT(fs, wc, R, X) \ argument
605 R##_s = _FP_NANSIGN_##fs; \
607 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
625 R##_s = _FP_NANSIGN_##fs; \
626 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
636 q = _FP_OVERFLOW_##fs >> 1; \
657 #define _FP_TO_INT(fs, wc, r, X, rsize, rsigned) \ argument
678 || X##_e >= rsize - 1 + _FP_WFRACBITS_##fs) \
682 _FP_FRAC_SLL_##wc(X, (X##_e - _FP_WFRACBITS_##fs + 1)); \
705 r <<= X##_e - _FP_WFRACBITS_##fs; \
709 if (X##_e >= _FP_WFRACBITS_##fs) \
710 _FP_FRAC_SLL_##wc(X, (X##_e - _FP_WFRACBITS_##fs + 1)); \
711 else if (X##_e < _FP_WFRACBITS_##fs - 1) \
713 _FP_FRAC_SRS_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 2), \
714 _FP_WFRACBITS_##fs); \
728 #define _FP_TO_INT_ROUND(fs, wc, r, X, rsize, rsigned) \ argument
734 if (X##_e >= _FP_FRACBITS_##fs - 1) \
736 if (X##_e < rsize - 1 + _FP_WFRACBITS_##fs) \
738 if (X##_e >= _FP_WFRACBITS_##fs - 1) \
741 r <<= X##_e - _FP_WFRACBITS_##fs + 1; \
746 + _FP_FRACBITS_##fs - 1); \
757 _FP_FRAC_SRS_##wc(X, _FP_FRACBITS_##fs - 1 - X##_e, \
758 _FP_WFRACBITS_##fs); \
795 #define _FP_FROM_INT(fs, wc, X, r, rsize, rtype) \ argument
816 if (_FP_FRACBITS_##fs < rsize && _FP_WFRACBITS_##fs <= X##_e) \
817 __FP_FRAC_SRS_1(ur_, (X##_e - _FP_WFRACBITS_##fs + 1), rsize);\
819 if ((_FP_WFRACBITS_##fs - X##_e - 1) > 0) \
820 _FP_FRAC_SLL_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 1)); \