SH: feraiseexcept: Restore fpscr flag fields.
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Sun, 27 May 2012 23:02:34 +0000 (01:02 +0200)
committerThomas Schwinge <thomas@codesourcery.com>
Sun, 27 May 2012 23:02:34 +0000 (01:02 +0200)
ChangeLog
sysdeps/sh/sh4/fpu/fraiseexcpt.c

index 65de57e..3d1bc8f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-05-27  Kaz Kojima  <kkojima@rr.iij4u.or.jp>
+
+       * sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Restore fpscr flag
+       fields.
+
 2012-05-27  Chung-Lin Tang  <cltang@codesourcery.com>
 
        * sysdeps/sh/_mcount.S (_mount): Add CFI directives.
index a555b10..729e8bf 100644 (file)
@@ -60,6 +60,14 @@ feraiseexcept (int excepts)
     __asm__ __volatile__ ("fmul %1, %0" : "+d" (d) : "d" (x));
   }
 
+  {
+    /* Restore flag fields.  */
+    fpu_control_t cw;
+    _FPU_GETCW (cw);
+    cw |= (excepts & FE_ALL_EXCEPT);
+    _FPU_SETCW (cw);
+  }
+
   return 0;
 }
 libm_hidden_def (feraiseexcept)