PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / bmi-check.h
blob1973f3b6468d35284ff3d723430eaee2c80befb8
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "cpuid.h"
6 static void bmi_test (void);
8 static void
9 __attribute__ ((noinline))
10 do_test (void)
12 bmi_test ();
15 int
16 main ()
18 unsigned int eax, ebx, ecx, edx;
20 if (!__get_cpuid_count (7, 0, &eax, &ebx, &ecx, &edx))
21 return 0;
23 /* Run BMI test only if host has BMI support. */
24 if (ebx & bit_BMI)
26 do_test ();
27 #ifdef DEBUG
28 printf ("PASSED\n");
29 #endif
30 return 0;
33 #ifdef DEBUG
34 printf ("SKIPPED\n");
35 #endif
36 return 0;