diff mbox

mips: Make `helper_float_cvtw_s' consistent with the remaining helpers

Message ID alpine.DEB.1.10.1411051431330.2881@tp.orcam.me.uk
State New
Headers show

Commit Message

Maciej W. Rozycki Nov. 5, 2014, 3:35 p.m. UTC
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.

Signed-off-by: Maciej W. Rozycki <macro@codesourcery.com>
---
 I hope there's no question about this, please apply.

  Maciej

qemu-mips-op-helper-cvtw_s-fcr31.diff
diff mbox

Patch

Index: qemu-git-trunk/target-mips/op_helper.c
===================================================================
--- qemu-git-trunk.orig/target-mips/op_helper.c	2014-11-02 19:23:41.548963320 +0000
+++ qemu-git-trunk/target-mips/op_helper.c	2014-11-02 19:23:55.548607403 +0000
@@ -2532,11 +2532,11 @@  uint32_t helper_float_cvtw_s(CPUMIPSStat
     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;
 }