diff options
author | lloyd <[email protected]> | 2009-09-30 01:15:51 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2009-09-30 01:15:51 +0000 |
commit | 90180351e7370d0b6b93c2a69a5298bd4805ac83 (patch) | |
tree | 70c120b2a17dbb2a34d343f96d06a4062bfc2c52 /src/utils/cpuid.h | |
parent | 92fa61dd9909f39bacd8f2f64ae1d11c9fd1fb49 (diff) |
Add cpuid check for Intel AES
Diffstat (limited to 'src/utils/cpuid.h')
-rw-r--r-- | src/utils/cpuid.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/utils/cpuid.h b/src/utils/cpuid.h index 5f21e2310..0b210768a 100644 --- a/src/utils/cpuid.h +++ b/src/utils/cpuid.h @@ -20,7 +20,8 @@ class CPUID CPUID_SSE2_BIT = 26, CPUID_SSSE3_BIT = 41, CPUID_SSE41_BIT = 51, - CPUID_SSE42_BIT = 52 + CPUID_SSE42_BIT = 52, + CPUID_INTEL_AES_BIT = 57, }; /** @@ -58,6 +59,12 @@ class CPUID static bool has_sse42() { return ((x86_processor_flags() >> CPUID_SSE42_BIT) & 1); } + /** + * Check if the processor supports Intel AES instructions + */ + static bool has_intel_aes() + { return ((x86_processor_flags() >> CPUID_INTEL_AES_BIT) & 1); } + private: static u64bit x86_processor_flags(); }; |