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