2016-12-21 Vladimir Makarov <vmakarov@redhat.com>
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / pclmul-check.h
blob7526cbe2ddfc7948af1256a2835024f10e58e11d
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "cpuid.h"
6 static void pclmul_test (void);
8 static void
9 __attribute__ ((noinline))
10 do_test (void)
12 pclmul_test ();
15 int
16 main ()
18 unsigned int eax, ebx, ecx, edx;
20 if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
21 return 0;
23 /* Run PCLMULQDQ test only if host has PCLMULQDQ support. */
24 if (ecx & bit_PCLMUL)
26 do_test ();
27 #ifdef DEBUG
28 printf ("PASSED\n");
29 #endif
31 #ifdef DEBUG
32 else
33 printf ("SKIPPED\n");
34 #endif
36 return 0;