2015-12-10 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / rtm-check.h
blob593b40391c792d7dbf52b56c2c5e351e7ab5b5dc
1 #include <stdlib.h>
2 #include "cpuid.h"
4 static void rtm_test (void);
6 static void __attribute__ ((noinline)) do_test (void)
8 rtm_test ();
11 int
12 main ()
14 unsigned int eax, ebx, ecx, edx;
16 if (__get_cpuid_max (0, NULL) >= 7)
18 __cpuid_count (7, 0, eax, ebx, ecx, edx);
19 if (ebx & bit_RTM)
21 do_test ();
22 #ifdef DEBUG
23 printf ("PASSED\n");
24 #endif
25 return 0;
28 #ifdef DEBUG
29 printf ("SKIPPED\n");
30 #endif
31 return 0;