mirror of https://github.com/mpv-player/mpv
fix build on macintel, patch by Zuxy Meng
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18518 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
ca30ef19a6
commit
82619826dc
|
@ -43,8 +43,10 @@ static cpuid_regs_t
|
||||||
cpuid(int func) {
|
cpuid(int func) {
|
||||||
cpuid_regs_t regs;
|
cpuid_regs_t regs;
|
||||||
#define CPUID ".byte 0x0f, 0xa2; "
|
#define CPUID ".byte 0x0f, 0xa2; "
|
||||||
asm( CPUID
|
asm("mov %%ebx, %%esi\n\t"
|
||||||
: "=a" (regs.eax), "=b" (regs.ebx), "=c" (regs.ecx), "=d" (regs.edx)
|
CPUID"\n\t"
|
||||||
|
"xchg %%esi, %%ebx"
|
||||||
|
: "=a" (regs.eax), "=S" (regs.ebx), "=c" (regs.ecx), "=d" (regs.edx)
|
||||||
: "0" (func));
|
: "0" (func));
|
||||||
return regs;
|
return regs;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue