]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Set SH fpcsr register which read again.
authorKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 5 Apr 2012 02:57:03 +0000 (11:57 +0900)
committerKaz Kojima <kkojima@rr.iij4u.or.jp>
Thu, 5 Apr 2012 02:57:03 +0000 (11:57 +0900)
ChangeLog
sysdeps/sh/sh4/fpu/fegetenv.c
sysdeps/sh/sh4/fpu/ftestexcept.c

index 092756e6f759e16b8b1224644a1b4cbc030aa22e..9c9947984f103548a3e672eaff717258dac717dd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-04-05  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
+
+       * sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Set fpscr register which
+       read again.
+       * sysdeps/sh/sh4/fpu/ftestexcept.c: Likewise.
+
 2012-04-05  Nobuhiro Iwamatsu  <iwamatsu@nigauri.org>
 
        * sysdeps/sh/sh4/fpu/fraiseexcpt.c (feraiseexcept): Produce
index 68687dc2d14af1c88402d9e90ac7f63be8be7a17..3103316e3479779e3704ef00a5f74c09279d15a0 100644 (file)
@@ -1,5 +1,5 @@
 /* Store current floating-point environment.
-   Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 1999, 2000, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -24,6 +24,10 @@ fegetenv (fenv_t *envp)
 {
   unsigned long int temp;
   _FPU_GETCW (temp);
+  /* When read fpscr, this was initialized.
+     We need to rewrite value of temp. */
+  _FPU_SETCW (temp);
+
   envp->__fpscr = temp;
 
   return 0;
index 9e0bfc5c27f018cad65b2e6b6d5cf0259cfa5628..c2e1772a919560c3cd764200abedf08956633f40 100644 (file)
@@ -26,6 +26,9 @@ fetestexcept (int excepts)
 
   /* Get current exceptions.  */
   _FPU_GETCW (temp);
+  /* When read fpscr, this was initialized.
+     We need to rewrite value of temp. */
+  _FPU_SETCW (temp);
 
   return temp & excepts & FE_ALL_EXCEPT;
 }