annotate mp3lib/dct64_k7.c @ 5979:6cc15e96d709

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