From f62664948e4f031a140fa4875d2782e47e091850 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sun, 11 Feb 2018 16:02:34 -0500 Subject: [PATCH] target-mips: Make 'helper_float_cvtw_s' consistent with the remaining helpers Move the call to `update_fcr31' in `helper_float_cvtw_s' after the exception flag check, for consistency with the remaining helpers that do it last too. Backports commit 2b09f94cdbf5c54e2278d7f3aed2eceff3494790 from qemu --- qemu/target-mips/op_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/target-mips/op_helper.c b/qemu/target-mips/op_helper.c index 6e142390..3c33fec3 100644 --- a/qemu/target-mips/op_helper.c +++ b/qemu/target-mips/op_helper.c @@ -2664,11 +2664,11 @@ uint32_t helper_float_cvtw_s(CPUMIPSState *env, uint32_t fst0) uint32_t wt2; wt2 = float32_to_int32(fst0, &env->active_fpu.fp_status); - update_fcr31(env, GETPC()); if (get_float_exception_flags(&env->active_fpu.fp_status) & (float_flag_invalid | float_flag_overflow)) { wt2 = FP_TO_INT32_OVERFLOW; } + update_fcr31(env, GETPC()); return wt2; }