[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 26/26] target/mips: Use FloatRoundMode enum for FCR31 modes conver
From: |
Philippe Mathieu-Daudé |
Subject: |
[PULL 26/26] target/mips: Use FloatRoundMode enum for FCR31 modes conversion |
Date: |
Sun, 13 Dec 2020 21:19:46 +0100 |
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>
---
target/mips/internal.h | 3 ++-
target/mips/fpu_helper.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/target/mips/internal.h b/target/mips/internal.h
index 0515966469b..e4d2d9f44f9 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)
diff --git a/target/mips/fpu_helper.c b/target/mips/fpu_helper.c
index 956e3417d0f..bdb65065ee7 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,
--
2.26.2
- [PULL 16/26] target/mips: Remove mips_def_t unused argument from mvp_init(), (continued)
- [PULL 16/26] target/mips: Remove mips_def_t unused argument from mvp_init(), Philippe Mathieu-Daudé, 2020/12/13
- [PULL 17/26] target/mips: Introduce ase_mt_available() helper, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 18/26] target/mips: Do not initialize MT registers if MT ASE absent, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 19/26] hw/mips/malta: Do not initialize MT registers if MT ASE absent, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 20/26] hw/mips/malta: Rewrite CP0_MVPConf0 access using deposit(), Philippe Mathieu-Daudé, 2020/12/13
- [PULL 21/26] target/mips: Extract cpu_supports*/cpu_set* translate.c, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 22/26] target/mips: Move mips_cpu_add_definition() from helper.c to cpu.c, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 23/26] target/mips: Move cpu definitions, reset() and realize() to cpu.c, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 24/26] target/mips: Inline cpu_mips_realize_env() in mips_cpu_realizefn(), Philippe Mathieu-Daudé, 2020/12/13
- [PULL 25/26] target/mips: Remove unused headers from fpu_helper.c, Philippe Mathieu-Daudé, 2020/12/13
- [PULL 26/26] target/mips: Use FloatRoundMode enum for FCR31 modes conversion,
Philippe Mathieu-Daudé <=
- Re: [PULL 00/26] MIPS patches for 2020-12-13, Peter Maydell, 2020/12/14