Call libc_feholdexcept_aarch64 from math_private.h rather than duplicating functionality.
authorWilco Dijkstra <wdijkstr@arm.com>
Fri, 24 Oct 2014 13:21:27 +0000 (13:21 +0000)
committerWilco Dijkstra <wdijkstr@arm.com>
Fri, 24 Oct 2014 13:21:27 +0000 (13:21 +0000)
ChangeLog
sysdeps/aarch64/fpu/feholdexcpt.c

index 66447bf52af592580b97a581051998bc0b8fc7d8..d8462acfecfeda8ec714f62db0922128aa3ef847 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+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):
index 5f67a7c439041b0e8e7194ce3737b82528a14bd8..3d0349fd1998144e0ef8f7c5577c3ead29cce4d7 100644 (file)
    <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)