OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
5ffce44fc6eddb8ee3f2de916704c951024b0497
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.target
/
i386
/
bmi2-check.h
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
#include "cpuid.h"
5
6
static void bmi2_test (void);
7
8
static void
9
__attribute__ ((noinline))
10
do_test (void)
11
{
12
bmi2_test ();
13
}
14
15
int
16
main ()
17
{
18
unsigned int eax, ebx, ecx, edx;
19
20
__cpuid_count (7, 0, eax, ebx, ecx, edx);
21
22
/* Run BMI2 test only if host has BMI2 support. */
23
if (ebx & bit_BMI2)
24
{
25
do_test ();
26
#ifdef DEBUG
27
printf ("PASSED\n");
28
#endif
29
}
30
#ifdef DEBUG
31
else
32
printf ("SKIPPED\n");
33
#endif
34
35
return 0;
36
}