annotate mp3lib/decode_k7.s @ 763:b659160c629f

improvements
author nickols_k
date Fri, 11 May 2001 10:25:55 +0000
parents 59b0a9ec8604
children a349510321ff
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
1 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
2 /// Replacement of synth_1to1() with AMD's 3DNowEx(DSP)! SIMD operations support
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
3 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
4 /// This code based 'decode_3dnow.s' by Syuuhei Kashiyama
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
5 /// <squash@mb.kcom.ne.jp>,only some types of changes have been made:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
6 ///
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
7 /// - decreased number of opcodes (as it suggested by k7 manual)
b659160c629f improvements
nickols_k
parents: 736
diff changeset
8 /// (using memory reference as operand of instructions)
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
9 /// - change function name for support 3DNowEx! automatic detect
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
10 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
11 /// note: because K7 processors are an aggresive out-of-order three-way
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
12 /// superscalar ones instruction order is not significand for them.
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
13 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
14 /// Modified by Nick Kurshev <nickols_k@mail.ru>
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
15 ///
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
16 / synth_1to1_3dnow works the same way as the c version of
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
17 / synth_1to1. this assembler code based 'decode-i586.s'
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
18 / (by Stefan Bieschewski <stb@acm.org>), two types of changes
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
19 / have been made:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
20 / - use {MMX,3DNow!} instruction for reduce cpu
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
21 / - remove unused(?) local symbols
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
22 /
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
23 / useful sources of information on optimizing 3DNow! code include:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
24 / AMD 3DNow! Technology Manual (Publication #21928)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
25 / English: http://www.amd.com/K6/k6docs/pdf/21928d.pdf
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
26 / (Japanese: http://www.amd.com/japan/K6/k6docs/j21928c.pdf)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
27 / AMD-K6-2 Processor Code Optimization Application Note (Publication #21924)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
28 / English: http://www.amd.com/K6/k6docs/pdf/21924b.pdf
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
29 /
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
30 / This code was tested only AMD-K6-2 processor Linux systems,
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
31 / please tell me:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
32 / - whether this code works on other 3DNow! capable processors
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
33 / (ex.IDT-C6-2) or not
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
34 / - whether this code works on other OSes or not
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
35 /
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
36 / by KIMURA Takuhiro <kim@hannah.ipc.miyakyo-u.ac.jp> - until 31.Mar.1998
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
37 / <kim@comtec.co.jp> - after 1.Apr.1998
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
38
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
39 / Enhancments for q-word operation by Michael Hipp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
40
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
41 .bss
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
42 .comm buffs,4352,4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
43 .data
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
44 .align 4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
45 bo:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
46 .long 1
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
47 .text
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
48 .globl synth_1to1_3dnowex
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
49 synth_1to1_3dnowex:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
50 subl $12,%esp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
51 pushl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
52 pushl %edi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
53 pushl %esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
54 pushl %ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
55
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
56 movl 32(%esp),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
57 movl 40(%esp),%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
58 movl $0,%edi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
59 movl bo,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
60 cmpl %edi,36(%esp)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
61 jne .L48
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
62 decl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
63 andl $15,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
64 movl %ebp,bo
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
65 movl $buffs,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
66 jmp .L49
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
67 .L48:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
68 addl $2,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
69 movl $buffs+2176,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
70 .L49:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
71 testl $1,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
72 je .L50
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
73 movl %ecx,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
74 movl %ebp,16(%esp)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
75 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
76 movl 20(%esp),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
77 leal (%ebx,%edx,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
78 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
79 movl 24(%esp),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
80 incl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
81 andl $15,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
82 leal 1088(,%eax,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
83 addl %ebx,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
84 jmp .L74
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
85 .L50:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
86 leal 1088(%ecx),%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
87 leal 1(%ebp),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
88 movl %edx,16(%esp)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
89 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
90 leal 1092(%ecx,%ebp,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
91 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
92 leal (%ecx,%ebp,4),%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
93 .L74:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
94 pushl %eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
95 call dct64_3dnowex
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
96 addl $12,%esp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
97 movl 16(%esp),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
98 leal 0(,%edx,4),%edx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
99 movl $decwin+64,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
100 movl %eax,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
101 subl %edx,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
102 movl $16,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
103
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
104 .L55:
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
105
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
106 movq (%ecx),%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
107 movq 8(%ecx),%mm0
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
108 pfmul (%ebx),%mm4
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
109
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
110 pfmul 8(%ebx),%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
111 movq 16(%ebx),%mm3
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
112 pfadd %mm0,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
113
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
114 movq 24(%ecx),%mm0
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
115 pfmul 16(%ecx),%mm3
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
116 pfadd %mm3,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
117
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
118 pfmul 24(%ebx),%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
119 movq 32(%ebx),%mm3
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
120 pfadd %mm0,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
121
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
122 movq 40(%ecx),%mm0
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
123 pfmul 32(%ecx),%mm3
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
124 pfadd %mm3,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
125
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
126 pfmul 40(%ebx),%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
127 movq 48(%ebx),%mm3
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
128 pfadd %mm0,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
129
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
130 movq 56(%ecx),%mm0
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
131 pfmul 48(%ecx),%mm3
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
132 pfadd %mm3,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
133
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
134 pfmul 56(%ebx),%mm0
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
135 pfadd %mm0,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
136
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
137 movq %mm4,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
138 psrlq $32,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
139 pfsub %mm0,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
140
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
141 pf2id %mm4,%mm4
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
142 movd %mm4,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
143
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
144 sar $16,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
145 movw %ax,(%esi)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
146
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
147 addl $64,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
148 subl $-128,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
149 addl $4,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
150 decl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
151 jnz .L55
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
152
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
153 / --- end of loop 1 ---
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
154
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
155 movd (%ecx),%mm2
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
156 pfmul (%ebx),%mm2
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
157
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
158 movd 8(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
159 pfmul 8(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
160 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
161
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
162 movd 16(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
163 pfmul 16(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
164 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
165
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
166 movd 24(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
167 pfmul 24(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
168 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
169
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
170 movd 32(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
171 pfmul 32(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
172 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
173
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
174 movd 40(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
175 pfmul 40(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
176 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
177
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
178 movd 48(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
179 pfmul 48(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
180 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
181
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
182 movd 56(%ebx),%mm1
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
183 pfmul 56(%ecx),%mm1
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
184 pfadd %mm1,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
185
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
186 pf2id %mm2,%mm2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
187 movd %mm2,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
188
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
189 sar $16,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
190
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
191 movw %ax,(%esi)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
192
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
193 addl $-64,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
194 addl $4,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
195 addl $256,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
196 movl $15,%ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
197
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
198 .L68:
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
199 psubd %mm0,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
200
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
201 movq (%ecx),%mm2
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
202 pfmul (%ebx),%mm2
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
203 pfsub %mm2,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
204
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
205 movq 8(%ecx),%mm4
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
206 pfmul 8(%ebx),%mm4
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
207 pfsub %mm4,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
208
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
209 movq 16(%ecx),%mm2
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
210 pfmul 16(%ebx),%mm2
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
211 pfsub %mm2,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
212
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
213 movq 24(%ecx),%mm4
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
214 pfmul 24(%ebx),%mm4
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
215 pfsub %mm4,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
216
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
217 movq 32(%ecx),%mm2
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
218 pfmul 32(%ebx),%mm2
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
219 pfsub %mm2,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
220
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
221 movq 40(%ecx),%mm4
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
222 pfmul 40(%ebx),%mm4
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
223 pfsub %mm4,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
224
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
225 movq 48(%ecx),%mm2
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
226 pfmul 48(%ebx),%mm2
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
227 pfsub %mm2,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
228
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
229 movq 56(%ecx),%mm4
763
b659160c629f improvements
nickols_k
parents: 736
diff changeset
230 pfmul 56(%ebx),%mm4
736
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
231 pfsub %mm4,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
232
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
233 pfacc %mm0,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
234
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
235 pf2id %mm0,%mm0
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
236 movd %mm0,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
237
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
238 sar $16,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
239
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
240 movw %ax,(%esi)
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
241
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
242 addl $-64,%ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
243 subl $-128,%ecx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
244 addl $4,%esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
245 decl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
246 jnz .L68
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
247
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
248 / --- end of loop 2
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
249
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
250 femms
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
251
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
252 movl %edi,%eax
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
253 popl %ebx
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
254 popl %esi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
255 popl %edi
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
256 popl %ebp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
257 addl $12,%esp
59b0a9ec8604 K7 3dnow-dsp support
nickols_k
parents:
diff changeset
258 ret