Mercurial > mplayer.hg
comparison mp3lib/d_cpu.s @ 738:7705b51ab518
cpuid bug fixed. remelem.
author | pontscho |
---|---|
date | Wed, 09 May 2001 16:40:06 +0000 |
parents | bab1d9b1056a |
children | c0131b42214a |
comparison
equal
deleted
inserted
replaced
737:e8d5e6d4d85f | 738:7705b51ab518 |
---|---|
13 / --------------------------------------------------------------------------- | 13 / --------------------------------------------------------------------------- |
14 / in C: unsigned long CpuDetect( void ); | 14 / in C: unsigned long CpuDetect( void ); |
15 / return: cpu ident number. | 15 / return: cpu ident number. |
16 / --------------------------------------------------------------------------- | 16 / --------------------------------------------------------------------------- |
17 CpuDetect: | 17 CpuDetect: |
18 pushl %eax | |
18 pushl %ebx | 19 pushl %ebx |
19 pushl %ecx | 20 pushl %ecx |
20 pushl %edx | 21 pushl %edx |
21 | 22 |
22 movl $1,%eax | 23 pushfl |
24 popl %eax | |
25 movl %eax,%ebx | |
26 xorl $0x00200000,%eax | |
27 pushl %eax | |
28 popfl | |
29 pushfl | |
30 popl %eax | |
31 cmpl %eax,%ebx | |
32 jz no_cpuid_cpudetect | |
33 | |
34 movl $1,%eax | |
23 cpuid | 35 cpuid |
36 | |
37 jmp exit_cpudetect | |
38 no_cpuid_cpudetect: | |
39 xorl %eax,%eax | |
40 exit_cpudetect: | |
24 | 41 |
25 popl %edx | 42 popl %edx |
26 popl %ecx | 43 popl %ecx |
27 popl %ebx | 44 popl %ebx |
45 popl %eax | |
28 ret | 46 ret |
29 | 47 |
30 / --------------------------------------------------------------------------- | 48 / --------------------------------------------------------------------------- |
31 / in C: unsigled long ipentium( void ); | 49 / in C: unsigled long ipentium( void ); |
32 / return: 0 if the processor is not P5 or above else above 1. | 50 / return: 0 if the processor is not P5 or above else above 1. |