PR target/83368
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / adx-check.h
blobcfed1a384837f9bcca33767839a66c30a4f5b7ca
1 #include <stdlib.h>
2 #include "cpuid.h"
4 static void adx_test (void);
6 static void __attribute__ ((noinline)) do_test (void)
8 adx_test ();
11 int
12 main ()
14 unsigned int eax, ebx, ecx, edx;
16 if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx))
17 return 0;
19 /* Run ADX test only if host has ADX support. */
20 if (ebx & bit_ADX)
22 do_test ();
23 #ifdef DEBUG
24 printf ("PASSED\n");
25 #endif
26 return 0;
29 #ifdef DEBUG
30 printf ("SKIPPED\n");
31 #endif
32 return 0;