diff options
author | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-07-19 13:59:02 (GMT) |
---|---|---|
committer | Benjamin Poulain <benjamin.poulain@nokia.com> | 2010-07-19 14:06:12 (GMT) |
commit | f19a95429a5e9b760f49152ebdf9b39474750116 (patch) | |
tree | 48a7d29b2cac898f14bda207cca212c2839c78d0 /src/corelib/tools/qsimd.cpp | |
parent | cbbdb874e0340492b80c8abcd130d1f41a8cf2b3 (diff) | |
download | Qt-f19a95429a5e9b760f49152ebdf9b39474750116.zip Qt-f19a95429a5e9b760f49152ebdf9b39474750116.tar.gz Qt-f19a95429a5e9b760f49152ebdf9b39474750116.tar.bz2 |
Extend the detection of CPU feature for x86
Add detection of CPU extension for SSE3, SSSE3, SSE4.1, SSE4.2 and AVX.
Reviewed-by: Andreas Kling
Diffstat (limited to 'src/corelib/tools/qsimd.cpp')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 11 |
1 files changed, 11 insertions, 0 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) |