aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/arm/fedisblxcpt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/arm/fedisblxcpt.c')
-rw-r--r--sysdeps/arm/fedisblxcpt.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sysdeps/arm/fedisblxcpt.c b/sysdeps/arm/fedisblxcpt.c
index f2956cd..d5e0f00 100644
--- a/sysdeps/arm/fedisblxcpt.c
+++ b/sysdeps/arm/fedisblxcpt.c
@@ -35,7 +35,9 @@ fedisableexcept (int excepts)
excepts &= FE_ALL_EXCEPT;
new_fpscr = fpscr & ~(excepts << FE_EXCEPT_SHIFT);
- _FPU_SETCW (new_fpscr);
+ /* Write new exceptions if changed. */
+ if (new_fpscr != fpscr)
+ _FPU_SETCW (new_fpscr);
return (fpscr >> FE_EXCEPT_SHIFT) & FE_ALL_EXCEPT;
}