aboutsummaryrefslogtreecommitdiff
path: root/util/cpuinfo-i386.c
diff options
context:
space:
mode:
Diffstat (limited to 'util/cpuinfo-i386.c')
-rw-r--r--util/cpuinfo-i386.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/util/cpuinfo-i386.c b/util/cpuinfo-i386.c
index 8f2694d..c8c8a1b 100644
--- a/util/cpuinfo-i386.c
+++ b/util/cpuinfo-i386.c
@@ -34,11 +34,14 @@ unsigned __attribute__((constructor)) cpuinfo_init(void)
if (max >= 1) {
__cpuid(1, a, b, c, d);
+ info |= (d & bit_SSE2 ? CPUINFO_SSE2 : 0);
+ info |= (c & bit_OSXSAVE ? CPUINFO_OSXSAVE : 0);
info |= (c & bit_MOVBE ? CPUINFO_MOVBE : 0);
+ info |= (c & bit_POPCNT ? CPUINFO_POPCNT : 0);
info |= (c & bit_PCLMUL ? CPUINFO_PCLMUL : 0);
- /* NOTE: our AES support requires SSSE3 (PSHUFB) as well. */
- info |= (c & bit_AES) ? CPUINFO_AES : 0;
+ /* Our AES support requires PSHUFB as well. */
+ info |= ((c & bit_AES) && (c & bit_SSSE3) ? CPUINFO_AES : 0);
/* For AVX features, we must check available and usable. */
if ((c & bit_AVX) && (c & bit_OSXSAVE)) {