mirror of
git://sourceware.org/git/glibc.git
synced 2025-01-18 12:16:13 +08:00
Call libc_feholdexcept_aarch64 from math_private.h rather than duplicating functionality.
This commit is contained in:
parent
8b1af712d1
commit
1c8810ed95
@ -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):
|
||||
|
@ -17,34 +17,12 @@
|
||||
<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)
|
||||
|
Loading…
Reference in New Issue
Block a user