diff options
author | lloyd <[email protected]> | 2010-06-25 00:26:36 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-06-25 00:26:36 +0000 |
commit | 2eadf49b54630897ab66bb382640b4427beb1744 (patch) | |
tree | 320b4f48528d7c46f10c506e190034a79d0c518c /src | |
parent | f1d8cb1f991290404f44710b277b311a92c141d9 (diff) |
Add detection support for upcoming AVX
Diffstat (limited to 'src')
-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 dbac89455..e0ccee515 100644 --- a/src/utils/cpuid.h +++ b/src/utils/cpuid.h @@ -54,6 +54,12 @@ class BOTAN_DLL CPUID { return ((x86_processor_flags() >> CPUID_SSE42_BIT) & 1); } /** + * Check if the processor supports extended AVX vector instructions + */ + static bool has_avx() + { return ((x86_processor_flags() >> CPUID_AVX_BIT) & 1); } + + /** * Check if the processor supports Intel's AES instructions */ static bool has_aes_intel() @@ -70,7 +76,8 @@ class BOTAN_DLL CPUID CPUID_SSSE3_BIT = 41, CPUID_SSE41_BIT = 51, CPUID_SSE42_BIT = 52, - CPUID_INTEL_AES_BIT = 57 + CPUID_INTEL_AES_BIT = 57, + CPUID_AVX_BIT = 60 }; static u64bit x86_processor_flags(); |