diff options
Diffstat (limited to 'mp3lib/d_cpu.s')
-rw-r--r-- | mp3lib/d_cpu.s | 20 |
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 / --------------------------------------------------------------------------- |