annotate Plugins/Input/mpg123/decode_MMX.s @ 61:fa848bd484d8 trunk

[svn] Move plugins to Plugins/
author nenolod
date Fri, 28 Oct 2005 22:58:11 -0700
parents
children 05d824e30afd
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
61
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
1 # this code comes under GPL
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
3 .text
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
4
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
5 .globl mpg123_synth_MMX
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
6
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
7 mpg123_synth_MMX:
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
8 pushl %ebp
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
9 pushl %edi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
10 pushl %esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
11 pushl %ebx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
12 movl 24(%esp),%ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
13 movl 28(%esp),%edi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
14 movl $15,%ebx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
15 movl 36(%esp),%edx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
16 leal (%edi,%ecx,2),%edi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
17 decl %ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
18 movl 32(%esp),%esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
19 movl (%edx),%eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
20 jecxz .L1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
21 decl %eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
22 andl %ebx,%eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
23 leal 1088(%esi),%esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
24 movl %eax,(%edx)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
25 .L1:
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
26 leal (%esi,%eax,2),%edx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
27 movl %eax,%ebp
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
28 incl %eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
29 pushl 20(%esp)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
30 andl %ebx,%eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
31 leal 544(%esi,%eax,2),%ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
32 incl %ebx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
33 testl $1, %eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
34 jnz .L2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
35 xchgl %edx,%ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
36 incl %ebp
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
37 leal 544(%esi),%esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
38 .L2:
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
39 pushl %edx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
40 pushl %ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
41 call dct64_MMX
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
42 addl $12,%esp
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
43 leal 1(%ebx), %ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
44 subl %ebp,%ebx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
45
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
46 leal mpg123_decwins(%ebx,%ebx,1), %edx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
47 .L3:
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
48 movq (%edx),%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
49 pmaddwd (%esi),%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
50 movq 8(%edx),%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
51 pmaddwd 8(%esi),%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
52 movq 16(%edx),%mm2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
53 pmaddwd 16(%esi),%mm2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
54 movq 24(%edx),%mm3
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
55 pmaddwd 24(%esi),%mm3
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
56 paddd %mm1,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
57 paddd %mm2,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
58 paddd %mm3,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
59 movq %mm0,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
60 psrlq $32,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
61 paddd %mm1,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
62 psrad $13,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
63 packssdw %mm0,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
64 movd %mm0,%eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
65 movw %ax, (%edi)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
66
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
67 leal 32(%esi),%esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
68 leal 64(%edx),%edx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
69 leal 4(%edi),%edi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
70 loop .L3
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
71
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
72
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
73 subl $64,%esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
74 movl $15,%ecx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
75 .L4:
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
76 movq (%edx),%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
77 pmaddwd (%esi),%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
78 movq 8(%edx),%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
79 pmaddwd 8(%esi),%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
80 movq 16(%edx),%mm2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
81 pmaddwd 16(%esi),%mm2
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
82 movq 24(%edx),%mm3
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
83 pmaddwd 24(%esi),%mm3
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
84 paddd %mm1,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
85 paddd %mm2,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
86 paddd %mm3,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
87 movq %mm0,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
88 psrlq $32,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
89 paddd %mm0,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
90 psrad $13,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
91 packssdw %mm1,%mm1
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
92 psubd %mm0,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
93 psubsw %mm1,%mm0
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
94 movd %mm0,%eax
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
95 movw %ax,(%edi)
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
96
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
97 subl $32,%esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
98 addl $64,%edx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
99 leal 4(%edi),%edi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
100 loop .L4
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
101 emms
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
102 popl %ebx
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
103 popl %esi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
104 popl %edi
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
105 popl %ebp
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
106 ret
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
107
fa848bd484d8 [svn] Move plugins to Plugins/
nenolod
parents:
diff changeset
108