From 58c50f06aacd84787cbe3ed315b10d3976b56612 Mon Sep 17 00:00:00 2001 From: Andrew Senkevich Date: Thu, 14 May 2015 17:14:45 +0300 Subject: 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 * 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. --- math/libm-test.inc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'math/libm-test.inc') diff --git a/math/libm-test.inc b/math/libm-test.inc index 82f1b759be..a6cf7713d8 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) -- cgit 1.4.1