annotate mp3lib/dct64_3dnow.c @ 25558:634dfaa85718

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