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-helpers.h | |
parent | a828b373bdabc7e53d1e218e3fc76f85b6674688 (diff) | |
download | qemu-3dede407cc61b64997f0c30f6dbf4df09949abc9.zip qemu-3dede407cc61b64997f0c30f6dbf4df09949abc9.tar.gz qemu-3dede407cc61b64997f0c30f6dbf4df09949abc9.tar.bz2 |
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-helpers.h')
-rw-r--r-- | include/fpu/softfloat-helpers.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/fpu/softfloat-helpers.h b/include/fpu/softfloat-helpers.h index 40d32a6..735ed6b 100644 --- a/include/fpu/softfloat-helpers.h +++ b/include/fpu/softfloat-helpers.h @@ -58,7 +58,8 @@ static inline void set_float_detect_tininess(bool val, float_status *status) status->tininess_before_rounding = val; } -static inline void set_float_rounding_mode(int val, float_status *status) +static inline void set_float_rounding_mode(FloatRoundMode val, + float_status *status) { status->float_rounding_mode = val; } @@ -99,7 +100,7 @@ static inline bool get_float_detect_tininess(float_status *status) return status->tininess_before_rounding; } -static inline int get_float_rounding_mode(float_status *status) +static inline FloatRoundMode get_float_rounding_mode(float_status *status) { return status->float_rounding_mode; } |