Merged trunk at revision 161680 into branch.
[official-gcc.git] / gcc / testsuite / gcc.target / i386 / mmx-3dnow-check.h
blob4f2f7f3ac40215c6a9c6e98395231167d1f1d1a6
1 #include <stdio.h>
2 #include <stdlib.h>
4 #include "cpuid.h"
6 static void mmx_3dnow_test (void);
8 static void
9 __attribute__ ((noinline))
10 do_test (void)
12 mmx_3dnow_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 3DNow! test only if host has 3DNow! support. */
24 if (edx & bit_3DNOW)
25 do_test ();
27 return 0;