Lines Matching refs:wc

27 #define _FP_DECL(wc, X)			\  argument
29 _FP_FRAC_DECL_##wc(X)
36 #define _FP_UNPACK_CANONICAL(fs, wc, X) \ argument
42 _FP_FRAC_SLL_##wc(X, _FP_WORKBITS); \
48 if (_FP_FRAC_ZEROP_##wc(X)) \
54 _FP_FRAC_CLZ_##wc(_shift, X); \
56 _FP_FRAC_SLL_##wc(X, (_shift+_FP_WORKBITS)); \
69 if (_FP_FRAC_ZEROP_##wc(X)) \
89 #define _FP_PACK_CANONICAL(fs, wc, X) \ argument
97 _FP_ROUND(wc, X); \
98 if (_FP_FRAC_OVERP_##wc(fs, X)) \
100 _FP_FRAC_CLEAR_OVERP_##wc(fs, X); \
103 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
123 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
129 _FP_FRAC_SET_##wc(X, _FP_MAXFRAC_##wc); \
141 _FP_FRAC_SRS_##wc(X, X##_e, _FP_WFRACBITS_##fs); \
146 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
150 _FP_ROUND(wc, X); \
155 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
161 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
172 if (!_FP_FRAC_ZEROP_##wc(X)) \
174 _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \
175 _FP_ROUND(wc, X); \
176 _FP_FRAC_LOW_##wc(X) >>= (_FP_WORKBITS); \
185 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
190 _FP_FRAC_SET_##wc(X, _FP_ZEROFRAC_##wc); \
197 _FP_FRAC_SET_##wc(X, _FP_NANFRAC_##fs); \
209 #define _FP_ISSIGNAN(fs, wc, X) \ argument
214 if (!_FP_FRAC_ZEROP_##wc(X) \
229 #define _FP_ADD_INTERNAL(fs, wc, R, X, Y, OP) \ argument
242 _FP_FRAC_SRS_##wc(X, diff, _FP_WFRACBITS_##fs); \
243 else if (!_FP_FRAC_ZEROP_##wc(X)) \
244 _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \
252 _FP_FRAC_SRS_##wc(Y, diff, _FP_WFRACBITS_##fs); \
253 else if (!_FP_FRAC_ZEROP_##wc(Y)) \
254 _FP_FRAC_SET_##wc(Y, _FP_MINFRAC_##wc); \
264 _FP_FRAC_ADD_##wc(R, X, Y); \
265 if (_FP_FRAC_OVERP_##wc(fs, R)) \
267 _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \
274 _FP_FRAC_SUB_##wc(R, X, Y); \
275 if (_FP_FRAC_ZEROP_##wc(R)) \
286 if (_FP_FRAC_NEGP_##wc(R)) \
288 _FP_FRAC_SUB_##wc(R, Y, X); \
293 _FP_FRAC_CLZ_##wc(diff, R); \
298 _FP_FRAC_SLL_##wc(R, diff); \
306 _FP_CHOOSENAN(fs, wc, R, X, Y, OP); \
314 _FP_FRAC_COPY_##wc(R, X); \
324 _FP_FRAC_COPY_##wc(R, Y); \
333 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
367 #define _FP_ADD(fs, wc, R, X, Y) _FP_ADD_INTERNAL(fs, wc, R, X, Y, '+') argument
368 #define _FP_SUB(fs, wc, R, X, Y) \ argument
371 _FP_ADD_INTERNAL(fs, wc, R, X, Y, '-'); \
380 #define _FP_NEG(fs, wc, R, X) \ argument
382 _FP_FRAC_COPY_##wc(R, X); \
393 #define _FP_MUL(fs, wc, R, X, Y) \ argument
404 if (_FP_FRAC_OVERP_##wc(fs, R)) \
405 _FP_FRAC_SRS_##wc(R, 1, _FP_WFRACBITS_##fs); \
411 _FP_CHOOSENAN(fs, wc, R, X, Y, '*'); \
423 _FP_FRAC_COPY_##wc(R, X); \
434 _FP_FRAC_COPY_##wc(R, Y); \
442 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
456 #define _FP_DIV(fs, wc, R, X, Y) \ argument
469 _FP_CHOOSENAN(fs, wc, R, X, Y, '/'); \
476 _FP_FRAC_COPY_##wc(R, X); \
484 _FP_FRAC_COPY_##wc(R, Y); \
504 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
511 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
526 #define _FP_CMP(fs, wc, ret, X, Y, un) \ argument
529 if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \
530 || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \
539 __is_zero_x = (!X##_e && _FP_FRAC_ZEROP_##wc(X)) ? 1 : 0; \
540 __is_zero_y = (!Y##_e && _FP_FRAC_ZEROP_##wc(Y)) ? 1 : 0; \
554 else if (_FP_FRAC_GT_##wc(X, Y)) \
556 else if (_FP_FRAC_GT_##wc(Y, X)) \
566 #define _FP_CMP_EQ(fs, wc, ret, X, Y) \ argument
569 if ((X##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(X)) \
570 || (Y##_e == _FP_EXPMAX_##fs && !_FP_FRAC_ZEROP_##wc(Y))) \
577 && _FP_FRAC_EQ_##wc(X, Y) \
578 && (X##_s == Y##_s || !X##_e && _FP_FRAC_ZEROP_##wc(X))); \
586 #define _FP_SQRT(fs, wc, R, X) \ argument
588 _FP_FRAC_DECL_##wc(T); _FP_FRAC_DECL_##wc(S); \
593 _FP_FRAC_COPY_##wc(R, X); \
602 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
621 _FP_FRAC_SET_##wc(R, _FP_NANFRAC_##fs); \
627 _FP_FRAC_SLL_##wc(X, 1); \
629 _FP_FRAC_SET_##wc(S, _FP_ZEROFRAC_##wc); \
630 _FP_FRAC_SET_##wc(R, _FP_ZEROFRAC_##wc); \
632 _FP_SQRT_MEAT_##wc(R, S, T, X, q); \
652 #define _FP_TO_INT(fs, wc, r, X, rsize, rsigned) \ argument
675 _FP_FRAC_SLL_##wc(X, (X##_e - _FP_WFRACBITS_##fs + 1)); \
676 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \
695 if (_FP_W_TYPE_SIZE*wc < rsize) \
697 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \
703 _FP_FRAC_SLL_##wc(X, (X##_e - _FP_WFRACBITS_##fs + 1)); \
706 _FP_FRAC_SRS_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 2), \
708 if (_FP_FRAC_LOW_##wc(X) & 1) \
710 _FP_FRAC_SRL_##wc(X, 1); \
712 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \
721 #define _FP_TO_INT_ROUND(fs, wc, r, X, rsize, rsigned) \ argument
733 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \
738 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS - X##_e \
740 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \
748 _FP_FRAC_SET_##wc(X, _FP_MINFRAC_##wc); \
750 _FP_FRAC_SRS_##wc(X, _FP_FRACBITS_##fs - 1 - X##_e, \
752 _FP_FRAC_CLZ_##wc(_lz0, X); \
753 _FP_ROUND(wc, X); \
754 _FP_FRAC_CLZ_##wc(_lz1, X); \
757 _FP_FRAC_SRL_##wc(X, _FP_WORKBITS); \
758 _FP_FRAC_ASSEMBLE_##wc(r, X, rsize); \
787 #define _FP_FROM_INT(fs, wc, X, r, rsize, rtype) \ argument
809 _FP_FRAC_DISASSEMBLE_##wc(X, ur_, rsize); \
811 _FP_FRAC_SLL_##wc(X, (_FP_WFRACBITS_##fs - X##_e - 1)); \