1 #include "cpusupport.h"
3 #ifdef CPUSUPPORT_X86_CPUID
6 #define CPUID_SSE2_BIT (1 << 26)
9 CPUSUPPORT_FEATURE_DECL(x86
, sse2
)
11 #ifdef CPUSUPPORT_X86_CPUID
12 unsigned int eax
, ebx
, ecx
, edx
;
14 /* Check if CPUID supports the level we need. */
15 if (!__get_cpuid(0, &eax
, &ebx
, &ecx
, &edx
))
20 /* Ask about CPU features. */
21 if (!__get_cpuid(1, &eax
, &ebx
, &ecx
, &edx
))
24 /* Return the relevant feature bit. */
25 return ((edx
& CPUID_SSE2_BIT
) ? 1 : 0);
This page took 0.023386 seconds and 5 git commands to generate.