about summary refs log tree commit diff
path: root/sysdeps/generic
diff options
context:
space:
mode:
authorWilco <wdijkstr@arm.com>2014-04-17 09:39:27 +0100
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2014-04-17 09:39:27 +0100
commit423a7160af7fcffc61aac5e2e36d0b6b5b083214 (patch)
tree60c8106d43182fefe342b49ac6d9649c767078ce /sysdeps/generic
parentbc93ab2946efe008bb0ce2d4d3c212bd01384fca (diff)
downloadglibc-423a7160af7fcffc61aac5e2e36d0b6b5b083214.tar.gz
glibc-423a7160af7fcffc61aac5e2e36d0b6b5b083214.tar.xz
glibc-423a7160af7fcffc61aac5e2e36d0b6b5b083214.zip
Add fenv test support for targets which don't have FP traps.
Diffstat (limited to 'sysdeps/generic')
-rw-r--r--sysdeps/generic/math-tests.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/sysdeps/generic/math-tests.h b/sysdeps/generic/math-tests.h
index c86b06705e..3f2bd69829 100644
--- a/sysdeps/generic/math-tests.h
+++ b/sysdeps/generic/math-tests.h
@@ -76,3 +76,14 @@
   (sizeof (TYPE) == sizeof (float) ? EXCEPTION_TESTS_float	\
    : sizeof (TYPE) == sizeof (double) ? EXCEPTION_TESTS_double	\
    : EXCEPTION_TESTS_long_double)
+
+/* Indicate whether the given exception trap(s) can be enabled
+   in feenableexcept.  If non-zero, the traps are always supported.
+   If zero, traps may or may not be supported depending on the
+   target (this can be determined by checking the return value
+   of feenableexcept).  This enables skipping of tests which use
+   traps.  By default traps are supported unless overridden.  */
+#ifndef EXCEPTION_ENABLE_SUPPORTED
+# define EXCEPTION_ENABLE_SUPPORTED(EXCEPT)			\
+   (EXCEPTION_TESTS_float || EXCEPTION_TESTS_double)
+#endif