diff options
author | Allen Winter <allen.winter@kdab.com> | 2014-04-09 21:36:52 (GMT) |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-04-18 00:04:46 (GMT) |
commit | bb8f570beaba5feddb09b1ff10a380ed8cc7f427 (patch) | |
tree | 95f7fcc08e858fc3af6a561c5ced5a67f854c358 | |
parent | d0b790dcd02da959cbdfc83d606906cead9e8375 (diff) | |
download | Qt-bb8f570beaba5feddb09b1ff10a380ed8cc7f427.zip Qt-bb8f570beaba5feddb09b1ff10a380ed8cc7f427.tar.gz Qt-bb8f570beaba5feddb09b1ff10a380ed8cc7f427.tar.bz2 |
Fix compilation using MinGW 64 due to missing __cpuid
Compile fails on Windows 64 using MinGW with the error message:
'__cpuid' was not declared in this scope.
fix by moving the Q_CC_GNU block above the WIN64 block
as suggested by Thiago in the QTBUG-34022 comments.
Task-number: QTBUG-34022
Change-Id: Iced4ac0b64f8ba986e49543ff3793ae8c0c33d14
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r-- | src/corelib/tools/qsimd.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp index 7203cb0..4745c8e 100644 --- a/src/corelib/tools/qsimd.cpp +++ b/src/corelib/tools/qsimd.cpp @@ -290,13 +290,7 @@ static inline uint detectProcessorFeatures() uint features = MMX|SSE|SSE2|CMOV; uint feature_result = 0; -#if defined (Q_OS_WIN64) - { - int info[4]; - __cpuid(info, 1); - feature_result = info[2]; - } -#elif defined(Q_CC_GNU) +#if defined(Q_CC_GNU) quint64 tmp; asm ("xchg %%rbx, %1\n" "cpuid\n" @@ -305,6 +299,12 @@ 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)) |