#ifndef PROCESSOR_SUPPORT_H_ #define PROCESSOR_SUPPORT_H_ // Utility class ProcessorSupport provides POPCNTenabled() to determine // processor support for POPCNT instruction. It uses CPUID to // retrieve the processor capabilities. // for Intel ICC compiler __cpuid() is an intrinsic // for Microsoft compiler __cpuid() is provided by #include // for GCC compiler __get_cpuid() is provided by #include // Intel compiler defines __GNUC__, so this is needed to disambiguate #if defined(__INTEL_COMPILER) # define USING_INTEL_COMPILER #elif defined(__GNUC__) # define USING_GCC_COMPILER # include #elif defined(_MSC_VER) // __MSC_VER defined by Microsoft compiler #define USING_MSC_COMPILER #endif struct regs_t {unsigned int EAX, EBX, ECX, EDX;}; #define BIT(n) ((1<