8 #ifndef BOTAN_CPUID_H__
9 #define BOTAN_CPUID_H__
11 #include <botan/types.h>
24 static void initialize();
35 {
return x86_processor_flags_has(CPUID_RDTSC_BIT); }
41 {
return x86_processor_flags_has(CPUID_SSE2_BIT); }
47 {
return x86_processor_flags_has(CPUID_SSSE3_BIT); }
53 {
return x86_processor_flags_has(CPUID_SSE41_BIT); }
59 {
return x86_processor_flags_has(CPUID_SSE42_BIT); }
65 {
return x86_processor_flags_has(CPUID_AVX_BIT); }
71 {
return x86_processor_flags_has(CPUID_AESNI_BIT); }
77 {
return x86_processor_flags_has(CPUID_PCMUL_BIT); }
83 {
return x86_processor_flags_has(CPUID_MOVBE_BIT); }
89 {
return x86_processor_flags_has(CPUID_RDRAND_BIT); }
100 CPUID_SSSE3_BIT = 41,
101 CPUID_SSE41_BIT = 51,
102 CPUID_SSE42_BIT = 52,
103 CPUID_MOVBE_BIT = 54,
104 CPUID_AESNI_BIT = 57,
106 CPUID_RDRAND_BIT = 62
109 static bool x86_processor_flags_has(
u64bit bit)
111 return ((x86_processor_flags >> bit) & 1);
114 static u64bit x86_processor_flags;
115 static size_t cache_line;
116 static bool altivec_capable;
static size_t cache_line_size()
static bool has_altivec()
unsigned long long u64bit
static bool has_pcmuludq()