From 3dede407cc61b64997f0c30f6dbf4df09949abc9 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 5 May 2020 09:01:49 -0700 Subject: softfloat: Name rounding mode enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- include/fpu/softfloat-helpers.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/fpu/softfloat-helpers.h') diff --git a/include/fpu/softfloat-helpers.h b/include/fpu/softfloat-helpers.h index 40d32a6d5d..735ed6b653 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; } -- cgit 1.4.1