summaryrefslogtreecommitdiffstats
path: root/mp3lib
diff options
context:
space:
mode:
authorpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-05-09 16:40:06 +0000
committerpontscho <pontscho@b3059339-0415-0410-9bf9-f77b7e298cf2>2001-05-09 16:40:06 +0000
commitfe8722bccbe45339550a68907b138674d7155fed (patch)
treeeac72c9a62304c4b60bcaf23cc9de120bdd2bcaf /mp3lib
parent5ed67e6afaeab780f10ae7a968898001d026bf49 (diff)
downloadmpv-fe8722bccbe45339550a68907b138674d7155fed.tar.bz2
mpv-fe8722bccbe45339550a68907b138674d7155fed.tar.xz
cpuid bug fixed. remelem.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@739 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib')
-rw-r--r--mp3lib/d_cpu.s20
1 files changed, 19 insertions, 1 deletions
diff --git a/mp3lib/d_cpu.s b/mp3lib/d_cpu.s
index 1ddbd73a51..51620f904b 100644
--- a/mp3lib/d_cpu.s
+++ b/mp3lib/d_cpu.s
@@ -15,16 +15,34 @@
/ return: cpu ident number.
/ ---------------------------------------------------------------------------
CpuDetect:
+ pushl %eax
pushl %ebx
pushl %ecx
pushl %edx
- movl $1,%eax
+ pushfl
+ popl %eax
+ movl %eax,%ebx
+ xorl $0x00200000,%eax
+ pushl %eax
+ popfl
+ pushfl
+ popl %eax
+ cmpl %eax,%ebx
+ jz no_cpuid_cpudetect
+
+ movl $1,%eax
cpuid
+
+ jmp exit_cpudetect
+no_cpuid_cpudetect:
+ xorl %eax,%eax
+exit_cpudetect:
popl %edx
popl %ecx
popl %ebx
+ popl %eax
ret
/ ---------------------------------------------------------------------------