Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / sse-check.h
blob11b71bc3e97513be00181c074c06d977247f35c2
1 #include <stdlib.h>
2 #include "m128-check.h"
3 #include "cpuid.h"
4 #include "sse-os-support.h"
6 static void sse_test (void);
8 static void
9 __attribute__ ((noinline))
10 do_test (void)
12 sse_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 SSE test only if host has SSE support. */
24 if ((edx & bit_SSE) && sse_os_support ())
25 do_test ();
27 return 0;