mirror of
https://github.com/mpv-player/mpv
synced 2025-02-20 06:46:55 +00:00
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_regs_t regs;
|
||||
#define CPUID ".byte 0x0f, 0xa2; "
|
||||
asm( CPUID
|
||||
: "=a" (regs.eax), "=b" (regs.ebx), "=c" (regs.ecx), "=d" (regs.edx)
|
||||
asm("mov %%ebx, %%esi\n\t"
|
||||
CPUID"\n\t"
|
||||
"xchg %%esi, %%ebx"
|
||||
: "=a" (regs.eax), "=S" (regs.ebx), "=c" (regs.ecx), "=d" (regs.edx)
|
||||
: "0" (func));
|
||||
return regs;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user