Merge from mainline (165734:167278).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / sse4_2-check.h
blobd10e6c7d7e203c3bc22560e3331765d2048726d4
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "cpuid.h"
6 static void sse4_2_test (void);
8 static void
9 __attribute__ ((noinline))
10 do_test (void)
12 sse4_2_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 SSE4.2 test only if host has SSE4.2 support. */
24 if (ecx & bit_SSE4_2)
25 do_test ();
27 return 0;