libmvec tests involve calling INIT_ARCH_EXT during initialization then
CHECK_ARCH_EXT before testing each function to see if the processor
being used for testing supports the required instruction set
extensions.
After my refactoring of libm-test infrastructure, the INIT_ARCH_EXT
call is in libm-test-support.c, built only once per floating-point
type. Now, in fact all definitions of this macro are empty, but given
that the definitions in sysdeps/x86_64/fpu/math-tests-arch.h are
conditional on REQUIRE_* macros defined in particular vector tests, it
seems more correct for the INIT_ARCH_EXT call to go instead in
libm-test-driver.c which gets built separately with those REQUIRE_*
macros properly defined. This patch moves the call there.
Tested for x86_64 and x86.
* math/libm-test-support.h: Do not include <math-tests-arch.h>
here.
* math/libm-test-support.c (libm_test_init): Do not call
INIT_ARCH_EXT here.
* math/libm-test-driver.c: Include <math-tests-arch.h>.
(main): Call INIT_ARCH_EXT.
+2017-02-14 Joseph Myers <joseph@codesourcery.com>
+
+ * math/libm-test-support.h: Do not include <math-tests-arch.h>
+ here.
+ * math/libm-test-support.c (libm_test_init): Do not call
+ INIT_ARCH_EXT here.
+ * math/libm-test-driver.c: Include <math-tests-arch.h>.
+ (main): Call INIT_ARCH_EXT.
+
2017-02-12 Gabriel F. T. Gomes <gftg@linux.vnet.ibm.com>
[BZ #21130]
#include "libm-test-support.h"
+#include <math-tests-arch.h>
+
/* Flags set by the including file. */
const int flag_test_errno = TEST_ERRNO;
const int flag_test_exceptions = TEST_EXCEPTIONS;
main (int argc, char **argv)
{
libm_test_init (argc, argv);
+ INIT_ARCH_EXT;
do_test ();
return libm_test_finish ();
}
initialize ();
fputs (test_msg, stdout);
- INIT_ARCH_EXT;
-
check_ulp ();
}
#include <stdio.h>
#include <tininess.h>
#include <math-tests.h>
-#include <math-tests-arch.h>
#include <nan-high-order-bit.h>
extern const int flag_test_errno;