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