diff options
author | Ian Bolton <ian.bolton@arm.com> | 2014-04-24 07:15:33 +0100 |
---|---|---|
committer | Marcus Shawcroft <marcus.shawcroft@linaro.org> | 2014-04-24 07:15:33 +0100 |
commit | e5e0d9a4f632735cf3bb440eecb5caee5eea44c1 (patch) | |
tree | 51c5774783bb0479b35a33f9a22b86db00c20cbe /sysdeps/aarch64/fpu/fclrexcpt.c | |
parent | bacc75f7be11656387c239831f490155f5fb3700 (diff) | |
download | glibc-e5e0d9a4f632735cf3bb440eecb5caee5eea44c1.tar glibc-e5e0d9a4f632735cf3bb440eecb5caee5eea44c1.tar.gz glibc-e5e0d9a4f632735cf3bb440eecb5caee5eea44c1.tar.bz2 glibc-e5e0d9a4f632735cf3bb440eecb5caee5eea44c1.zip |
[AArch64] Suppress unnecessary FPSR and FPCR writes.
Diffstat (limited to 'sysdeps/aarch64/fpu/fclrexcpt.c')
-rw-r--r-- | sysdeps/aarch64/fpu/fclrexcpt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/aarch64/fpu/fclrexcpt.c b/sysdeps/aarch64/fpu/fclrexcpt.c index 531269f9cf..b24f0ffbbc 100644 --- a/sysdeps/aarch64/fpu/fclrexcpt.c +++ b/sysdeps/aarch64/fpu/fclrexcpt.c @@ -23,13 +23,15 @@ int feclearexcept (int excepts) { fpu_fpsr_t fpsr; + fpu_fpsr_t fpsr_new; excepts &= FE_ALL_EXCEPT; _FPU_GETFPSR (fpsr); - fpsr = (fpsr & ~FE_ALL_EXCEPT) | (fpsr & FE_ALL_EXCEPT & ~excepts); + fpsr_new = (fpsr & ~FE_ALL_EXCEPT) | (fpsr & FE_ALL_EXCEPT & ~excepts); - _FPU_SETFPSR (fpsr); + if (fpsr != fpsr_new) + _FPU_SETFPSR (fpsr_new); return 0; } |