Lines Matching full:src

31 struct fp_ext *fp_fabs(struct fp_ext *dest, struct fp_ext *src)  in fp_fabs()  argument
35 fp_monadic_check(dest, src); in fp_fabs()
42 struct fp_ext *fp_fneg(struct fp_ext *dest, struct fp_ext *src) in fp_fneg() argument
46 fp_monadic_check(dest, src); in fp_fneg()
58 struct fp_ext *fp_fadd(struct fp_ext *dest, struct fp_ext *src) in fp_fadd() argument
64 fp_dyadic_check(dest, src); in fp_fadd()
68 if (IS_INF(src) && (src->sign != dest->sign)) in fp_fadd()
72 if (IS_INF(src)) { in fp_fadd()
73 fp_copy_ext(dest, src); in fp_fadd()
78 if (IS_ZERO(src)) { in fp_fadd()
79 if (src->sign != dest->sign) { in fp_fadd()
86 fp_copy_ext(dest, src); in fp_fadd()
90 dest->lowmant = src->lowmant = 0; in fp_fadd()
92 if ((diff = dest->exp - src->exp) > 0) in fp_fadd()
93 fp_denormalize(src, diff); in fp_fadd()
97 if (dest->sign == src->sign) { in fp_fadd()
98 if (fp_addmant(dest, src)) in fp_fadd()
102 if (dest->mant.m64 < src->mant.m64) { in fp_fadd()
103 fp_submant(dest, src, dest); in fp_fadd()
106 fp_submant(dest, dest, src); in fp_fadd()
117 struct fp_ext *fp_fsub(struct fp_ext *dest, struct fp_ext *src) in fp_fsub() argument
121 src->sign = !src->sign; in fp_fsub()
122 return fp_fadd(dest, src); in fp_fsub()
126 struct fp_ext *fp_fcmp(struct fp_ext *dest, struct fp_ext *src) in fp_fcmp() argument
131 src->sign = !src->sign; in fp_fcmp()
132 return fp_fadd(&FPDATA->temp[1], src); in fp_fcmp()
135 struct fp_ext *fp_ftst(struct fp_ext *dest, struct fp_ext *src) in fp_ftst() argument
141 return src; in fp_ftst()
144 struct fp_ext *fp_fmul(struct fp_ext *dest, struct fp_ext *src) in fp_fmul() argument
151 fp_dyadic_check(dest, src); in fp_fmul()
154 dest->sign = src->sign ^ dest->sign; in fp_fmul()
158 if (IS_ZERO(src)) in fp_fmul()
162 if (IS_INF(src)) { in fp_fmul()
166 fp_copy_ext(dest, src); in fp_fmul()
173 if (IS_ZERO(dest) || IS_ZERO(src)) { in fp_fmul()
181 exp = dest->exp + src->exp - 0x3ffe; in fp_fmul()
188 if ((long)src->mant.m32[0] >= 0) in fp_fmul()
189 exp -= fp_overnormalize(src); in fp_fmul()
192 fp_multiplymant(&temp, dest, src); in fp_fmul()
219 of src / dest, the result is actually dest / src. */
221 struct fp_ext *fp_fdiv(struct fp_ext *dest, struct fp_ext *src) in fp_fdiv() argument
228 fp_dyadic_check(dest, src); in fp_fdiv()
231 dest->sign = src->sign ^ dest->sign; in fp_fdiv()
236 if (IS_INF(src)) in fp_fdiv()
241 if (IS_INF(src)) { in fp_fdiv()
253 if (IS_ZERO(src)) in fp_fdiv()
258 if (IS_ZERO(src)) { in fp_fdiv()
267 exp = dest->exp - src->exp + 0x3fff; in fp_fdiv()
274 if ((long)src->mant.m32[0] >= 0) in fp_fdiv()
275 exp -= fp_overnormalize(src); in fp_fdiv()
278 fp_dividemant(&temp, dest, src); in fp_fdiv()
301 struct fp_ext *fp_fsglmul(struct fp_ext *dest, struct fp_ext *src) in fp_fsglmul() argument
307 fp_dyadic_check(dest, src); in fp_fsglmul()
310 dest->sign = src->sign ^ dest->sign; in fp_fsglmul()
314 if (IS_ZERO(src)) in fp_fsglmul()
318 if (IS_INF(src)) { in fp_fsglmul()
322 fp_copy_ext(dest, src); in fp_fsglmul()
329 if (IS_ZERO(dest) || IS_ZERO(src)) { in fp_fsglmul()
337 exp = dest->exp + src->exp - 0x3ffe; in fp_fsglmul()
342 src->mant.m32[0] & 0xffffff00); in fp_fsglmul()
357 struct fp_ext *fp_fsgldiv(struct fp_ext *dest, struct fp_ext *src) in fp_fsgldiv() argument
364 fp_dyadic_check(dest, src); in fp_fsgldiv()
367 dest->sign = src->sign ^ dest->sign; in fp_fsgldiv()
372 if (IS_INF(src)) in fp_fsgldiv()
377 if (IS_INF(src)) { in fp_fsgldiv()
389 if (IS_ZERO(src)) in fp_fsgldiv()
394 if (IS_ZERO(src)) { in fp_fsgldiv()
403 exp = dest->exp - src->exp + 0x3fff; in fp_fsgldiv()
406 src->mant.m32[0] &= 0xffffff00; in fp_fsgldiv()
409 if (dest->mant.m32[0] >= src->mant.m32[0]) { in fp_fsgldiv()
410 fp_sub64(dest->mant, src->mant); in fp_fsgldiv()
411 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
415 fp_div64(quot, rem, dest->mant.m32[0], 0, src->mant.m32[0]); in fp_fsgldiv()
566 static struct fp_ext *modrem_kernel(struct fp_ext *dest, struct fp_ext *src, in modrem_kernel() argument
571 fp_dyadic_check(dest, src); in modrem_kernel()
574 if (IS_INF(dest) || IS_ZERO(src)) { in modrem_kernel()
578 if (IS_ZERO(dest) || IS_INF(src)) in modrem_kernel()
583 fp_fdiv(&tmp, src); /* NOTE: src might be modified */ in modrem_kernel()
585 fp_fmul(&tmp, src); in modrem_kernel()
598 fmod(src,dest) = (dest - (src * floor(dest / src))) */
600 struct fp_ext *fp_fmod(struct fp_ext *dest, struct fp_ext *src) in fp_fmod() argument
603 return modrem_kernel(dest, src, FPCR_ROUND_RZ); in fp_fmod()
608 frem(src,dest) = (dest - (src * round(dest / src)))
611 struct fp_ext *fp_frem(struct fp_ext *dest, struct fp_ext *src) in fp_frem() argument
614 return modrem_kernel(dest, src, FPCR_ROUND_RN); in fp_frem()
617 struct fp_ext *fp_fint(struct fp_ext *dest, struct fp_ext *src) in fp_fint() argument
621 fp_copy_ext(dest, src); in fp_fint()
628 struct fp_ext *fp_fintrz(struct fp_ext *dest, struct fp_ext *src) in fp_fintrz() argument
632 fp_copy_ext(dest, src); in fp_fintrz()
639 struct fp_ext *fp_fscale(struct fp_ext *dest, struct fp_ext *src) in fp_fscale() argument
645 fp_dyadic_check(dest, src); in fp_fscale()
648 if (IS_INF(src)) { in fp_fscale()
656 if (IS_ZERO(src) || IS_ZERO(dest)) in fp_fscale()
660 if (src->exp >= 0x400c) { in fp_fscale()
665 /* src must be rounded with round to zero. */ in fp_fscale()
668 scale = fp_conv_ext2long(src); in fp_fscale()