aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/sh/sh4/fpu/fraiseexcpt.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 65de57e57b..3d1bc8f892 100644
--- 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.
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)