Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / gcc.target / i386 / sse4a-check.h
blobd43b4b222b13149bfbe5250942e76476e9e71f6f
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "cpuid.h"
6 static void sse4a_test (void);
8 static void
9 __attribute__ ((noinline))
10 do_test (void)
12 sse4a_test ();
15 int
16 main ()
18 unsigned int eax, ebx, ecx, edx;
20 if (!__get_cpuid (0x80000001, &eax, &ebx, &ecx, &edx))
21 return 0;
23 /* Run SSE4a test only if host has SSE4a support. */
24 if (ecx & bit_SSE4a)
25 do_test ();
27 return 0;