mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Merge pull request #4339 from unknownbrackets/linux-minor
Fix Linux x86 pic build (Qt) for some versions of gcc
This commit is contained in:
commit
e5d802e82f
3 changed files with 11 additions and 4 deletions
|
@ -1275,6 +1275,7 @@ endif()
|
|||
|
||||
# installs
|
||||
file(INSTALL ${NativeAssets} DESTINATION assets)
|
||||
file(INSTALL flash0 lang DESTINATION .)
|
||||
|
||||
# Fix CMake some Xcode settings.
|
||||
if(APPLE)
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
// For cache flushing on Symbian/iOS/Blackberry
|
||||
#ifdef __SYMBIAN32__
|
||||
|
|
|
@ -57,13 +57,18 @@ void __cpuidex(int regs[4], int cpuid_leaf, int ecxval)
|
|||
} else {
|
||||
ELOG("CPUID %08x failed!", cpuid_leaf);
|
||||
}
|
||||
#elif defined(__i386__) && defined(__PIC__)
|
||||
asm (
|
||||
"xchgl %%ebx, %1;\n\t"
|
||||
"cpuid;\n\t"
|
||||
"xchgl %%ebx, %1;\n\t"
|
||||
:"=a" (regs[0]), "=r" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
|
||||
:"a" (cpuid_leaf), "c" (ecxval));
|
||||
#else
|
||||
asm (
|
||||
"cpuid;\n\t"
|
||||
"movl %%ebx, %1;\n\t"
|
||||
:"=a" (regs[0]), "=m" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
|
||||
:"a" (cpuid_leaf), "c" (ecxval)
|
||||
:"%ebx");
|
||||
:"=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
|
||||
:"a" (cpuid_leaf), "c" (ecxval));
|
||||
#endif
|
||||
}
|
||||
void __cpuid(int regs[4], int cpuid_leaf)
|
||||
|
|
Loading…
Add table
Reference in a new issue