aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/cpuid/cpuid.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/utils/cpuid/cpuid.h')
-rw-r--r--src/lib/utils/cpuid/cpuid.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/utils/cpuid/cpuid.h b/src/lib/utils/cpuid/cpuid.h
index 4c0f1668b..633824a6c 100644
--- a/src/lib/utils/cpuid/cpuid.h
+++ b/src/lib/utils/cpuid/cpuid.h
@@ -98,6 +98,7 @@ class BOTAN_PUBLIC_API(2,1) CPUID final
CPUID_RDTSC_BIT = (1ULL << 10),
CPUID_BMI2_BIT = (1ULL << 11),
CPUID_ADX_BIT = (1ULL << 12),
+ CPUID_BMI1_BIT = (1ULL << 13),
// Crypto-specific ISAs
CPUID_AESNI_BIT = (1ULL << 16),
@@ -215,6 +216,12 @@ class BOTAN_PUBLIC_API(2,1) CPUID final
{ return has_cpuid_bit(CPUID_AVX512F_BIT); }
/**
+ * Check if the processor supports BMI1
+ */
+ static bool has_bmi1()
+ { return has_cpuid_bit(CPUID_BMI1_BIT); }
+
+ /**
* Check if the processor supports BMI2
*/
static bool has_bmi2()