diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2020-11-21 09:33:36 -0800 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2021-06-03 14:04:02 -0700 |
| commit | 8da5f1dbb0d7b97686d54584c70b55cb05f89007 (patch) | |
| tree | 2c3dbd392b0c18e9397a145e4832a46317146c18 /include/fpu/softfloat-types.h | |
| parent | d6e1f0cd59a59a27a2b109600653e57917cc9594 (diff) | |
| download | focaccia-qemu-8da5f1dbb0d7b97686d54584c70b55cb05f89007.tar.gz focaccia-qemu-8da5f1dbb0d7b97686d54584c70b55cb05f89007.zip | |
softfloat: Introduce Floatx80RoundPrec
Use an enumeration instead of raw 32/64/80 values. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Diffstat (limited to 'include/fpu/softfloat-types.h')
| -rw-r--r-- | include/fpu/softfloat-types.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 3b757c3d6a..5bcbd041f7 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -154,6 +154,14 @@ enum { float_flag_output_denormal = 128 }; +/* + * Rounding precision for floatx80. + */ +typedef enum __attribute__((__packed__)) { + floatx80_precision_x, + floatx80_precision_d, + floatx80_precision_s, +} FloatX80RoundPrec; /* * Floating Point Status. Individual architectures may maintain @@ -165,7 +173,7 @@ enum { typedef struct float_status { FloatRoundMode float_rounding_mode; uint8_t float_exception_flags; - signed char floatx80_rounding_precision; + FloatX80RoundPrec floatx80_rounding_precision; bool tininess_before_rounding; /* should denormalised results go to zero and set the inexact flag? */ bool flush_to_zero; |