OSDN Git Service

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