diff options
author | Richard Henderson <richard.henderson@linaro.org> | 2021-12-17 17:57:15 +0100 |
---|---|---|
committer | Cédric Le Goater <clg@kaod.org> | 2021-12-17 17:57:15 +0100 |
commit | 42636fb923de0598104858d886c6f0acdbeb21b5 (patch) | |
tree | d41efd284306e413b2e66790d845fb0ddac33ebc /include/fpu | |
parent | 8ea0b1408e680ecd08a48c51fb1e4d0ec8cbdc15 (diff) |
softfloat: Add float64r32 arithmetic routines
These variants take a float64 as input, compute the result to
infinite precision (as we do with FloatParts), round the result
to the precision and dynamic range of float32, and then return
the result in the format of float64.
This is the operation PowerPC requires for its float32 operations.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20211119160502.17432-28-richard.henderson@linaro.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Diffstat (limited to 'include/fpu')
-rw-r--r-- | include/fpu/softfloat.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/fpu/softfloat.h b/include/fpu/softfloat.h index 0d3b407807..d34b2c44d2 100644 --- a/include/fpu/softfloat.h +++ b/include/fpu/softfloat.h @@ -909,6 +909,18 @@ static inline bool float64_unordered_quiet(float64 a, float64 b, float64 float64_default_nan(float_status *status); /*---------------------------------------------------------------------------- +| Software IEC/IEEE double-precision operations, rounding to single precision, +| returning a result in double precision, with only one rounding step. +*----------------------------------------------------------------------------*/ + +float64 float64r32_add(float64, float64, float_status *status); +float64 float64r32_sub(float64, float64, float_status *status); +float64 float64r32_mul(float64, float64, float_status *status); +float64 float64r32_div(float64, float64, float_status *status); +float64 float64r32_muladd(float64, float64, float64, int, float_status *status); +float64 float64r32_sqrt(float64, float_status *status); + +/*---------------------------------------------------------------------------- | Software IEC/IEEE extended double-precision conversion routines. *----------------------------------------------------------------------------*/ int32_t floatx80_to_int32(floatx80, float_status *status); |