diff options
Diffstat (limited to 'target/loongarch/fpu_helper.c')
-rw-r--r-- | target/loongarch/fpu_helper.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/target/loongarch/fpu_helper.c b/target/loongarch/fpu_helper.c index 8146667..3d0cb8d 100644 --- a/target/loongarch/fpu_helper.c +++ b/target/loongarch/fpu_helper.c @@ -854,3 +854,9 @@ uint64_t helper_ftint_w_d(CPULoongArchState *env, uint64_t fj) update_fcsr0(env, GETPC()); return fd; } + +void helper_set_rounding_mode(CPULoongArchState *env, uint32_t fcsr0) +{ + set_float_rounding_mode(ieee_rm[(fcsr0 >> FCSR0_RM) & 0x3], + &env->fp_status); +} |