diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2011-12-29 19:24:54 -0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-23 19:43:00 +0100 |
commit | a1b30b49ef09bef2e97b9a0622bf7ad622678fee (patch) | |
tree | d5cdfc869e4b2349a4237d6fd621474b12d3f2a3 /src/corelib/tools/qsimd.cpp | |
parent | accfdc85e5cb1816b3eda02ec8d37474259c247e (diff) |
Remove detection for MMX support and related technology
This also removes the check for SSE, but the check for SSE2 and
further technologies is kept. If SSE2 is present, then SSE is too. We
don't have any code that uses the original SSE instructions only.
Remove the CMOV detection, since we don't use that anywhere and we're
not likely to ever use them..
Change-Id: I3faf2c555ad1c007c52a54644138902f716c1fe1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/tools/qsimd.cpp')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 42 |
1 files changed, 5 insertions, 37 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index a74a140582..0d816bd736 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -88,14 +88,6 @@ static inline uint detectProcessorFeatures() } #elif defined(_X86_) features = 0; -#if defined QT_HAVE_MMX - if (IsProcessorFeaturePresent(PF_MMX_INSTRUCTIONS_AVAILABLE)) - features |= MMX; -#endif -#if defined QT_HAVE_3DNOW - if (IsProcessorFeaturePresent(PF_3DNOW_INSTRUCTIONS_AVAILABLE)) - features |= MMX3DNOW; -#endif return features; #endif features = 0; @@ -255,18 +247,6 @@ static inline uint detectProcessorFeatures() // result now contains the standard feature bits - if (result & (1u << 15)) - features |= CMOV; - if (result & (1u << 23)) - features |= MMX; - if (extended_result & (1u << 22)) - features |= MMXEXT; - if (extended_result & (1u << 31)) - features |= MMX3DNOW; - if (extended_result & (1u << 30)) - features |= MMX3DNOWEXT; - if (result & (1u << 25)) - features |= SSE; if (result & (1u << 26)) features |= SSE2; if (feature_result & (1u)) @@ -286,7 +266,7 @@ static inline uint detectProcessorFeatures() #elif defined(__x86_64) || defined(Q_OS_WIN64) static inline uint detectProcessorFeatures() { - uint features = MMX|SSE|SSE2|CMOV; + uint features = SSE2; uint feature_result = 0; #if defined (Q_OS_WIN64) @@ -330,15 +310,9 @@ static inline uint detectProcessorFeatures() /* * Use kdesdk/scripts/generate_string_table.pl to update the table below. * Here's the data (don't forget the ONE leading space): - mmx - mmxext - mmx3dnow - mmx3dnowext - sse - sse2 - cmov iwmmxt neon + sse2 sse3 ssse3 sse4.1 @@ -348,15 +322,9 @@ static inline uint detectProcessorFeatures() // begin generated static const char features_string[] = - " mmx\0" - " mmxext\0" - " mmx3dnow\0" - " mmx3dnowext\0" - " sse\0" - " sse2\0" - " cmov\0" " iwmmxt\0" " neon\0" + " sse2\0" " sse3\0" " ssse3\0" " sse4.1\0" @@ -365,8 +333,8 @@ static const char features_string[] = "\0"; static const int features_indices[] = { - 0, 5, 13, 23, 36, 41, 47, 53, - 61, 67, 73, 80, 88, 96, -1 + 0, 8, 14, 20, 26, 33, 41, 49, + -1 }; // end generated |