aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/avx512vl-check.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/avx512vl-check.h')
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512vl-check.h51
1 files changed, 4 insertions, 47 deletions
diff --git a/gcc/testsuite/gcc.target/i386/avx512vl-check.h b/gcc/testsuite/gcc.target/i386/avx512vl-check.h
index 29d984d03dd..9d02cc82c46 100644
--- a/gcc/testsuite/gcc.target/i386/avx512vl-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx512vl-check.h
@@ -1,47 +1,4 @@
-#include <stdlib.h>
-#include "cpuid.h"
-#include "m512-check.h"
-#include "avx512f-os-support.h"
-
-static void avx512vl_test (void);
-
-static void __attribute__ ((noinline)) do_test (void)
-{
- avx512vl_test ();
-}
-
-int
-main ()
-{
- unsigned int eax, ebx, ecx, edx;
-
- if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
- return 0;
-
- /* Run avx512vl test only if host has avx512vl support. */
- if (ecx & bit_OSXSAVE)
- {
- if (__get_cpuid_max (0, NULL) < 7)
- return 0;
-
- __cpuid_count (7, 0, eax, ebx, ecx, edx);
-
- if ((ebx & bit_AVX512VL) && avx512f_os_support ())
- {
- do_test ();
-#ifdef DEBUG
- printf ("PASSED\n");
-#endif
- return 0;
- }
-#ifdef DEBUG
- printf ("SKIPPED\n");
-#endif
- }
-#ifdef DEBUG
- else
- printf ("SKIPPED\n");
-#endif
-
- return 0;
-}
+#define AVX512VL
+#define DO_TEST avx512vl_test
+static void DO_TEST (void);
+#include "avx512-check.h"