From fe8722bccbe45339550a68907b138674d7155fed Mon Sep 17 00:00:00 2001 From: pontscho Date: Wed, 9 May 2001 16:40:06 +0000 Subject: cpuid bug fixed. remelem. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@739 b3059339-0415-0410-9bf9-f77b7e298cf2 --- mp3lib/d_cpu.s | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'mp3lib') 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 / --------------------------------------------------------------------------- -- cgit v1.2.3