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>
This commit is contained in:
Jonathan Liu 2012-04-27 20:50:08 +10:00 committed by Qt by Nokia
parent e72a425e13
commit 7b87469bc5

View File

@ -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"