gcc/testsuite/gcc.target/i386/f16c-check.h
raw| 1 | #include <stdlib.h> |
| 2 | #include <stdio.h> |
| 3 | #include "cpuid.h" |
| 4 | #include "m256-check.h" |
| 5 | |
| 6 | static void f16c_test (void); |
| 7 | |
| 8 | int |
| 9 | main () |
| 10 | { |
| 11 | unsigned int eax, ebx, ecx, edx; |
| 12 | |
| 13 | if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx)) |
| 14 | return 0; |
| 15 | |
| 16 | /* Run F16C test only if host has F16C support. */ |
| 17 | if (ecx & bit_F16C) |
| 18 | { |
| 19 | f16c_test (); |
| 20 | #ifdef DEBUG |
| 21 | printf ("PASSED\n"); |
| 22 | #endif |
| 23 | } |
| 24 | #ifdef DEBUG |
| 25 | else |
| 26 | printf ("SKIPPED\n"); |
| 27 | #endif |
| 28 | |
| 29 | return 0; |
| 30 | } |