about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilco Dijkstra <wdijkstr@arm.com>2014-10-24 13:21:27 +0000
committerWilco Dijkstra <wdijkstr@arm.com>2014-10-24 13:21:27 +0000
commit1c8810ed95b3ef09c5a8a2bd03f26e3452974c06 (patch)
treedae6dd084770ecef3127334c55e5e92204dd81f0
parent8b1af712d1556573cd7c71d872eab808faf854fb (diff)
downloadglibc-1c8810ed95b3ef09c5a8a2bd03f26e3452974c06.tar.gz
glibc-1c8810ed95b3ef09c5a8a2bd03f26e3452974c06.tar.xz
glibc-1c8810ed95b3ef09c5a8a2bd03f26e3452974c06.zip
Call libc_feholdexcept_aarch64 from math_private.h rather than duplicating functionality.
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/aarch64/fpu/feholdexcpt.c26
2 files changed, 7 insertions, 24 deletions
diff --git a/ChangeLog b/ChangeLog
index 66447bf52a..d8462acfec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
 
+	* sysdeps/aarch64/fpu/feholdexcpt.c (feholdexcept):
+	Call libc_feholdexcept_aarch64.
+
+2014-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
+
 	* sysdeps/aarch64/fpu/fegetround.c (fegetround):
 	Call get_rounding_mode.
 
diff --git a/sysdeps/aarch64/fpu/feholdexcpt.c b/sysdeps/aarch64/fpu/feholdexcpt.c
index 5f67a7c439..3d0349fd19 100644
--- a/sysdeps/aarch64/fpu/feholdexcpt.c
+++ b/sysdeps/aarch64/fpu/feholdexcpt.c
@@ -17,34 +17,12 @@
    <http://www.gnu.org/licenses/>.  */
 
 #include <fenv.h>
-#include <fpu_control.h>
+#include <math_private.h>
 
 int
 feholdexcept (fenv_t *envp)
 {
-  fpu_control_t fpcr;
-  fpu_control_t fpcr_new;
-  fpu_fpsr_t fpsr;
-  fpu_fpsr_t fpsr_new;
-
-  _FPU_GETCW (fpcr);
-  envp->__fpcr = fpcr;
-
-  _FPU_GETFPSR (fpsr);
-  envp->__fpsr = fpsr;
-
-  /* Now set all exceptions to non-stop.  */
-  fpcr_new = fpcr & ~(FE_ALL_EXCEPT << FE_EXCEPT_SHIFT);
-
-  /* And clear all exception flags.  */
-  fpsr_new = fpsr & ~FE_ALL_EXCEPT;
-
-  if (fpsr != fpsr_new)
-    _FPU_SETFPSR (fpsr_new);
-
-  if (fpcr != fpcr_new)
-    _FPU_SETCW (fpcr_new);
-
+  libc_feholdexcept_aarch64 (envp);
   return 0;
 }
 libm_hidden_def (feholdexcept)