aboutsummaryrefslogtreecommitdiff
path: root/math/libm-test.inc
diff options
context:
space:
mode:
authorAndrew Senkevich <andrew.n.senkevich@gmail.com>2015-05-14 17:14:45 +0300
committerAndrew Senkevich <andrew.n.senkevich@gmail.com>2015-05-14 18:07:06 +0300
commit58c50f06aacd84787cbe3ed315b10d3976b56612 (patch)
treee7baca9f377f9468d69cecd827f510acaff518ba /math/libm-test.inc
parenta6cdcd75dca8d57aaf1d7f8952bac374da7adc91 (diff)
downloadglibc-58c50f06aacd84787cbe3ed315b10d3976b56612.zip
glibc-58c50f06aacd84787cbe3ed315b10d3976b56612.tar.gz
glibc-58c50f06aacd84787cbe3ed315b10d3976b56612.tar.bz2
Last part of changes regarding to libm-test.inc: addition
of method for separation which exactly testing function needed to run with help of generated during make check header with series of conditional definitions. 2015-05-14 Andrew Senkevich <andrew.senkevich@intel.com> * math/gen-libm-have-vector-test.sh: Script generates series of macros for conditions in testing functions. * math/Makefile: Added call of libm-have-vector-test.sh. * math/libm-test.inc (HAVE_VECTOR): New macros.
Diffstat (limited to 'math/libm-test.inc')
-rw-r--r--math/libm-test.inc11
1 files changed, 8 insertions, 3 deletions
diff --git a/math/libm-test.inc b/math/libm-test.inc
index 82f1b75..a6cf771 100644
--- a/math/libm-test.inc
+++ b/math/libm-test.inc
@@ -1699,11 +1699,16 @@ struct test_fFF_11_data
#define STR_CONCAT(a, b, c) __STRING (a##b##c)
#define STR_CON3(a, b, c) STR_CONCAT (a, b, c)
+/* This generated header defines series of macros started with HAVE_VECTOR_. */
+#include "libm-have-vector-test.h"
+
+#define HAVE_VECTOR(func) __CONCAT (HAVE_VECTOR_, func)
+
/* Start and end the tests for a given function. */
-#define START(FUNC, SUFF, EXACT) \
+#define START(FUN, SUFF, EXACT) \
CHECK_ARCH_EXT; \
- if (TEST_MATHVEC) return; \
- const char *this_func = STR_CON3 (FUNC, SUFF, VEC_SUFF); \
+ if (TEST_MATHVEC && !HAVE_VECTOR (FUNC (FUN))) return; \
+ const char *this_func = STR_CON3 (FUN, SUFF, VEC_SUFF); \
init_max_error (this_func, EXACT)
#define END \
print_max_error (this_func)