* g++.dg/other/i386-2.C (dg-options): Add -mavx512pf.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / avx512er-check.h
blob34440d346b214dda276f24bc5f0446e136f31f8d
1 #include <stdlib.h>
2 #include "cpuid.h"
3 #include "m512-check.h"
4 #include "avx512f-os-support.h"
6 static void avx512er_test (void);
8 static void __attribute__ ((noinline)) do_test (void)
10 avx512er_test ();
13 int
14 main ()
16 unsigned int eax, ebx, ecx, edx;
18 if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
19 return 0;
21 if ((ecx & bit_OSXSAVE) == (bit_OSXSAVE))
23 if (__get_cpuid_max (0, NULL) < 7)
24 return 0;
26 __cpuid_count (7, 0, eax, ebx, ecx, edx);
28 if ((avx512f_os_support ()) && ((ebx & bit_AVX512ER) == bit_AVX512ER))
30 do_test ();
31 #ifdef DEBUG
32 printf ("PASSED\n");
33 #endif
34 return 0;
36 #ifdef DEBUG
37 printf ("SKIPPED\n");
38 #endif
40 #ifdef DEBUG
41 else
42 printf ("SKIPPED\n");
43 #endif
45 return 0;