annotate mp3lib/dct64_k7.c @ 11369:a4b6fdc76fe5

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