Skip to content

Commit

Permalink
target/mips: Use FloatRoundMode enum for FCR31 modes conversion
Browse files Browse the repository at this point in the history
Use the FloatRoundMode enum type introduced in commit 3dede40
("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>
  • Loading branch information
philmd committed Dec 13, 2020
1 parent 98cf80b commit 3533ee3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion target/mips/fpu_helper.c
Expand Up @@ -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,
Expand Down
3 changes: 2 additions & 1 deletion target/mips/internal.h
Expand Up @@ -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)
Expand Down

0 comments on commit 3533ee3

Please sign in to comment.