aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils/cpuid.h9
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();
};