summaryrefslogtreecommitdiffstats
path: root/src/corelib
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-12-13 10:39:16 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-12-13 10:39:16 (GMT)
commitd369ae7b831744c796571aa86b5d6570b09e70e4 (patch)
tree0ad8abef937ac3009f32b600a8e3b5644d7c637c /src/corelib
parentc8a2533cb39ce0c7479880cd889ad594d569ecc0 (diff)
parent044708cb7f7fd1f2d7b18d20269422e7f3a1cb83 (diff)
downloadQt-d369ae7b831744c796571aa86b5d6570b09e70e4.zip
Qt-d369ae7b831744c796571aa86b5d6570b09e70e4.tar.gz
Qt-d369ae7b831744c796571aa86b5d6570b09e70e4.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Conflicts: configure src/gui/graphicsview/qgraphicslayout.cpp src/gui/text/qfontengine_s60.cpp src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp src/opengl/qwindowsurface_gl.cpp src/s60installs/bwins/QtGuiu.def src/s60installs/eabi/QtGuiu.def tests/auto/qsortfilterproxymodel/tst_qsortfilterproxymodel.cpp
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/global/qendian.h5
-rw-r--r--src/corelib/tools/qsimd.cpp14
2 files changed, 9 insertions, 10 deletions
diff --git a/src/corelib/global/qendian.h b/src/corelib/global/qendian.h
index e0e946b..d7c5ee7 100644
--- a/src/corelib/global/qendian.h
+++ b/src/corelib/global/qendian.h
@@ -44,9 +44,8 @@
#include <QtCore/qglobal.h>
-#ifdef Q_OS_LINUX
-# include <features.h>
-#endif
+// include stdlib.h and hope that it defines __GLIBC__ for glibc-based systems
+#include <stdlib.h>
#ifdef __GLIBC__
#include <byteswap.h>
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index d44a9d0..f862fc5 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -290,7 +290,13 @@ static inline uint detectProcessorFeatures()
uint features = MMX|SSE|SSE2|CMOV;
uint feature_result = 0;
-#if defined(Q_CC_GNU)
+#if defined (Q_OS_WIN64)
+ {
+ int info[4];
+ __cpuid(info, 1);
+ feature_result = info[2];
+ }
+#elif defined(Q_CC_GNU)
quint64 tmp;
asm ("xchg %%rbx, %1\n"
"cpuid\n"
@@ -299,12 +305,6 @@ static inline uint detectProcessorFeatures()
: "a" (1)
: "%edx"
);
-#elif defined (Q_OS_WIN64)
- {
- int info[4];
- __cpuid(info, 1);
- feature_result = info[2];
- }
#endif
if (feature_result & (1u))