about summary refs log tree commit diff
path: root/sysdeps/aarch64/fpu/math_private.h
diff options
context:
space:
mode:
authorWilco <wdijkstr@arm.com>2014-06-03 08:10:39 +0000
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2014-06-03 12:44:50 +0000
commit693096cc7b397a709f075865993027c14c06d3e5 (patch)
tree0d72fb3b0ff99742554584af13c22604eae3f815 /sysdeps/aarch64/fpu/math_private.h
parent0b4366bc9bca9be8a2208455545c138bcd1e826c (diff)
downloadglibc-693096cc7b397a709f075865993027c14c06d3e5.tar.gz
glibc-693096cc7b397a709f075865993027c14c06d3e5.tar.xz
glibc-693096cc7b397a709f075865993027c14c06d3e5.zip
[AArch64] Switch from FE_TOWARDZERO to _FPU_FPCR_RM_MASK
Diffstat (limited to 'sysdeps/aarch64/fpu/math_private.h')
-rw-r--r--sysdeps/aarch64/fpu/math_private.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sysdeps/aarch64/fpu/math_private.h b/sysdeps/aarch64/fpu/math_private.h
index a3f466be2c..023c9d05a2 100644
--- a/sysdeps/aarch64/fpu/math_private.h
+++ b/sysdeps/aarch64/fpu/math_private.h
@@ -58,7 +58,7 @@ libc_fesetround_aarch64 (int round)
   _FPU_GETCW (fpcr);
 
   /* Check whether rounding modes are different.  */
-  round = (fpcr ^ round) & FE_TOWARDZERO;
+  round = (fpcr ^ round) & _FPU_FPCR_RM_MASK;
 
   /* Set new rounding mode if different.  */
   if (__glibc_unlikely (round != 0))
@@ -84,7 +84,7 @@ libc_feholdexcept_setround_aarch64 (fenv_t *envp, int round)
 
   /* Clear exception flags, set all exceptions to non-stop,
      and set new rounding mode.  */
-  new_fpcr = fpcr & ~((FE_ALL_EXCEPT << FE_EXCEPT_SHIFT) | FE_TOWARDZERO);
+  new_fpcr = fpcr & ~((FE_ALL_EXCEPT << FE_EXCEPT_SHIFT) | _FPU_FPCR_RM_MASK);
   new_fpcr |= round;
   new_fpsr = fpsr & ~FE_ALL_EXCEPT;
 
@@ -190,7 +190,7 @@ libc_feholdsetround_aarch64 (fenv_t *envp, int round)
   envp->__fpsr = fpsr;
 
   /* Check whether rounding modes are different.  */
-  round = (fpcr ^ round) & FE_TOWARDZERO;
+  round = (fpcr ^ round) & _FPU_FPCR_RM_MASK;
 
   /* Set new rounding mode if different.  */
   if (__glibc_unlikely (round != 0))
@@ -210,7 +210,7 @@ libc_feresetround_aarch64 (fenv_t *envp)
   _FPU_GETCW (fpcr);
 
   /* Check whether rounding modes are different.  */
-  round = (envp->__fpcr ^ fpcr) & FE_TOWARDZERO;
+  round = (envp->__fpcr ^ fpcr) & _FPU_FPCR_RM_MASK;
 
   /* Restore the rounding mode if it was changed.  */
   if (__glibc_unlikely (round != 0))
@@ -236,7 +236,7 @@ libc_feholdsetround_aarch64_ctx (struct rm_ctx *ctx, int r)
   ctx->env.__fpsr = fpsr;
 
   /* Check whether rounding modes are different.  */
-  round = (fpcr ^ r) & FE_TOWARDZERO;
+  round = (fpcr ^ r) & _FPU_FPCR_RM_MASK;
   ctx->updated_status = round != 0;
 
   /* Set the rounding mode if changed.  */