diff options
Diffstat (limited to 'target-sh4/op_helper.c')
-rw-r--r-- | target-sh4/op_helper.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/target-sh4/op_helper.c b/target-sh4/op_helper.c index 2e5f5552a2..d69b94b0b1 100644 --- a/target-sh4/op_helper.c +++ b/target-sh4/op_helper.c @@ -443,11 +443,12 @@ static inline void clr_t(void) void helper_ld_fpscr(uint32_t val) { - env->fpscr = val & 0x003fffff; - if (val & 0x01) + env->fpscr = val & FPSCR_MASK; + if ((val & FPSCR_RM_MASK) == FPSCR_RM_ZERO) { set_float_rounding_mode(float_round_to_zero, &env->fp_status); - else + } else { set_float_rounding_mode(float_round_nearest_even, &env->fp_status); + } } uint32_t helper_fabs_FT(uint32_t t0) |