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 | |
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')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 42 | ||||
-rw-r--r-- | src/corelib/tools/qsimd_p.h | 27 | ||||
-rw-r--r-- | src/gui/gui.pro | 4 |
3 files changed, 13 insertions, 60 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 diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h index 44428b7284..baf697a6f5 100644 --- a/src/corelib/tools/qsimd_p.h +++ b/src/corelib/tools/qsimd_p.h @@ -133,30 +133,19 @@ QT_BEGIN_HEADER #endif #endif -// 3D now intrinsics -#if defined(QT_HAVE_3DNOW) -#include <mm3dnow.h> -#endif - QT_BEGIN_NAMESPACE enum CPUFeatures { None = 0, - MMX = 0x1, - MMXEXT = 0x2, - MMX3DNOW = 0x4, - MMX3DNOWEXT = 0x8, - SSE = 0x10, - SSE2 = 0x20, - CMOV = 0x40, - IWMMXT = 0x80, - NEON = 0x100, - SSE3 = 0x200, - SSSE3 = 0x400, - SSE4_1 = 0x800, - SSE4_2 = 0x1000, - AVX = 0x2000 + IWMMXT = 0x1, + NEON = 0x2, + SSE2 = 0x4, + SSE3 = 0x8, + SSSE3 = 0x10, + SSE4_1 = 0x20, + SSE4_2 = 0x40, + AVX = 0x80 }; Q_CORE_EXPORT uint qDetectCPUFeatures(); diff --git a/src/gui/gui.pro b/src/gui/gui.pro index 1fb3790254..29e233de12 100644 --- a/src/gui/gui.pro +++ b/src/gui/gui.pro @@ -144,10 +144,6 @@ win32:!contains(QT_CONFIG, directwrite) { QMAKE_EXTRA_COMPILERS += iwmmxt_compiler } } else { - mmx: SOURCES += $$MMX_SOURCES - 3dnow: SOURCES += $$MMX3DNOW_SOURCES - 3dnow:sse: SOURCES += $$SSE3DNOW_SOURCES - sse: SOURCES += $$SSE_SOURCES sse2: SOURCES += $$SSE2_SOURCES ssse3: SOURCES += $$SSSE3_SOURCES iwmmxt: SOURCES += $$IWMMXT_SOURCES |