From: Wilco Dijkstra Date: Fri, 24 Oct 2014 12:59:44 +0000 (+0000) Subject: Cleanup fesetexceptflag to use the same logic as the ARM version. No functional changes. X-Git-Tag: glibc-2.21~469 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e226de337216d54c1aa3b90c4b960a72a223eba6;p=thirdparty%2Fglibc.git Cleanup fesetexceptflag to use the same logic as the ARM version. No functional changes. --- diff --git a/ChangeLog b/ChangeLog index 87fbfd86e56..bcf4636b0f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -115,6 +115,11 @@ (lchown): Likewise. (fchown): Likewise. +2014-10-23 Wilco Dijkstra + + * sysdeps/aarch64/fpu/fsetexcptflg.c (fsetexceptflag): + Cleanup logic. + 2014-10-23 Wilco Dijkstra * sysdeps/aarch64/fpu/fsetexcptflg.c (fsetexceptflag): diff --git a/sysdeps/aarch64/fpu/fsetexcptflg.c b/sysdeps/aarch64/fpu/fsetexcptflg.c index 316fbd68b7f..77e6cae9ed3 100644 --- a/sysdeps/aarch64/fpu/fsetexcptflg.c +++ b/sysdeps/aarch64/fpu/fsetexcptflg.c @@ -27,10 +27,11 @@ fesetexceptflag (const fexcept_t *flagp, int excepts) /* Get the current environment. */ _FPU_GETFPSR (fpsr); + excepts &= FE_ALL_EXCEPT; /* Set the desired exception mask. */ - fpsr_new = fpsr & ~(excepts & FE_ALL_EXCEPT); - fpsr_new |= (*flagp & excepts & FE_ALL_EXCEPT); + fpsr_new = fpsr & ~excepts; + fpsr_new |= *flagp & excepts; /* Save state back to the FPU. */ if (fpsr != fpsr_new)