diff options
Diffstat (limited to 'sysdeps/aarch64/fpu/fedisblxcpt.c')
-rw-r--r-- | sysdeps/aarch64/fpu/fedisblxcpt.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sysdeps/aarch64/fpu/fedisblxcpt.c b/sysdeps/aarch64/fpu/fedisblxcpt.c index 719d52f60a..c43335c4e5 100644 --- a/sysdeps/aarch64/fpu/fedisblxcpt.c +++ b/sysdeps/aarch64/fpu/fedisblxcpt.c @@ -23,6 +23,7 @@ int fedisableexcept (int excepts) { fpu_control_t fpcr; + fpu_control_t fpcr_new; int original_excepts; _FPU_GETCW (fpcr); @@ -31,9 +32,10 @@ fedisableexcept (int excepts) excepts &= FE_ALL_EXCEPT; - fpcr &= ~(excepts << FE_EXCEPT_SHIFT); + fpcr_new = fpcr & ~(excepts << FE_EXCEPT_SHIFT); - _FPU_SETCW (fpcr); + if (fpcr != fpcr_new) + _FPU_SETCW (fpcr_new); return original_excepts; } |