mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
softfloat: Implement fused multiply-add
Implement fused multiply-add as a softfloat primitive. This implements "a+b*c" as a single step without any intermediate rounding; it is specified in IEEE 754-2008 and implemented in a number of CPUs. Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
parent
b8b8ea05c4
commit
369be8f618
3 changed files with 619 additions and 0 deletions
|
@ -211,6 +211,18 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM);
|
|||
*----------------------------------------------------------------------------*/
|
||||
void float_raise( int8 flags STATUS_PARAM);
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Options to indicate which negations to perform in float*_muladd()
|
||||
| Using these differs from negating an input or output before calling
|
||||
| the muladd function in that this means that a NaN doesn't have its
|
||||
| sign bit inverted before it is propagated.
|
||||
*----------------------------------------------------------------------------*/
|
||||
enum {
|
||||
float_muladd_negate_c = 1,
|
||||
float_muladd_negate_product = 2,
|
||||
float_muladd_negate_result = 3,
|
||||
};
|
||||
|
||||
/*----------------------------------------------------------------------------
|
||||
| Software IEC/IEEE integer-to-floating-point conversion routines.
|
||||
*----------------------------------------------------------------------------*/
|
||||
|
@ -269,6 +281,7 @@ float32 float32_sub( float32, float32 STATUS_PARAM );
|
|||
float32 float32_mul( float32, float32 STATUS_PARAM );
|
||||
float32 float32_div( float32, float32 STATUS_PARAM );
|
||||
float32 float32_rem( float32, float32 STATUS_PARAM );
|
||||
float32 float32_muladd(float32, float32, float32, int STATUS_PARAM);
|
||||
float32 float32_sqrt( float32 STATUS_PARAM );
|
||||
float32 float32_exp2( float32 STATUS_PARAM );
|
||||
float32 float32_log2( float32 STATUS_PARAM );
|
||||
|
@ -375,6 +388,7 @@ float64 float64_sub( float64, float64 STATUS_PARAM );
|
|||
float64 float64_mul( float64, float64 STATUS_PARAM );
|
||||
float64 float64_div( float64, float64 STATUS_PARAM );
|
||||
float64 float64_rem( float64, float64 STATUS_PARAM );
|
||||
float64 float64_muladd(float64, float64, float64, int STATUS_PARAM);
|
||||
float64 float64_sqrt( float64 STATUS_PARAM );
|
||||
float64 float64_log2( float64 STATUS_PARAM );
|
||||
int float64_eq( float64, float64 STATUS_PARAM );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue