mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 23:03:54 -06:00
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>
This commit is contained in:
parent
a828b373bd
commit
3dede407cc
6 changed files with 66 additions and 51 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue