annotate mp3lib/dct64_k7.c @ 4708:000ca7a19331

mem2agpcpy_pic()
author michael
date Thu, 14 Feb 2002 22:34:24 +0000
parents 3b29772a4fb2
children 421969d55d5f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4148
nick
parents:
diff changeset
1 /*
nick
parents:
diff changeset
2 * This code was taken from http://www.mpg123.org
nick
parents:
diff changeset
3 * See ChangeLog of mpg123-0.59s-pre.1 for detail
nick
parents:
diff changeset
4 * Applied to mplayer by Nick Kurshev <nickols_k@mail.ru>
nick
parents:
diff changeset
5 * Partial 3dnowex-DSP! optimization by Nick Kurshev
nick
parents:
diff changeset
6 *
nick
parents:
diff changeset
7 * TODO: optimize scalar 3dnow! code
nick
parents:
diff changeset
8 * Warning: Phases 7 & 8 are not tested
nick
parents:
diff changeset
9 */
nick
parents:
diff changeset
10 #define real float /* ugly - but only way */
nick
parents:
diff changeset
11
nick
parents:
diff changeset
12 static unsigned long long int __attribute__((aligned(8))) x_plus_minus_3dnow = 0x8000000000000000ULL;
nick
parents:
diff changeset
13 static float plus_1f = 1.0;
nick
parents:
diff changeset
14
nick
parents:
diff changeset
15 void __attribute__ (( __stdcall__ )) dct64_MMX_3dnowex(real *a,real *b,real *c)
nick
parents:
diff changeset
16 {
nick
parents:
diff changeset
17 char tmp[256];
nick
parents:
diff changeset
18 __asm __volatile(
nick
parents:
diff changeset
19 " movl %2,%%eax\n\t"
nick
parents:
diff changeset
20
nick
parents:
diff changeset
21 " leal 128+%3,%%edx\n\t"
nick
parents:
diff changeset
22 " movl %0,%%esi\n\t"
nick
parents:
diff changeset
23 " movl %1,%%edi\n\t"
nick
parents:
diff changeset
24 " movl $costab_mmx,%%ebx\n\t"
nick
parents:
diff changeset
25 " leal %3,%%ecx\n\t"
nick
parents:
diff changeset
26
nick
parents:
diff changeset
27 /* Phase 1*/
nick
parents:
diff changeset
28 " movq (%%eax), %%mm0\n\t"
nick
parents:
diff changeset
29 " movq 8(%%eax), %%mm4\n\t"
nick
parents:
diff changeset
30 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
31 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
32 " movq 120(%%eax), %%mm1\n\t"
nick
parents:
diff changeset
33 " movq 112(%%eax), %%mm5\n\t"
nick
parents:
diff changeset
34 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
35 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
36 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
37 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
38 " movq %%mm0, (%%edx)\n\t"
nick
parents:
diff changeset
39 " movq %%mm4, 8(%%edx)\n\t"
nick
parents:
diff changeset
40 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
41 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
42 " pfmul (%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
43 " pfmul 8(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
44 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
45 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
46 " movq %%mm3, 120(%%edx)\n\t"
nick
parents:
diff changeset
47 " movq %%mm7, 112(%%edx)\n\t"
nick
parents:
diff changeset
48
nick
parents:
diff changeset
49 " movq 16(%%eax), %%mm0\n\t"
nick
parents:
diff changeset
50 " movq 24(%%eax), %%mm4\n\t"
nick
parents:
diff changeset
51 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
52 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
53 " movq 104(%%eax), %%mm1\n\t"
nick
parents:
diff changeset
54 " movq 96(%%eax), %%mm5\n\t"
nick
parents:
diff changeset
55 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
56 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
57 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
58 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
59 " movq %%mm0, 16(%%edx)\n\t"
nick
parents:
diff changeset
60 " movq %%mm4, 24(%%edx)\n\t"
nick
parents:
diff changeset
61 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
62 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
63 " pfmul 16(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
64 " pfmul 24(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
65 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
66 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
67 " movq %%mm3, 104(%%edx)\n\t"
nick
parents:
diff changeset
68 " movq %%mm7, 96(%%edx)\n\t"
nick
parents:
diff changeset
69
nick
parents:
diff changeset
70 " movq 32(%%eax), %%mm0\n\t"
nick
parents:
diff changeset
71 " movq 40(%%eax), %%mm4\n\t"
nick
parents:
diff changeset
72 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
73 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
74 " movq 88(%%eax), %%mm1\n\t"
nick
parents:
diff changeset
75 " movq 80(%%eax), %%mm5\n\t"
nick
parents:
diff changeset
76 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
77 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
78 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
79 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
80 " movq %%mm0, 32(%%edx)\n\t"
nick
parents:
diff changeset
81 " movq %%mm4, 40(%%edx)\n\t"
nick
parents:
diff changeset
82 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
83 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
84 " pfmul 32(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
85 " pfmul 40(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
86 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
87 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
88 " movq %%mm3, 88(%%edx)\n\t"
nick
parents:
diff changeset
89 " movq %%mm7, 80(%%edx)\n\t"
nick
parents:
diff changeset
90
nick
parents:
diff changeset
91 " movq 48(%%eax), %%mm0\n\t"
nick
parents:
diff changeset
92 " movq 56(%%eax), %%mm4\n\t"
nick
parents:
diff changeset
93 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
94 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
95 " movq 72(%%eax), %%mm1\n\t"
nick
parents:
diff changeset
96 " movq 64(%%eax), %%mm5\n\t"
nick
parents:
diff changeset
97 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
98 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
99 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
100 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
101 " movq %%mm0, 48(%%edx)\n\t"
nick
parents:
diff changeset
102 " movq %%mm4, 56(%%edx)\n\t"
nick
parents:
diff changeset
103 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
104 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
105 " pfmul 48(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
106 " pfmul 56(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
107 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
108 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
109 " movq %%mm3, 72(%%edx)\n\t"
nick
parents:
diff changeset
110 " movq %%mm7, 64(%%edx)\n\t"
nick
parents:
diff changeset
111
nick
parents:
diff changeset
112 /* Phase 2*/
nick
parents:
diff changeset
113
nick
parents:
diff changeset
114 " movq (%%edx), %%mm0\n\t"
nick
parents:
diff changeset
115 " movq 8(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
116 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
117 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
118 " movq 56(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
119 " movq 48(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
120 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
121 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
122 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
123 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
124 " movq %%mm0, (%%ecx)\n\t"
nick
parents:
diff changeset
125 " movq %%mm4, 8(%%ecx)\n\t"
nick
parents:
diff changeset
126 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
127 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
128 " pfmul 64(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
129 " pfmul 72(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
130 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
131 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
132 " movq %%mm3, 56(%%ecx)\n\t"
nick
parents:
diff changeset
133 " movq %%mm7, 48(%%ecx)\n\t"
nick
parents:
diff changeset
134
nick
parents:
diff changeset
135 " movq 16(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
136 " movq 24(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
137 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
138 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
139 " movq 40(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
140 " movq 32(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
141 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
142 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
143 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
144 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
145 " movq %%mm0, 16(%%ecx)\n\t"
nick
parents:
diff changeset
146 " movq %%mm4, 24(%%ecx)\n\t"
nick
parents:
diff changeset
147 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
148 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
149 " pfmul 80(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
150 " pfmul 88(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
151 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
152 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
153 " movq %%mm3, 40(%%ecx)\n\t"
nick
parents:
diff changeset
154 " movq %%mm7, 32(%%ecx)\n\t"
nick
parents:
diff changeset
155
nick
parents:
diff changeset
156 /* Phase 3*/
nick
parents:
diff changeset
157
nick
parents:
diff changeset
158 " movq 64(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
159 " movq 72(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
160 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
161 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
162 " movq 120(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
163 " movq 112(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
164 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
165 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
166 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
167 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
168 " movq %%mm0, 64(%%ecx)\n\t"
nick
parents:
diff changeset
169 " movq %%mm4, 72(%%ecx)\n\t"
nick
parents:
diff changeset
170 " pfsubr %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
171 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
172 " pfmul 64(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
173 " pfmul 72(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
174 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
175 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
176 " movq %%mm3, 120(%%ecx)\n\t"
nick
parents:
diff changeset
177 " movq %%mm7, 112(%%ecx)\n\t"
nick
parents:
diff changeset
178
nick
parents:
diff changeset
179 " movq 80(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
180 " movq 88(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
181 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
182 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
183 " movq 104(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
184 " movq 96(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
185 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
186 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
187 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
188 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
189 " movq %%mm0, 80(%%ecx)\n\t"
nick
parents:
diff changeset
190 " movq %%mm4, 88(%%ecx)\n\t"
nick
parents:
diff changeset
191 " pfsubr %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
192 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
193 " pfmul 80(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
194 " pfmul 88(%%ebx), %%mm7\n\t"
nick
parents:
diff changeset
195 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
196 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
197 " movq %%mm3, 104(%%ecx)\n\t"
nick
parents:
diff changeset
198 " movq %%mm7, 96(%%ecx)\n\t"
nick
parents:
diff changeset
199
nick
parents:
diff changeset
200 /* Phase 4*/
nick
parents:
diff changeset
201
nick
parents:
diff changeset
202 " movq 96(%%ebx), %%mm2\n\t"
nick
parents:
diff changeset
203 " movq 104(%%ebx), %%mm6\n\t"
nick
parents:
diff changeset
204
nick
parents:
diff changeset
205 " movq (%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
206 " movq 8(%%ecx), %%mm4\n\t"
nick
parents:
diff changeset
207 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
208 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
209 " movq 24(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
210 " movq 16(%%ecx), %%mm5\n\t"
nick
parents:
diff changeset
211 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
212 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
213 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
214 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
215 " movq %%mm0, (%%edx)\n\t"
nick
parents:
diff changeset
216 " movq %%mm4, 8(%%edx)\n\t"
nick
parents:
diff changeset
217 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
218 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
219 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
220 " pfmul %%mm6, %%mm7\n\t"
nick
parents:
diff changeset
221 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
222 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
223 " movq %%mm3, 24(%%edx)\n\t"
nick
parents:
diff changeset
224 " movq %%mm7, 16(%%edx)\n\t"
nick
parents:
diff changeset
225
nick
parents:
diff changeset
226 " movq 32(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
227 " movq 40(%%ecx), %%mm4\n\t"
nick
parents:
diff changeset
228 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
229 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
230 " movq 56(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
231 " movq 48(%%ecx), %%mm5\n\t"
nick
parents:
diff changeset
232 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
233 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
234 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
235 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
236 " movq %%mm0, 32(%%edx)\n\t"
nick
parents:
diff changeset
237 " movq %%mm4, 40(%%edx)\n\t"
nick
parents:
diff changeset
238 " pfsubr %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
239 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
240 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
241 " pfmul %%mm6, %%mm7\n\t"
nick
parents:
diff changeset
242 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
243 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
244 " movq %%mm3, 56(%%edx)\n\t"
nick
parents:
diff changeset
245 " movq %%mm7, 48(%%edx)\n\t"
nick
parents:
diff changeset
246
nick
parents:
diff changeset
247 " movq 64(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
248 " movq 72(%%ecx), %%mm4\n\t"
nick
parents:
diff changeset
249 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
250 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
251 " movq 88(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
252 " movq 80(%%ecx), %%mm5\n\t"
nick
parents:
diff changeset
253 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
254 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
255 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
256 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
257 " movq %%mm0, 64(%%edx)\n\t"
nick
parents:
diff changeset
258 " movq %%mm4, 72(%%edx)\n\t"
nick
parents:
diff changeset
259 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
260 " pfsub %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
261 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
262 " pfmul %%mm6, %%mm7\n\t"
nick
parents:
diff changeset
263 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
264 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
265 " movq %%mm3, 88(%%edx)\n\t"
nick
parents:
diff changeset
266 " movq %%mm7, 80(%%edx)\n\t"
nick
parents:
diff changeset
267
nick
parents:
diff changeset
268 " movq 96(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
269 " movq 104(%%ecx), %%mm4\n\t"
nick
parents:
diff changeset
270 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
271 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
272 " movq 120(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
273 " movq 112(%%ecx), %%mm5\n\t"
nick
parents:
diff changeset
274 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
275 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
276 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
277 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
278 " movq %%mm0, 96(%%edx)\n\t"
nick
parents:
diff changeset
279 " movq %%mm4, 104(%%edx)\n\t"
nick
parents:
diff changeset
280 " pfsubr %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
281 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
282 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
283 " pfmul %%mm6, %%mm7\n\t"
nick
parents:
diff changeset
284 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
285 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
286 " movq %%mm3, 120(%%edx)\n\t"
nick
parents:
diff changeset
287 " movq %%mm7, 112(%%edx)\n\t"
nick
parents:
diff changeset
288
nick
parents:
diff changeset
289 /* Phase 5 */
nick
parents:
diff changeset
290
nick
parents:
diff changeset
291 " movq 112(%%ebx), %%mm2\n\t"
nick
parents:
diff changeset
292
nick
parents:
diff changeset
293 " movq (%%edx), %%mm0\n\t"
nick
parents:
diff changeset
294 " movq 16(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
295 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
296 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
297 " movq 8(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
298 " movq 24(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
299 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
300 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
301 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
302 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
303 " movq %%mm0, (%%ecx)\n\t"
nick
parents:
diff changeset
304 " movq %%mm4, 16(%%ecx)\n\t"
nick
parents:
diff changeset
305 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
306 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
307 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
308 " pfmul %%mm2, %%mm7\n\t"
nick
parents:
diff changeset
309 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
310 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
311 " movq %%mm3, 8(%%ecx)\n\t"
nick
parents:
diff changeset
312 " movq %%mm7, 24(%%ecx)\n\t"
nick
parents:
diff changeset
313
nick
parents:
diff changeset
314 " movq 32(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
315 " movq 48(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
316 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
317 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
318 " movq 40(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
319 " movq 56(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
320 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
321 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
322 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
323 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
324 " movq %%mm0, 32(%%ecx)\n\t"
nick
parents:
diff changeset
325 " movq %%mm4, 48(%%ecx)\n\t"
nick
parents:
diff changeset
326 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
327 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
328 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
329 " pfmul %%mm2, %%mm7\n\t"
nick
parents:
diff changeset
330 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
331 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
332 " movq %%mm3, 40(%%ecx)\n\t"
nick
parents:
diff changeset
333 " movq %%mm7, 56(%%ecx)\n\t"
nick
parents:
diff changeset
334
nick
parents:
diff changeset
335 " movq 64(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
336 " movq 80(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
337 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
338 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
339 " movq 72(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
340 " movq 88(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
341 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
342 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
343 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
344 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
345 " movq %%mm0, 64(%%ecx)\n\t"
nick
parents:
diff changeset
346 " movq %%mm4, 80(%%ecx)\n\t"
nick
parents:
diff changeset
347 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
348 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
349 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
350 " pfmul %%mm2, %%mm7\n\t"
nick
parents:
diff changeset
351 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
352 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
353 " movq %%mm3, 72(%%ecx)\n\t"
nick
parents:
diff changeset
354 " movq %%mm7, 88(%%ecx)\n\t"
nick
parents:
diff changeset
355
nick
parents:
diff changeset
356 " movq 96(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
357 " movq 112(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
358 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
359 " movq %%mm4, %%mm7\n\t"
nick
parents:
diff changeset
360 " movq 104(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
361 " movq 120(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
362 " pswapd %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
363 " pswapd %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
364 " pfadd %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
365 " pfadd %%mm5, %%mm4\n\t"
nick
parents:
diff changeset
366 " movq %%mm0, 96(%%ecx)\n\t"
nick
parents:
diff changeset
367 " movq %%mm4, 112(%%ecx)\n\t"
nick
parents:
diff changeset
368 " pfsub %%mm1, %%mm3\n\t"
nick
parents:
diff changeset
369 " pfsubr %%mm5, %%mm7\n\t"
nick
parents:
diff changeset
370 " pfmul %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
371 " pfmul %%mm2, %%mm7\n\t"
nick
parents:
diff changeset
372 " pswapd %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
373 " pswapd %%mm7, %%mm7\n\t"
nick
parents:
diff changeset
374 " movq %%mm3, 104(%%ecx)\n\t"
nick
parents:
diff changeset
375 " movq %%mm7, 120(%%ecx)\n\t"
nick
parents:
diff changeset
376
nick
parents:
diff changeset
377
nick
parents:
diff changeset
378 /* Phase 6. This is the end of easy road. */
nick
parents:
diff changeset
379 /* Code below is coded in scalar mode. Should be optimized */
nick
parents:
diff changeset
380
nick
parents:
diff changeset
381 " movd plus_1f, %%mm6\n\t"
nick
parents:
diff changeset
382 " punpckldq 120(%%ebx), %%mm6\n\t" /* mm6 = 1.0 | 120(%%ebx)*/
nick
parents:
diff changeset
383 " movq x_plus_minus_3dnow, %%mm7\n\t" /* mm7 = +1 | -1 */
nick
parents:
diff changeset
384
nick
parents:
diff changeset
385 " movq 32(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
386 " movq 64(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
387 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
388 " movq %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
389 " pxor %%mm7, %%mm1\n\t"
nick
parents:
diff changeset
390 " pxor %%mm7, %%mm3\n\t"
nick
parents:
diff changeset
391 " pfacc %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
392 " pfacc %%mm3, %%mm2\n\t"
nick
parents:
diff changeset
393 " pfmul %%mm6, %%mm0\n\t"
nick
parents:
diff changeset
394 " pfmul %%mm6, %%mm2\n\t"
nick
parents:
diff changeset
395 " movq %%mm0, 32(%%edx)\n\t"
nick
parents:
diff changeset
396 " movq %%mm2, 64(%%edx)\n\t"
nick
parents:
diff changeset
397
nick
parents:
diff changeset
398 " movd 44(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
399 " movd 40(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
400 " movd 120(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
401 " punpckldq 76(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
402 " punpckldq 72(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
403 " punpckldq %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
404 " movq %%mm0, %%mm4\n\t"
nick
parents:
diff changeset
405 " movq %%mm2, %%mm5\n\t"
nick
parents:
diff changeset
406 " pfsub %%mm2, %%mm0\n\t"
nick
parents:
diff changeset
407 " pfmul %%mm3, %%mm0\n\t"
nick
parents:
diff changeset
408 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
409 " pfadd %%mm5, %%mm0\n\t"
nick
parents:
diff changeset
410 " pfadd %%mm4, %%mm0\n\t"
nick
parents:
diff changeset
411 " movq %%mm0, %%mm2\n\t"
nick
parents:
diff changeset
412 " punpckldq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
413 " punpckhdq %%mm1, %%mm2\n\t"
nick
parents:
diff changeset
414 " movq %%mm0, 40(%%edx)\n\t"
nick
parents:
diff changeset
415 " movq %%mm2, 72(%%edx)\n\t"
nick
parents:
diff changeset
416
nick
parents:
diff changeset
417 " movd 48(%%ecx), %%mm3\n\t"
nick
parents:
diff changeset
418 " movd 60(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
419 " pfsub 52(%%ecx), %%mm3\n\t"
nick
parents:
diff changeset
420 " pfsub 56(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
421 " pfmul 120(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
422 " pfmul 120(%%ebx), %%mm2\n\t"
nick
parents:
diff changeset
423 " movq %%mm2, %%mm1\n\t"
nick
parents:
diff changeset
424
nick
parents:
diff changeset
425 " pfadd 56(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
426 " pfadd 60(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
427 " movq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
428
nick
parents:
diff changeset
429 " pfadd 48(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
430 " pfadd 52(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
431 " pfadd %%mm3, %%mm1\n\t"
nick
parents:
diff changeset
432 " punpckldq %%mm2, %%mm1\n\t"
nick
parents:
diff changeset
433 " pfadd %%mm3, %%mm2\n\t"
nick
parents:
diff changeset
434 " punpckldq %%mm2, %%mm0\n\t"
nick
parents:
diff changeset
435 " movq %%mm1, 56(%%edx)\n\t"
nick
parents:
diff changeset
436 " movq %%mm0, 48(%%edx)\n\t"
nick
parents:
diff changeset
437
nick
parents:
diff changeset
438 /*---*/
nick
parents:
diff changeset
439
nick
parents:
diff changeset
440 " movd 92(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
441 " pfsub 88(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
442 " pfmul 120(%%ebx), %%mm1\n\t"
nick
parents:
diff changeset
443 " movd %%mm1, 92(%%edx)\n\t"
nick
parents:
diff changeset
444 " pfadd 92(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
445 " pfadd 88(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
446 " movq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
447
nick
parents:
diff changeset
448 " pfadd 80(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
449 " pfadd 84(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
450 " movd %%mm0, 80(%%edx)\n\t"
nick
parents:
diff changeset
451
nick
parents:
diff changeset
452 " movd 80(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
453 " pfsub 84(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
454 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
455 " pfadd %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
456 " pfadd 92(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
457 " punpckldq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
458 " movq %%mm0, 84(%%edx)\n\t"
nick
parents:
diff changeset
459
nick
parents:
diff changeset
460 " movq 96(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
461 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
462 " pxor %%mm7, %%mm1\n\t"
nick
parents:
diff changeset
463 " pfacc %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
464 " pfmul %%mm6, %%mm0\n\t"
nick
parents:
diff changeset
465 " movq %%mm0, 96(%%edx)\n\t"
nick
parents:
diff changeset
466
nick
parents:
diff changeset
467 " movd 108(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
468 " pfsub 104(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
469 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
470 " movd %%mm0, 108(%%edx)\n\t"
nick
parents:
diff changeset
471 " pfadd 104(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
472 " pfadd 108(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
473 " movd %%mm0, 104(%%edx)\n\t"
nick
parents:
diff changeset
474
nick
parents:
diff changeset
475 " movd 124(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
476 " pfsub 120(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
477 " pfmul 120(%%ebx), %%mm1\n\t"
nick
parents:
diff changeset
478 " movd %%mm1, 124(%%edx)\n\t"
nick
parents:
diff changeset
479 " pfadd 120(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
480 " pfadd 124(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
481 " movq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
482
nick
parents:
diff changeset
483 " pfadd 112(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
484 " pfadd 116(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
485 " movd %%mm0, 112(%%edx)\n\t"
nick
parents:
diff changeset
486
nick
parents:
diff changeset
487 " movd 112(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
488 " pfsub 116(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
489 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
490 " pfadd %%mm0,%%mm1\n\t"
nick
parents:
diff changeset
491 " pfadd 124(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
492 " punpckldq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
493 " movq %%mm0, 116(%%edx)\n\t"
nick
parents:
diff changeset
494
nick
parents:
diff changeset
495 " jnz .L01\n\t"
nick
parents:
diff changeset
496
nick
parents:
diff changeset
497 /* Phase 7*/
nick
parents:
diff changeset
498 /* Code below is coded in scalar mode. Should be optimized */
nick
parents:
diff changeset
499
nick
parents:
diff changeset
500 " movd (%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
501 " pfadd 4(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
502 " movd %%mm0, 1024(%%esi)\n\t"
nick
parents:
diff changeset
503
nick
parents:
diff changeset
504 " movd (%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
505 " pfsub 4(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
506 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
507 " movd %%mm0, (%%esi)\n\t"
nick
parents:
diff changeset
508 " movd %%mm0, (%%edi)\n\t"
nick
parents:
diff changeset
509
nick
parents:
diff changeset
510 " movd 12(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
511 " pfsub 8(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
512 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
513 " movd %%mm0, 512(%%edi)\n\t"
nick
parents:
diff changeset
514 " pfadd 12(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
515 " pfadd 8(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
516 " movd %%mm0, 512(%%esi)\n\t"
nick
parents:
diff changeset
517
nick
parents:
diff changeset
518 " movd 16(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
519 " pfsub 20(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
520 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
521 " movq %%mm0, %%mm3\n\t"
nick
parents:
diff changeset
522
nick
parents:
diff changeset
523 " movd 28(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
524 " pfsub 24(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
525 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
526 " movd %%mm0, 768(%%edi)\n\t"
nick
parents:
diff changeset
527 " movq %%mm0, %%mm2\n\t"
nick
parents:
diff changeset
528
nick
parents:
diff changeset
529 " pfadd 24(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
530 " pfadd 28(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
531 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
532
nick
parents:
diff changeset
533 " pfadd 16(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
534 " pfadd 20(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
535 " movd %%mm0, 768(%%esi)\n\t"
nick
parents:
diff changeset
536 " pfadd %%mm3, %%mm1\n\t"
nick
parents:
diff changeset
537 " movd %%mm1, 256(%%esi)\n\t"
nick
parents:
diff changeset
538 " pfadd %%mm3, %%mm2\n\t"
nick
parents:
diff changeset
539 " movd %%mm2, 256(%%edi)\n\t"
nick
parents:
diff changeset
540
nick
parents:
diff changeset
541 /* Phase 8*/
nick
parents:
diff changeset
542
nick
parents:
diff changeset
543 " movq 32(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
544 " movq 48(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
545 " pfadd 48(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
546 " pfadd 40(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
547 " movd %%mm0, 896(%%esi)\n\t"
nick
parents:
diff changeset
548 " movd %%mm1, 640(%%esi)\n\t"
nick
parents:
diff changeset
549 " psrlq $32, %%mm0\n\t"
nick
parents:
diff changeset
550 " psrlq $32, %%mm1\n\t"
nick
parents:
diff changeset
551 " movd %%mm0, 128(%%edi)\n\t"
nick
parents:
diff changeset
552 " movd %%mm1, 384(%%edi)\n\t"
nick
parents:
diff changeset
553
nick
parents:
diff changeset
554 " movd 40(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
555 " pfadd 56(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
556 " movd %%mm0, 384(%%esi)\n\t"
nick
parents:
diff changeset
557
nick
parents:
diff changeset
558 " movd 56(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
559 " pfadd 36(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
560 " movd %%mm0, 128(%%esi)\n\t"
nick
parents:
diff changeset
561
nick
parents:
diff changeset
562 " movd 60(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
563 " movd %%mm0, 896(%%edi)\n\t"
nick
parents:
diff changeset
564 " pfadd 44(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
565 " movd %%mm0, 640(%%edi)\n\t"
nick
parents:
diff changeset
566
nick
parents:
diff changeset
567 " movq 96(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
568 " movq 112(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
569 " movq 104(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
570 " pfadd 112(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
571 " pfadd 104(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
572 " pfadd 120(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
573 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
574 " movq %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
575 " movq %%mm4, %%mm5\n\t"
nick
parents:
diff changeset
576 " pfadd 64(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
577 " pfadd 80(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
578 " pfadd 72(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
579 " movd %%mm0, 960(%%esi)\n\t"
nick
parents:
diff changeset
580 " movd %%mm2, 704(%%esi)\n\t"
nick
parents:
diff changeset
581 " movd %%mm4, 448(%%esi)\n\t"
nick
parents:
diff changeset
582 " psrlq $32, %%mm0\n\t"
nick
parents:
diff changeset
583 " psrlq $32, %%mm2\n\t"
nick
parents:
diff changeset
584 " psrlq $32, %%mm4\n\t"
nick
parents:
diff changeset
585 " movd %%mm0, 64(%%edi)\n\t"
nick
parents:
diff changeset
586 " movd %%mm2, 320(%%edi)\n\t"
nick
parents:
diff changeset
587 " movd %%mm4, 576(%%edi)\n\t"
nick
parents:
diff changeset
588 " pfadd 80(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
589 " pfadd 72(%%edx), %%mm3\n\t"
nick
parents:
diff changeset
590 " pfadd 88(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
591 " movd %%mm1, 832(%%esi)\n\t"
nick
parents:
diff changeset
592 " movd %%mm3, 576(%%esi)\n\t"
nick
parents:
diff changeset
593 " movd %%mm5, 320(%%esi)\n\t"
nick
parents:
diff changeset
594 " psrlq $32, %%mm1\n\t"
nick
parents:
diff changeset
595 " psrlq $32, %%mm3\n\t"
nick
parents:
diff changeset
596 " psrlq $32, %%mm5\n\t"
nick
parents:
diff changeset
597 " movd %%mm1, 192(%%edi)\n\t"
nick
parents:
diff changeset
598 " movd %%mm3, 448(%%edi)\n\t"
nick
parents:
diff changeset
599 " movd %%mm5, 704(%%edi)\n\t"
nick
parents:
diff changeset
600
nick
parents:
diff changeset
601 " movd 120(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
602 " pfadd 100(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
603 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
604 " pfadd 88(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
605 " movd %%mm0, 192(%%esi)\n\t"
nick
parents:
diff changeset
606 " pfadd 68(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
607 " movd %%mm1, 64(%%esi)\n\t"
nick
parents:
diff changeset
608
nick
parents:
diff changeset
609 " movd 124(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
610 " movd %%mm0, 960(%%edi)\n\t"
nick
parents:
diff changeset
611 " pfadd 92(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
612 " movd %%mm0, 832(%%edi)\n\t"
nick
parents:
diff changeset
613
nick
parents:
diff changeset
614 " jmp .L_bye\n\t"
nick
parents:
diff changeset
615 ".L01: \n\t"
nick
parents:
diff changeset
616 /* Phase 9*/
nick
parents:
diff changeset
617
nick
parents:
diff changeset
618 " movq (%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
619 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
620 " pxor %%mm7, %%mm1\n\t"
nick
parents:
diff changeset
621 " pfacc %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
622 " pfmul %%mm6, %%mm0\n\t"
nick
parents:
diff changeset
623 " pf2id %%mm0, %%mm0\n\t"
nick
parents:
diff changeset
624 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
625 " movw %%ax, 512(%%esi)\n\t"
nick
parents:
diff changeset
626 " psrlq $32, %%mm0\n\t"
nick
parents:
diff changeset
627 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
628 " movw %%ax, (%%esi)\n\t"
nick
parents:
diff changeset
629
nick
parents:
diff changeset
630 " movd 12(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
631 " pfsub 8(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
632 " pfmul 120(%%ebx), %%mm0\n\t"
nick
parents:
diff changeset
633 " pf2id %%mm0, %%mm7\n\t"
nick
parents:
diff changeset
634 " movd %%mm7, %%eax\n\t"
nick
parents:
diff changeset
635 " movw %%ax, 256(%%edi)\n\t"
nick
parents:
diff changeset
636 " pfadd 12(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
637 " pfadd 8(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
638 " pf2id %%mm0, %%mm0\n\t"
nick
parents:
diff changeset
639 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
640 " movw %%ax, 256(%%esi)\n\t"
nick
parents:
diff changeset
641
nick
parents:
diff changeset
642 " movd 16(%%ecx), %%mm3\n\t"
nick
parents:
diff changeset
643 " pfsub 20(%%ecx), %%mm3\n\t"
nick
parents:
diff changeset
644 " pfmul 120(%%ebx), %%mm3\n\t"
nick
parents:
diff changeset
645 " movq %%mm3, %%mm2\n\t"
nick
parents:
diff changeset
646
nick
parents:
diff changeset
647 " movd 28(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
648 " pfsub 24(%%ecx), %%mm2\n\t"
nick
parents:
diff changeset
649 " pfmul 120(%%ebx), %%mm2\n\t"
nick
parents:
diff changeset
650 " movq %%mm2, %%mm1\n\t"
nick
parents:
diff changeset
651
nick
parents:
diff changeset
652 " pf2id %%mm2, %%mm7\n\t"
nick
parents:
diff changeset
653 " movd %%mm7, %%eax\n\t"
nick
parents:
diff changeset
654 " movw %%ax, 384(%%edi)\n\t"
nick
parents:
diff changeset
655
nick
parents:
diff changeset
656 " pfadd 24(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
657 " pfadd 28(%%ecx), %%mm1\n\t"
nick
parents:
diff changeset
658 " movq %%mm1, %%mm0\n\t"
nick
parents:
diff changeset
659
nick
parents:
diff changeset
660 " pfadd 16(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
661 " pfadd 20(%%ecx), %%mm0\n\t"
nick
parents:
diff changeset
662 " pf2id %%mm0, %%mm0\n\t"
nick
parents:
diff changeset
663 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
664 " movw %%ax, 384(%%esi)\n\t"
nick
parents:
diff changeset
665 " pfadd %%mm3, %%mm1\n\t"
nick
parents:
diff changeset
666 " pf2id %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
667 " movd %%mm1, %%eax\n\t"
nick
parents:
diff changeset
668 " movw %%ax, 128(%%esi)\n\t"
nick
parents:
diff changeset
669 " pfadd %%mm3, %%mm2\n\t"
nick
parents:
diff changeset
670 " pf2id %%mm2, %%mm2\n\t"
nick
parents:
diff changeset
671 " movd %%mm2, %%eax\n\t"
nick
parents:
diff changeset
672 " movw %%ax, 128(%%edi)\n\t"
nick
parents:
diff changeset
673
nick
parents:
diff changeset
674 /* Phase 10*/
nick
parents:
diff changeset
675
nick
parents:
diff changeset
676 " movq 32(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
677 " movq 48(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
678 " pfadd 48(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
679 " pfadd 40(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
680 " pf2id %%mm0, %%mm0\n\t"
nick
parents:
diff changeset
681 " pf2id %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
682 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
683 " movd %%mm1, %%ecx\n\t"
nick
parents:
diff changeset
684 " movw %%ax, 448(%%esi)\n\t"
nick
parents:
diff changeset
685 " movw %%cx, 320(%%esi)\n\t"
nick
parents:
diff changeset
686 " psrlq $32, %%mm0\n\t"
nick
parents:
diff changeset
687 " psrlq $32, %%mm1\n\t"
nick
parents:
diff changeset
688 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
689 " movd %%mm1, %%ecx\n\t"
nick
parents:
diff changeset
690 " movw %%ax, 64(%%edi)\n\t"
nick
parents:
diff changeset
691 " movw %%cx, 192(%%edi)\n\t"
nick
parents:
diff changeset
692
nick
parents:
diff changeset
693 " movd 40(%%edx), %%mm3\n\t"
nick
parents:
diff changeset
694 " movd 56(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
695 " movd 60(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
696 " movd 44(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
697 " movd 120(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
698 " punpckldq %%mm4, %%mm3\n\t"
nick
parents:
diff changeset
699 " punpckldq 124(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
700 " pfadd 100(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
701 " punpckldq 36(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
702 " punpckldq 92(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
703 " movq %%mm5, %%mm6\n\t"
nick
parents:
diff changeset
704 " pfadd %%mm4, %%mm3\n\t"
nick
parents:
diff changeset
705 " pf2id %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
706 " pf2id %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
707 " pfadd 88(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
708 " movd %%mm1, %%eax\n\t"
nick
parents:
diff changeset
709 " movd %%mm3, %%ecx\n\t"
nick
parents:
diff changeset
710 " movw %%ax, 448(%%edi)\n\t"
nick
parents:
diff changeset
711 " movw %%cx, 192(%%esi)\n\t"
nick
parents:
diff changeset
712 " pf2id %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
713 " psrlq $32, %%mm1\n\t"
nick
parents:
diff changeset
714 " psrlq $32, %%mm3\n\t"
nick
parents:
diff changeset
715 " movd %%mm5, %%ebx\n\t"
nick
parents:
diff changeset
716 " movd %%mm1, %%eax\n\t"
nick
parents:
diff changeset
717 " movd %%mm3, %%ecx\n\t"
nick
parents:
diff changeset
718 " movw %%bx, 96(%%esi)\n\t"
nick
parents:
diff changeset
719 " movw %%ax, 480(%%edi)\n\t"
nick
parents:
diff changeset
720 " movw %%cx, 64(%%esi)\n\t"
nick
parents:
diff changeset
721 " pfadd %%mm2, %%mm0\n\t"
nick
parents:
diff changeset
722 " pf2id %%mm0, %%mm0\n\t"
nick
parents:
diff changeset
723 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
724 " pfadd 68(%%edx), %%mm6\n\t"
nick
parents:
diff changeset
725 " movw %%ax, 320(%%edi)\n\t"
nick
parents:
diff changeset
726 " psrlq $32, %%mm0\n\t"
nick
parents:
diff changeset
727 " pf2id %%mm6, %%mm6\n\t"
nick
parents:
diff changeset
728 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
729 " movd %%mm6, %%ebx\n\t"
nick
parents:
diff changeset
730 " movw %%ax, 416(%%edi)\n\t"
nick
parents:
diff changeset
731 " movw %%bx, 32(%%esi)\n\t"
nick
parents:
diff changeset
732
nick
parents:
diff changeset
733 " movq 96(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
734 " movq 112(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
735 " movq 104(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
736 " pfadd %%mm2, %%mm0\n\t"
nick
parents:
diff changeset
737 " pfadd %%mm4, %%mm2\n\t"
nick
parents:
diff changeset
738 " pfadd 120(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
739 " movq %%mm0, %%mm1\n\t"
nick
parents:
diff changeset
740 " movq %%mm2, %%mm3\n\t"
nick
parents:
diff changeset
741 " movq %%mm4, %%mm5\n\t"
nick
parents:
diff changeset
742 " pfadd 64(%%edx), %%mm0\n\t"
nick
parents:
diff changeset
743 " pfadd 80(%%edx), %%mm2\n\t"
nick
parents:
diff changeset
744 " pfadd 72(%%edx), %%mm4\n\t"
nick
parents:
diff changeset
745 " pf2id %%mm0, %%mm0\n\t"
nick
parents:
diff changeset
746 " pf2id %%mm2, %%mm2\n\t"
nick
parents:
diff changeset
747 " pf2id %%mm4, %%mm4\n\t"
nick
parents:
diff changeset
748 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
749 " movd %%mm2, %%ecx\n\t"
nick
parents:
diff changeset
750 " movd %%mm4, %%ebx\n\t"
nick
parents:
diff changeset
751 " movw %%ax, 480(%%esi)\n\t"
nick
parents:
diff changeset
752 " movw %%cx, 352(%%esi)\n\t"
nick
parents:
diff changeset
753 " movw %%bx, 224(%%esi)\n\t"
nick
parents:
diff changeset
754 " psrlq $32, %%mm0\n\t"
nick
parents:
diff changeset
755 " psrlq $32, %%mm2\n\t"
nick
parents:
diff changeset
756 " psrlq $32, %%mm4\n\t"
nick
parents:
diff changeset
757 " movd %%mm0, %%eax\n\t"
nick
parents:
diff changeset
758 " movd %%mm2, %%ecx\n\t"
nick
parents:
diff changeset
759 " movd %%mm4, %%ebx\n\t"
nick
parents:
diff changeset
760 " movw %%ax, 32(%%edi)\n\t"
nick
parents:
diff changeset
761 " movw %%cx, 160(%%edi)\n\t"
nick
parents:
diff changeset
762 " movw %%bx, 288(%%edi)\n\t"
nick
parents:
diff changeset
763 " pfadd 80(%%edx), %%mm1\n\t"
nick
parents:
diff changeset
764 " pfadd 72(%%edx), %%mm3\n\t"
nick
parents:
diff changeset
765 " pfadd 88(%%edx), %%mm5\n\t"
nick
parents:
diff changeset
766 " pf2id %%mm1, %%mm1\n\t"
nick
parents:
diff changeset
767 " pf2id %%mm3, %%mm3\n\t"
nick
parents:
diff changeset
768 " pf2id %%mm5, %%mm5\n\t"
nick
parents:
diff changeset
769 " movd %%mm1, %%eax\n\t"
nick
parents:
diff changeset
770 " movd %%mm3, %%ecx\n\t"
nick
parents:
diff changeset
771 " movd %%mm5, %%ebx\n\t"
nick
parents:
diff changeset
772 " movw %%ax, 416(%%esi)\n\t"
nick
parents:
diff changeset
773 " movw %%cx, 288(%%esi)\n\t"
nick
parents:
diff changeset
774 " movw %%bx, 160(%%esi)\n\t"
nick
parents:
diff changeset
775 " psrlq $32, %%mm1\n\t"
nick
parents:
diff changeset
776 " psrlq $32, %%mm3\n\t"
nick
parents:
diff changeset
777 " psrlq $32, %%mm5\n\t"
nick
parents:
diff changeset
778 " movd %%mm1, %%eax\n\t"
nick
parents:
diff changeset
779 " movd %%mm3, %%ecx\n\t"
nick
parents:
diff changeset
780 " movd %%mm5, %%ebx\n\t"
nick
parents:
diff changeset
781 " movw %%ax, 96(%%edi)\n\t"
nick
parents:
diff changeset
782 " movw %%cx, 224(%%edi)\n\t"
nick
parents:
diff changeset
783 " movw %%bx, 352(%%edi)\n\t"
nick
parents:
diff changeset
784
nick
parents:
diff changeset
785 " movsw\n\t"
nick
parents:
diff changeset
786
nick
parents:
diff changeset
787 ".L_bye:\n\t"
nick
parents:
diff changeset
788 " femms\n\t"
nick
parents:
diff changeset
789 :
nick
parents:
diff changeset
790 :"m"(a),"m"(b),"m"(c),"m"(tmp[0])
nick
parents:
diff changeset
791 :"memory","%ebx","%esi","%edi");
nick
parents:
diff changeset
792 }