diff options
| author | Richard Henderson <richard.henderson@linaro.org> | 2020-05-05 09:01:49 -0700 |
|---|---|---|
| committer | Richard Henderson <richard.henderson@linaro.org> | 2020-05-19 08:41:26 -0700 |
| commit | 3dede407cc61b64997f0c30f6dbf4df09949abc9 (patch) | |
| tree | 288547e5ec3f66d733f83e35a41f6c16143b3502 /include/fpu/softfloat-types.h | |
| parent | a828b373bdabc7e53d1e218e3fc76f85b6674688 (diff) | |
| download | focaccia-qemu-3dede407cc61b64997f0c30f6dbf4df09949abc9.tar.gz focaccia-qemu-3dede407cc61b64997f0c30f6dbf4df09949abc9.zip | |
softfloat: Name rounding mode enum
Give the previously unnamed enum a typedef name. Use the packed attribute so that we do not affect the layout of the float_status struct. Use it in the prototypes of relevant functions. Adjust switch statements as necessary to avoid compiler warnings. Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/fpu/softfloat-types.h b/include/fpu/softfloat-types.h index 874ddd9f93..7680193ebc 100644 --- a/include/fpu/softfloat-types.h +++ b/include/fpu/softfloat-types.h @@ -123,7 +123,7 @@ typedef struct { *Software IEC/IEEE floating-point rounding mode. */ -enum { +typedef enum __attribute__((__packed__)) { float_round_nearest_even = 0, float_round_down = 1, float_round_up = 2, @@ -131,7 +131,7 @@ enum { float_round_ties_away = 4, /* Not an IEEE rounding mode: round to the closest odd mantissa value */ float_round_to_odd = 5, -}; +} FloatRoundMode; /* * Software IEC/IEEE floating-point exception flags. @@ -156,7 +156,7 @@ enum { */ typedef struct float_status { - signed char float_rounding_mode; + FloatRoundMode float_rounding_mode; uint8_t float_exception_flags; signed char floatx80_rounding_precision; bool tininess_before_rounding; |