2014-06-03 Wilco <wdijkstr@arm.com>
+ * sysdeps/aarch64/fpu/math_private.h (libc_fesetround_aarch64)
+ (libc_feholdexcept_setround_aarch64) (libc_feholdsetround_aarch64)
+ (libc_feresetround_aarch64) (libc_feholdsetround_aarch64_ctx):
+ Use _FPU_FPCR_RM_MASK for rounding mask rather than FE_TOWARDZERO.
+ * sysdeps/aarch64/fpu/get-rounding-mode.h (get_rounding_mode):
+ Likewise.
+
+2014-06-03 Wilco <wdijkstr@arm.com>
+
* sysdeps/aarch64/fpu/math_private.h
(libc_feholdexcept_aarch64) (libc_feholdexcept_setround_aarch64)
(libc_fetestexcept_aarch64) (libc_fesetenv_aarch64)
_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))
/* 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;
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))
_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))
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. */