summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonathan Liu <net147@gmail.com>2012-04-27 20:50:08 +1000
committerQt by Nokia <qt-info@nokia.com>2012-04-30 01:06:47 +0200
commit7b87469bc56b2bd44938e64611281e8e823a5841 (patch)
treebbba6af0411480b531090327fe895526fe301970
parente72a425e13ab3528a019f0fa4d06f79d4e785891 (diff)
Fix MinGW-w64 compilation
Use qintptr and quintptr for exchanging data with registers for cpuid as the size of long does not match the size of the register on Win64 which uses the LLP64 data model. Change-Id: I23b8c8e0977166f7e62795c16e9080e44d9f25f5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
-rw-r--r--src/corelib/tools/qsimd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/tools/qsimd.cpp b/src/corelib/tools/qsimd.cpp
index c23dc92e96..ac21e5beb9 100644
--- a/src/corelib/tools/qsimd.cpp
+++ b/src/corelib/tools/qsimd.cpp
@@ -157,7 +157,7 @@ static inline uint detectProcessorFeatures()
static int maxBasicCpuidSupported()
{
#if defined(Q_CC_GNU)
- long tmp1;
+ qintptr tmp1;
# ifdef Q_PROCESSOR_X86_32
// check if the CPUID instruction is supported
@@ -198,7 +198,7 @@ static int maxBasicCpuidSupported()
static void cpuidFeatures01(uint &ecx, uint &edx)
{
#if defined(Q_CC_GNU)
- long tmp1;
+ qintptr tmp1;
asm ("xchg " PICreg", %2\n"
"cpuid\n"
"xchg " PICreg", %2\n"
@@ -215,7 +215,7 @@ static void cpuidFeatures01(uint &ecx, uint &edx)
static void cpuidFeatures07_00(uint &ebx)
{
#if defined(Q_CC_GNU)
- unsigned long rbx; // in case it's 64-bit
+ quintptr rbx; // in case it's 64-bit
asm ("xchg " PICreg", %0\n"
"cpuid\n"
"xchg " PICreg", %0\n"