Cleanup fesetexceptflag to use the same logic as the ARM version. No functional changes.

This commit is contained in:
Wilco Dijkstra 2014-10-24 12:59:44 +00:00
parent 6e3d8ed360
commit e226de3372
2 changed files with 8 additions and 2 deletions

View File

@ -115,6 +115,11 @@
(lchown): Likewise.
(fchown): Likewise.
2014-10-23 Wilco Dijkstra <wdijkstr@arm.com>
* sysdeps/aarch64/fpu/fsetexcptflg.c (fsetexceptflag):
Cleanup logic.
2014-10-23 Wilco Dijkstra <wdijkstr@arm.com>
* sysdeps/aarch64/fpu/fsetexcptflg.c (fsetexceptflag):

View File

@ -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)