diff options
author | Philippe Mathieu-Daudé | 2020-11-22 18:05:25 +0100 |
---|---|---|
committer | Philippe Mathieu-Daudé | 2020-12-13 20:27:11 +0100 |
commit | 3533ee301c46620fd5699cb97f2d4bd194fe0c24 (patch) | |
tree | e9860d8fcd849ce68f174a74fd82bd019f0d26c9 | |
parent | target/mips: Remove unused headers from fpu_helper.c (diff) | |
download | qemu-3533ee301c46620fd5699cb97f2d4bd194fe0c24.tar.gz qemu-3533ee301c46620fd5699cb97f2d4bd194fe0c24.tar.xz qemu-3533ee301c46620fd5699cb97f2d4bd194fe0c24.zip |
target/mips: Use FloatRoundMode enum for FCR31 modes conversion
Use the FloatRoundMode enum type introduced in commit 3dede407cc6
("softfloat: Name rounding mode enum") instead of 'unsigned int'.
Suggested-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <20201123204448.3260804-2-f4bug@amsat.org>
-rw-r--r-- | target/mips/fpu_helper.c | 2 | ||||
-rw-r--r-- | target/mips/internal.h | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c index 956e3417d0..bdb65065ee 100644 --- a/target/mips/fpu_helper.c +++ b/target/mips/fpu_helper.c @@ -38,7 +38,7 @@ #define FP_TO_INT64_OVERFLOW 0x7fffffffffffffffULL /* convert MIPS rounding mode in FCR31 to IEEE library */ -unsigned int ieee_rm[] = { +const FloatRoundMode ieee_rm[4] = { float_round_nearest_even, float_round_to_zero, float_round_up, diff --git a/target/mips/internal.h b/target/mips/internal.h index 0515966469..e4d2d9f44f 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -223,7 +223,8 @@ bool mips_cpu_tlb_fill(CPUState *cs, vaddr address, int size, uint32_t float_class_s(uint32_t arg, float_status *fst); uint64_t float_class_d(uint64_t arg, float_status *fst); -extern unsigned int ieee_rm[]; +extern const FloatRoundMode ieee_rm[4]; + void update_pagemask(CPUMIPSState *env, target_ulong arg1, int32_t *pagemask); static inline void restore_rounding_mode(CPUMIPSState *env) |