diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-28 20:17:00 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-07-28 20:17:00 (GMT) |
commit | 3d48bdf168cb98baf1969e5da4d008ba7ac86edb (patch) | |
tree | e905f93728b377475383560ddfbd8a8905df194f /src/corelib/tools/qsimd.cpp | |
parent | 953e91c582cd396082250748e4c4d8424292c1de (diff) | |
parent | 0318f0d5a43a78831f3bf4cb043d0b2b41cd9987 (diff) | |
download | Qt-3d48bdf168cb98baf1969e5da4d008ba7ac86edb.zip Qt-3d48bdf168cb98baf1969e5da4d008ba7ac86edb.tar.gz Qt-3d48bdf168cb98baf1969e5da4d008ba7ac86edb.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
QMenu and QStyleSheetStyle: fix setting a border.
tst_qlistview: use QTRY_COMPARE
Fix compilation on 64-bit Windows.
Fix missing license header
Add test for getting a backtrace in QML
Doc: add link to new gettings started to index.html
Doc: Added new getting started document.
QtDeclarative: Give name to function bindings and signals.
Diffstat (limited to 'src/corelib/tools/qsimd.cpp')
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 5aa7217..8005d7d 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -46,6 +46,10 @@ #include <windows.h> #endif +#if defined(Q_OS_WIN64) && !defined(Q_CC_GNU) +#include <intrin.h> +#endif + QT_BEGIN_NAMESPACE uint qDetectCPUFeatures() @@ -261,31 +265,10 @@ uint qDetectCPUFeatures() : "%eax", "%ecx", "%edx" ); #elif defined (Q_OS_WIN64) - _asm { - push rax - push rbx - push rcx - push rdx - pushfd - pop rax - mov ebx, eax - xor eax, 00200000h - push rax - popfd - pushfd - pop rax - mov edx, 0 - xor eax, ebx - jz skip - - mov eax, 1 - cpuid - mov feature_result, ecx - skip: - pop rdx - pop rcx - pop rbx - pop rax + { + int info[4]; + __cpuid(info, 1); + feature_result = info[2]; } #endif |