OSDN Git Service

PR middle-end/29274
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / gcc.target / i386 / pclmul-avx-check.h
1 #ifdef DEBUG
2 #include <stdio.h>
3 #endif
4 #include <stdlib.h>
5 #include "cpuid.h"
6
7 static void pclmul_avx_test (void);
8
9 int
10 main ()
11 {
12   unsigned int eax, ebx, ecx, edx;
13  
14   if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
15     return 0;
16
17   /* Run PCLMUL + AVX test only if host has PCLMUL + AVX support.  */
18   if ((ecx & (bit_AVX | bit_PCLMUL)) == (bit_AVX | bit_PCLMUL))
19     {
20       pclmul_avx_test ();
21 #ifdef DEBUG
22       printf ("PASSED\n");
23 #endif
24     }
25 #ifdef DEBUG
26   else
27     printf ("SKIPPED\n");
28 #endif
29
30   return 0;
31 }