summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/tools/qsimd.cpp11
-rw-r--r--src/corelib/tools/qsimd_p.h7
2 files changed, 17 insertions, 1 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index 1ef513c..aa2ee47 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -218,6 +218,17 @@ uint qDetectCPUFeatures()
features |= SSE;
if (result & (1u << 26))
features |= SSE2;
+ if (extended_result & (1u))
+ features |= SSE3;
+ if (extended_result & (1u << 9))
+ features |= SSSE3;
+ if (extended_result & (1u << 19))
+ features |= SSE4_1;
+ if (extended_result & (1u << 20))
+ features |= SSE4_2;
+ if (extended_result & (1u << 28))
+ features |= AVX;
+
#endif // i386
#if defined(QT_HAVE_MMX)
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index 0ed9d5d..18394853 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -119,7 +119,12 @@ enum CPUFeatures {
SSE2 = 0x20,
CMOV = 0x40,
IWMMXT = 0x80,
- NEON = 0x100
+ NEON = 0x100,
+ SSE3 = 0x200,
+ SSSE3 = 0x400,
+ SSE4_1 = 0x800,
+ SSE4_2 = 0x1000,
+ AVX = 0x2000
};
Q_CORE_EXPORT uint qDetectCPUFeatures();