1#include <stdio.h> 2#include <stdlib.h> 3 4#include "cpuid.h" 5 6static void sse4a_test (void); 7 8static void 9__attribute__ ((noinline)) 10do_test (void) 11{ 12 sse4a_test (); 13} 14 15int 16main () 17{ 18 unsigned int eax, ebx, ecx, edx; 19 20 if (!__get_cpuid (0x80000001, &eax, &ebx, &ecx, &edx)) 21 return 0; 22 23 /* Run SSE4a test only if host has SSE4a support. */ 24 if (ecx & bit_SSE4a) 25 do_test (); 26 27 return 0; 28} 29