Lines Matching +full:x +full:- +full:z
1 // SPDX-License-Identifier: GPL-2.0-only
5 * MADDF.fmt: FPR[fd] = FPR[fd] + (FPR[fs] x FPR[ft])
15 static union ieee754sp _sp_maddf(union ieee754sp z, union ieee754sp x, in _sp_maddf() argument
46 * Handle the cases when at least one of x, y or z is a NaN. in _sp_maddf()
47 * Order of precedence is sNaN, qNaN and z, x, y. in _sp_maddf()
50 return ieee754sp_nanxcpt(z); in _sp_maddf()
52 return ieee754sp_nanxcpt(x); in _sp_maddf()
56 return z; in _sp_maddf()
58 return x; in _sp_maddf()
64 /* ZERO z cases are handled separately below */ in _sp_maddf()
91 * z is here either not an infinity, or an infinity having the in _sp_maddf()
92 * same sign as product (x*y). The result must be an infinity, in _sp_maddf()
93 * and its sign is determined only by the sign of product (x*y). in _sp_maddf()
105 /* Handle cases +0 + (-0) and similar ones. */ in _sp_maddf()
111 * such case determined only by the sign of z. in _sp_maddf()
113 return z; in _sp_maddf()
117 /* x*y is here 0, and z is not 0, so just return z */ in _sp_maddf()
118 return z; in _sp_maddf()
177 rm = XSPSRS64(rm64, (62 - 26)); in _sp_maddf()
182 zm64 = (uint64_t)zm << (62 - 23); in _sp_maddf()
190 s = ze - re; in _sp_maddf()
195 * Have to shift z fraction right to align. in _sp_maddf()
197 s = re - ze; in _sp_maddf()
217 zm64 = zm64 - rm64; in _sp_maddf()
219 zm64 = rm64 - zm64; in _sp_maddf()
230 ze--; in _sp_maddf()
239 zm = XSPSRS64(zm64, (62 - 26)); in _sp_maddf()
244 union ieee754sp ieee754sp_maddf(union ieee754sp z, union ieee754sp x, in ieee754sp_maddf() argument
247 return _sp_maddf(z, x, y, 0); in ieee754sp_maddf()
250 union ieee754sp ieee754sp_msubf(union ieee754sp z, union ieee754sp x, in ieee754sp_msubf() argument
253 return _sp_maddf(z, x, y, MADDF_NEGATE_PRODUCT); in ieee754sp_msubf()
256 union ieee754sp ieee754sp_madd(union ieee754sp z, union ieee754sp x, in ieee754sp_madd() argument
259 return _sp_maddf(z, x, y, 0); in ieee754sp_madd()
262 union ieee754sp ieee754sp_msub(union ieee754sp z, union ieee754sp x, in ieee754sp_msub() argument
265 return _sp_maddf(z, x, y, MADDF_NEGATE_ADDITION); in ieee754sp_msub()
268 union ieee754sp ieee754sp_nmadd(union ieee754sp z, union ieee754sp x, in ieee754sp_nmadd() argument
271 return _sp_maddf(z, x, y, MADDF_NEGATE_PRODUCT|MADDF_NEGATE_ADDITION); in ieee754sp_nmadd()
274 union ieee754sp ieee754sp_nmsub(union ieee754sp z, union ieee754sp x, in ieee754sp_nmsub() argument
277 return _sp_maddf(z, x, y, MADDF_NEGATE_PRODUCT); in ieee754sp_nmsub()