summaryrefslogtreecommitdiffstats
path: root/TOOLS/cpuinfo.c
diff options
context:
space:
mode:
authorgpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-15 15:10:23 +0000
committergpoirier <gpoirier@b3059339-0415-0410-9bf9-f77b7e298cf2>2006-05-15 15:10:23 +0000
commit82619826dc68eec8e1ba5e99a838422940cfba4d (patch)
treec60d0260ed1c97f6fffc720a0efb99ddbe147733 /TOOLS/cpuinfo.c
parentca30ef19a6f7d16ccce7a2e81ba8ee2c9d098013 (diff)
downloadmpv-82619826dc68eec8e1ba5e99a838422940cfba4d.tar.bz2
mpv-82619826dc68eec8e1ba5e99a838422940cfba4d.tar.xz
fix build on macintel, patch by Zuxy Meng
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@18518 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'TOOLS/cpuinfo.c')
-rw-r--r--TOOLS/cpuinfo.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/TOOLS/cpuinfo.c b/TOOLS/cpuinfo.c
index 7936a5518d..56ebe2087e 100644
--- a/TOOLS/cpuinfo.c
+++ b/TOOLS/cpuinfo.c
@@ -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;
}