From 7b87469bc56b2bd44938e64611281e8e823a5841 Mon Sep 17 00:00:00 2001 From: Jonathan Liu Date: Fri, 27 Apr 2012 20:50:08 +1000 Subject: 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 --- src/corelib/tools/qsimd.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') 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" -- cgit v1.2.3