Skip to content

Commit

Permalink
X32 Patch
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnietsky committed Dec 7, 2013
1 parent e8b1436 commit 7c45322
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/corelib/tools/qsimd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ static inline uint detectProcessorFeatures()
static int maxBasicCpuidSupported()
{
#if defined(Q_CC_GNU)
#ifndef __ILP32__
qintptr tmp1;
#else
long long tmp1;
#endif

# ifdef Q_PROCESSOR_X86_32
// check if the CPUID instruction is supported
Expand Down Expand Up @@ -198,7 +202,11 @@ static int maxBasicCpuidSupported()
static void cpuidFeatures01(uint &ecx, uint &edx)
{
#if defined(Q_CC_GNU)
#ifndef __ILP32__
qintptr tmp1;
#else
long long tmp1;
#endif
asm ("xchg " PICreg", %2\n"
"cpuid\n"
"xchg " PICreg", %2\n"
Expand All @@ -219,7 +227,11 @@ inline void __cpuidex(int info[4], int, __int64) { memset(info, 0, 4*sizeof(int)
static void cpuidFeatures07_00(uint &ebx)
{
#if defined(Q_CC_GNU)
#ifndef __ILP32__
quintptr rbx; // in case it's 64-bit
#else
long long rbx; // in case it's 64-bit
#endif
asm ("xchg " PICreg", %0\n"
"cpuid\n"
"xchg " PICreg", %0\n"
Expand Down

0 comments on commit 7c45322

Please sign in to comment.