aboutsummaryrefslogtreecommitdiff
path: root/target/m68k/fpu_helper.c
diff options
context:
space:
mode:
authorRichard Henderson <richard.henderson@linaro.org>2020-05-05 09:01:49 -0700
committerRichard Henderson <richard.henderson@linaro.org>2020-05-19 08:41:26 -0700
commit3dede407cc61b64997f0c30f6dbf4df09949abc9 (patch)
tree288547e5ec3f66d733f83e35a41f6c16143b3502 /target/m68k/fpu_helper.c
parenta828b373bdabc7e53d1e218e3fc76f85b6674688 (diff)
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 'target/m68k/fpu_helper.c')
-rw-r--r--target/m68k/fpu_helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c
index 4137542ec0..36e6c704d1 100644
--- a/target/m68k/fpu_helper.c
+++ b/target/m68k/fpu_helper.c
@@ -149,7 +149,7 @@ void cpu_m68k_set_fpcr(CPUM68KState *env, uint32_t val)
void HELPER(fitrunc)(CPUM68KState *env, FPReg *res, FPReg *val)
{
- int rounding_mode = get_float_rounding_mode(&env->fp_status);
+ FloatRoundMode rounding_mode = get_float_rounding_mode(&env->fp_status);
set_float_rounding_mode(float_round_to_zero, &env->fp_status);
res->d = floatx80_round_to_int(val->d, &env->fp_status);
set_float_rounding_mode(rounding_mode, &env->fp_status);
@@ -300,7 +300,7 @@ void HELPER(fdmul)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
void HELPER(fsglmul)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
{
- int rounding_mode = get_float_rounding_mode(&env->fp_status);
+ FloatRoundMode rounding_mode = get_float_rounding_mode(&env->fp_status);
floatx80 a, b;
PREC_BEGIN(32);
@@ -333,7 +333,7 @@ void HELPER(fddiv)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
void HELPER(fsgldiv)(CPUM68KState *env, FPReg *res, FPReg *val0, FPReg *val1)
{
- int rounding_mode = get_float_rounding_mode(&env->fp_status);
+ FloatRoundMode rounding_mode = get_float_rounding_mode(&env->fp_status);
floatx80 a, b;
PREC_BEGIN(32);