Lines Matching refs:src
32 fp_fabs(struct fp_ext *dest, struct fp_ext *src) in fp_fabs() argument
36 fp_monadic_check(dest, src); in fp_fabs()
44 fp_fneg(struct fp_ext *dest, struct fp_ext *src) in fp_fneg() argument
48 fp_monadic_check(dest, src); in fp_fneg()
61 fp_fadd(struct fp_ext *dest, struct fp_ext *src) in fp_fadd() argument
67 fp_dyadic_check(dest, src); in fp_fadd()
71 if (IS_INF(src) && (src->sign != dest->sign)) in fp_fadd()
75 if (IS_INF(src)) { in fp_fadd()
76 fp_copy_ext(dest, src); in fp_fadd()
81 if (IS_ZERO(src)) { in fp_fadd()
82 if (src->sign != dest->sign) { in fp_fadd()
89 fp_copy_ext(dest, src); in fp_fadd()
93 dest->lowmant = src->lowmant = 0; in fp_fadd()
95 if ((diff = dest->exp - src->exp) > 0) in fp_fadd()
96 fp_denormalize(src, diff); in fp_fadd()
100 if (dest->sign == src->sign) { in fp_fadd()
101 if (fp_addmant(dest, src)) in fp_fadd()
105 if (dest->mant.m64 < src->mant.m64) { in fp_fadd()
106 fp_submant(dest, src, dest); in fp_fadd()
109 fp_submant(dest, dest, src); in fp_fadd()
121 fp_fsub(struct fp_ext *dest, struct fp_ext *src) in fp_fsub() argument
125 src->sign = !src->sign; in fp_fsub()
126 return fp_fadd(dest, src); in fp_fsub()
131 fp_fcmp(struct fp_ext *dest, struct fp_ext *src) in fp_fcmp() argument
136 src->sign = !src->sign; in fp_fcmp()
137 return fp_fadd(&FPDATA->temp[1], src); in fp_fcmp()
141 fp_ftst(struct fp_ext *dest, struct fp_ext *src) in fp_ftst() argument
147 return src; in fp_ftst()
151 fp_fmul(struct fp_ext *dest, struct fp_ext *src) in fp_fmul() argument
158 fp_dyadic_check(dest, src); in fp_fmul()
161 dest->sign = src->sign ^ dest->sign; in fp_fmul()
165 if (IS_ZERO(src)) in fp_fmul()
169 if (IS_INF(src)) { in fp_fmul()
173 fp_copy_ext(dest, src); in fp_fmul()
180 if (IS_ZERO(dest) || IS_ZERO(src)) { in fp_fmul()
188 exp = dest->exp + src->exp - 0x3ffe; in fp_fmul()
195 if ((long)src->mant.m32[0] >= 0) in fp_fmul()
196 exp -= fp_overnormalize(src); in fp_fmul()
199 fp_multiplymant(&temp, dest, src); in fp_fmul()
229 fp_fdiv(struct fp_ext *dest, struct fp_ext *src) in fp_fdiv() argument
236 fp_dyadic_check(dest, src); in fp_fdiv()
239 dest->sign = src->sign ^ dest->sign; in fp_fdiv()
244 if (IS_INF(src)) in fp_fdiv()
249 if (IS_INF(src)) { in fp_fdiv()
261 if (IS_ZERO(src)) in fp_fdiv()
266 if (IS_ZERO(src)) { in fp_fdiv()
275 exp = dest->exp - src->exp + 0x3fff; in fp_fdiv()
282 if ((long)src->mant.m32[0] >= 0) in fp_fdiv()
283 exp -= fp_overnormalize(src); in fp_fdiv()
286 fp_dividemant(&temp, dest, src); in fp_fdiv()
310 fp_fsglmul(struct fp_ext *dest, struct fp_ext *src) in fp_fsglmul() argument
316 fp_dyadic_check(dest, src); in fp_fsglmul()
319 dest->sign = src->sign ^ dest->sign; in fp_fsglmul()
323 if (IS_ZERO(src)) in fp_fsglmul()
327 if (IS_INF(src)) { in fp_fsglmul()
331 fp_copy_ext(dest, src); in fp_fsglmul()
338 if (IS_ZERO(dest) || IS_ZERO(src)) { in fp_fsglmul()
346 exp = dest->exp + src->exp - 0x3ffe; in fp_fsglmul()
351 src->mant.m32[0] & 0xffffff00); in fp_fsglmul()
367 fp_fsgldiv(struct fp_ext *dest, struct fp_ext *src) in fp_fsgldiv() argument
374 fp_dyadic_check(dest, src); in fp_fsgldiv()
377 dest->sign = src->sign ^ dest->sign; in fp_fsgldiv()
382 if (IS_INF(src)) in fp_fsgldiv()
387 if (IS_INF(src)) { in fp_fsgldiv()
399 if (IS_ZERO(src)) in fp_fsgldiv()
404 if (IS_ZERO(src)) { in fp_fsgldiv()
413 exp = dest->exp - src->exp + 0x3fff; in fp_fsgldiv()
416 src->mant.m32[0] &= 0xffffff00; in fp_fsgldiv()
419 if (dest->mant.m32[0] >= src->mant.m32[0]) { in fp_fsgldiv()
420 fp_sub64(dest->mant, src->mant); in fp_fsgldiv()
421 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
425 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
577 modrem_kernel(struct fp_ext *dest, struct fp_ext *src, int mode) in modrem_kernel() argument
581 fp_dyadic_check(dest, src); in modrem_kernel()
584 if (IS_INF(dest) || IS_ZERO(src)) { in modrem_kernel()
588 if (IS_ZERO(dest) || IS_INF(src)) in modrem_kernel()
593 fp_fdiv(&tmp, src); /* NOTE: src might be modified */ in modrem_kernel()
595 fp_fmul(&tmp, src); in modrem_kernel()
611 fp_fmod(struct fp_ext *dest, struct fp_ext *src) in fp_fmod() argument
614 return modrem_kernel(dest, src, FPCR_ROUND_RZ); in fp_fmod()
623 fp_frem(struct fp_ext *dest, struct fp_ext *src) in fp_frem() argument
626 return modrem_kernel(dest, src, FPCR_ROUND_RN); in fp_frem()
630 fp_fint(struct fp_ext *dest, struct fp_ext *src) in fp_fint() argument
634 fp_copy_ext(dest, src); in fp_fint()
642 fp_fintrz(struct fp_ext *dest, struct fp_ext *src) in fp_fintrz() argument
646 fp_copy_ext(dest, src); in fp_fintrz()
654 fp_fscale(struct fp_ext *dest, struct fp_ext *src) in fp_fscale() argument
660 fp_dyadic_check(dest, src); in fp_fscale()
663 if (IS_INF(src)) { in fp_fscale()
671 if (IS_ZERO(src) || IS_ZERO(dest)) in fp_fscale()
675 if (src->exp >= 0x400c) { in fp_fscale()
683 scale = fp_conv_ext2long(src); in fp_fscale()