summaryrefslogtreecommitdiff
path: root/libc/ports/sysdeps/arm/feenablxcpt.c
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-06-24 22:42:26 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2013-06-24 22:42:26 +0000
commitf42fd2771adb82cb5f34ba9e80a607975111da48 (patch)
tree43eebf12baba0fbee7c6277021c2ac924f76237c /libc/ports/sysdeps/arm/feenablxcpt.c
parent3625809e03b7287e244a6a2563d5217426e88d5c (diff)
downloadeglibc2-f42fd2771adb82cb5f34ba9e80a607975111da48.tar.gz
Merge changes between r23296 and r23363 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@23364 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/ports/sysdeps/arm/feenablxcpt.c')
-rw-r--r--libc/ports/sysdeps/arm/feenablxcpt.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/libc/ports/sysdeps/arm/feenablxcpt.c b/libc/ports/sysdeps/arm/feenablxcpt.c
index baad4320c..e2e287b6e 100644
--- a/libc/ports/sysdeps/arm/feenablxcpt.c
+++ b/libc/ports/sysdeps/arm/feenablxcpt.c
@@ -39,6 +39,18 @@ feenableexcept (int excepts)
_FPU_SETCW(new_exc);
+ if (excepts != 0)
+ {
+ /* VFPv3 and VFPv4 do not support trapping exceptions, so
+ test whether the relevant bits were set and fail if
+ not. */
+ unsigned int temp;
+ _FPU_GETCW (temp);
+ if ((temp & (excepts << FE_EXCEPT_SHIFT))
+ != (excepts << FE_EXCEPT_SHIFT))
+ return -1;
+ }
+
return old_exc;
}