diff options
author | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-29 17:55:35 +0000 |
---|---|---|
committer | nick <nick@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-06-29 17:55:35 +0000 |
commit | 2ec6762923fea7f28331849b1d394f30dfce1aff (patch) | |
tree | 58ff3fcc1ac955a2b07e81d74fe489076e1fe631 /mp3lib/d_cpu.s | |
parent | bf8a76c06387345aa448b66ce2dff37ba0fcd69e (diff) | |
download | mpv-2ec6762923fea7f28331849b1d394f30dfce1aff.tar.bz2 mpv-2ec6762923fea7f28331849b1d394f30dfce1aff.tar.xz |
Added newest MMX-optimized decore which speedups decoding at least on 13% for any cpu.
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@1246 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib/d_cpu.s')
-rw-r--r-- | mp3lib/d_cpu.s | 48 |
1 files changed, 43 insertions, 5 deletions
diff --git a/mp3lib/d_cpu.s b/mp3lib/d_cpu.s index 0715ccccd1..6df924b241 100644 --- a/mp3lib/d_cpu.s +++ b/mp3lib/d_cpu.s @@ -9,6 +9,7 @@ .globl CpuDetect .globl ipentium .globl a3dnow +.globl isse / --------------------------------------------------------------------------- / in C: unsigned long CpuDetect( void ); @@ -45,7 +46,9 @@ exit_cpudetect: / --------------------------------------------------------------------------- / in C: unsigled long ipentium( void ); -/ return: 0 if the processor is not P5 or above else above 1. +/ return: 0 if this processor i386 or i486 +/ 1 otherwise +/ 2 if this cpu supports mmx / --------------------------------------------------------------------------- ipentium: pushl %ebx @@ -63,10 +66,15 @@ ipentium: jz no_cpuid movl $1,%eax cpuid - shrl $8,%eax - cmpl $5,%eax - jb no_cpuid - movl $1,%eax + movl %eax, %ecx + xorl %eax, %eax + shrl $8,%ecx + cmpl $5,%ecx + jb exit + incl %eax + test $0x00800000, %edx + jz exit + incl %eax jmp exit no_cpuid: xorl %eax,%eax @@ -113,3 +121,33 @@ exit2: popl %edx popl %ebx ret + +/ --------------------------------------------------------------------------- +/ in C: unsigned long isse( void ); +/ return: 0 if this processor does not support sse +/ 1 otherwise +/ 2 if this cpu supports sse2 extension +/ --------------------------------------------------------------------------- +isse: + pushl %ebx + pushl %edx + pushl %ecx + + call ipentium + testl %eax,%eax + jz exit3 + + movl $1,%eax + cpuid + xorl %eax, %eax + testl $0x02000000,%edx + jz exit3 + incl %eax + testl $0x04000000,%edx + jz exit3 + incl %eax +exit3: + popl %ecx + popl %edx + popl %ebx + ret |