summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Brooks <special@dereferenced.net>2010-06-28 18:13:50 (GMT)
committerBenjamin Poulain <benjamin.poulain@nokia.com>2010-06-28 18:13:50 (GMT)
commit2b599833c61de7bb164b0dffb5e28194d311972b (patch)
tree0a779c43afd078a6813d169304e1a987b2bfe202
parent2bf44ff6edc32eafa6d9ecd15c7c17eccc6a2ff8 (diff)
downloadQt-2b599833c61de7bb164b0dffb5e28194d311972b.zip
Qt-2b599833c61de7bb164b0dffb5e28194d311972b.tar.gz
Qt-2b599833c61de7bb164b0dffb5e28194d311972b.tar.bz2
Enable SSE2 for MSVC x64 builds, as it was incorrectly disabled
Merge-request: 718 Reviewed-by: Benjamin Poulain <benjamin.poulain@nokia.com>
-rw-r--r--src/corelib/global/qglobal.h6
-rw-r--r--src/corelib/tools/qsimd_p.h3
2 files changed, 4 insertions, 5 deletions
diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h
index 1eab394..76f35ac 100644
--- a/src/corelib/global/qglobal.h
+++ b/src/corelib/global/qglobal.h
@@ -412,15 +412,13 @@ namespace QT_NAMESPACE {}
# if defined(__INTEL_COMPILER)
# define Q_CC_INTEL
# endif
-/* x64 does not support mmx intrinsics on windows */
-# if (defined(Q_OS_WIN64) && defined(_M_X64))
+/* MSVC does not support SSE/MMX on x64 */
+# if (defined(Q_CC_MSVC) && defined(_M_X64))
# undef QT_HAVE_SSE
-# undef QT_HAVE_SSE2
# undef QT_HAVE_MMX
# undef QT_HAVE_3DNOW
# endif
-
#elif defined(__BORLANDC__) || defined(__TURBOC__)
# define Q_CC_BOR
# define Q_INLINE_TEMPLATE
diff --git a/src/corelib/tools/qsimd_p.h b/src/corelib/tools/qsimd_p.h
index cbe6146..58d2dcb 100644
--- a/src/corelib/tools/qsimd_p.h
+++ b/src/corelib/tools/qsimd_p.h
@@ -58,7 +58,8 @@ QT_BEGIN_HEADER
#endif
// SSE intrinsics
-#if defined(__SSE2__) && defined(QT_HAVE_SSE2) && !defined(QT_BOOTSTRAPPED)
+#if defined(QT_HAVE_SSE2) && !defined(QT_BOOTSTRAPPED) && (defined(__SSE2__) \
+ || (defined(Q_CC_MSVC) && (defined(_M_X64) || _M_IX86_FP == 2)))
#if defined(QT_LINUXBASE)
/// this is an evil hack - the posix_memalign declaration in LSB
/// is wrong - see http://bugs.linuxbase.org/show_bug.cgi?id=2431