about summary refs log tree commit diff
path: root/sysdeps/sh/sh4
diff options
context:
space:
mode:
authorKaz Kojima <kkojima@rr.iij4u.or.jp>2012-05-28 01:02:34 +0200
committerThomas Schwinge <thomas@codesourcery.com>2012-05-28 01:02:34 +0200
commit3f99608f823af08c833c85e84740bc182acafd71 (patch)
treef1c43bb0440a6938eaa426a244f95f8e04d3344d /sysdeps/sh/sh4
parentd701a1abe29b69b0c40d4536781db7333fc5312d (diff)
downloadglibc-3f99608f823af08c833c85e84740bc182acafd71.tar.gz
glibc-3f99608f823af08c833c85e84740bc182acafd71.tar.xz
glibc-3f99608f823af08c833c85e84740bc182acafd71.zip
SH: feraiseexcept: Restore fpscr flag fields.
Diffstat (limited to 'sysdeps/sh/sh4')
-rw-r--r--sysdeps/sh/sh4/fpu/fraiseexcpt.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sysdeps/sh/sh4/fpu/fraiseexcpt.c b/sysdeps/sh/sh4/fpu/fraiseexcpt.c
index a555b10885..729e8bf3ec 100644
--- a/sysdeps/sh/sh4/fpu/fraiseexcpt.c
+++ b/sysdeps/sh/sh4/fpu/fraiseexcpt.c
@@ -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)