1 /*****************************************************************************
2 * ac3_imdct_sse.c: accelerated SSE ac3 DCT
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: ac3_imdct_sse.c,v 1.4 2001/07/08 23:15:11 reno Exp $
7 * Authors: Renaud Dartus <reno@videolan.org>
8 * Aaron Holtzman <aholtzma@engr.uvic.ca>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 #define MODULE_NAME imdctsse
26 #include "modules_inner.h"
28 /*****************************************************************************
30 *****************************************************************************/
41 #include "ac3_imdct.h"
42 #include "ac3_imdct_common.h"
43 #include "ac3_retables.h"
46 # define M_PI 3.14159265358979323846
49 void _M( fft_64p ) ( complex_t *x );
50 void _M( fft_128p ) ( complex_t *a );
52 static void imdct512_pre_ifft_twiddle_sse (const int *pmt, complex_t *buf, float *data, float *xcos_sin_sse);
53 static void imdct512_post_ifft_twiddle_sse (complex_t *buf, float *xcos_sin_sse);
54 static void imdct512_window_delay_sse (complex_t *buf, float *data_ptr, float *window_prt, float *delay_prt);
55 static void imdct512_window_delay_nol_sse (complex_t *buf, float *data_ptr, float *window_prt, float *delay_prt);
58 void _M( imdct_init ) (imdct_t * p_imdct)
61 float scale = 181.019;
63 for (i=0; i < 128; i++)
65 float xcos_i = cos(2.0f * M_PI * (8*i+1)/(8*N)) * scale;
66 float xsin_i = sin(2.0f * M_PI * (8*i+1)/(8*N)) * scale;
67 p_imdct->xcos_sin_sse[i * 4] = xcos_i;
68 p_imdct->xcos_sin_sse[i * 4 + 1] = -xsin_i;
69 p_imdct->xcos_sin_sse[i * 4 + 2] = -xsin_i;
70 p_imdct->xcos_sin_sse[i * 4 + 3] = -xcos_i;
74 void _M( imdct_do_512 ) (imdct_t * p_imdct, float data[], float delay[])
76 imdct512_pre_ifft_twiddle_sse (pm128, p_imdct->buf, data, p_imdct->xcos_sin_sse);
77 _M( fft_128p ) ( p_imdct->buf );
78 imdct512_post_ifft_twiddle_sse (p_imdct->buf, p_imdct->xcos_sin_sse);
79 imdct512_window_delay_sse (p_imdct->buf, data, window, delay);
83 void _M( imdct_do_512_nol ) (imdct_t * p_imdct, float data[], float delay[])
85 imdct512_pre_ifft_twiddle_sse (pm128, p_imdct->buf, data, p_imdct->xcos_sin_sse);
86 _M( fft_128p ) ( p_imdct->buf );
87 imdct512_post_ifft_twiddle_sse (p_imdct->buf, p_imdct->xcos_sin_sse);
88 imdct512_window_delay_nol_sse (p_imdct->buf, data, window, delay);
91 static void imdct512_pre_ifft_twiddle_sse (const int *pmt, complex_t *buf, float *data, float *xcos_sin_sse)
93 __asm__ __volatile__ (
97 "addl $-4, %%esp\n" /* local variable, loop counter */
106 "movl 8(%%ebp), %%eax\n" /* pmt */
107 "movl 12(%%ebp), %%ebx\n" /* buf */
108 "movl 16(%%ebp), %%ecx\n" /* data */
109 "movl 20(%%ebp), %%edx\n" /* xcos_sin_sse */
110 "movl $64, -4(%%ebp)\n"
114 "movl (%%eax), %%esi\n"
115 "movl 4(%%eax), %%edi\n"
116 "movss (%%ecx, %%esi, 8), %%xmm1\n" /* 2j */
117 "movss (%%ecx, %%edi, 8), %%xmm3\n" /* 2(j+1) */
122 "movaps (%%edx, %%esi, 8), %%xmm0\n" /* -c_j | -s_j | -s_j | c_j */
123 "movaps (%%edx, %%edi, 8), %%xmm2\n" /* -c_j+1 | -s_j+1 | -s_j+1 | c_j+1 */
128 "movss 1020(%%ecx, %%esi, 4), %%xmm4\n" /* 255-2j */
130 "movss 1020(%%ecx, %%edi, 4), %%xmm5\n" /* 255-2(j+1) */
132 "shufps $0, %%xmm1, %%xmm4\n" /* 2j | 2j | 255-2j | 255-2j */
133 "shufps $0, %%xmm3, %%xmm5\n" /* 2(j+1) | 2(j+1) | 255-2(j+1) | 255-2(j+1) */
134 "mulps %%xmm4, %%xmm0\n"
135 "mulps %%xmm5, %%xmm2\n"
136 "movhlps %%xmm0, %%xmm1\n"
137 "movhlps %%xmm2, %%xmm3\n"
139 "addps %%xmm1, %%xmm0\n"
140 "addps %%xmm3, %%xmm2\n"
141 "movlhps %%xmm2, %%xmm0\n"
143 "movaps %%xmm0, -16(%%ebx)\n"
159 static void imdct512_post_ifft_twiddle_sse (complex_t *buf, float *xcos_sin_sse)
161 __asm__ __volatile__ (
164 "movl $32, %%ebx\n" /* loop counter */
168 "movaps (%%eax), %%xmm0\n" /* im1 | re1 | im0 | re0 */
170 "movaps (%%ecx), %%xmm2\n" /* -c | -s | -s | c */
171 "movhlps %%xmm0, %%xmm1\n" /* im1 | re1 */
172 "movaps 16(%%ecx), %%xmm3\n" /* -c1 | -s1 | -s1 | c1 */
174 "shufps $0x50, %%xmm0, %%xmm0\n" /* im0 | im0 | re0 | re0 */
175 "shufps $0x50, %%xmm1, %%xmm1\n" /* im1 | im1 | re1 | re1 */
177 "movaps 16(%%eax), %%xmm4\n" /* im3 | re3 | im2 | re2 */
179 "shufps $0x27, %%xmm2, %%xmm2\n" /* c | -s | -s | -c */
180 "movhlps %%xmm4, %%xmm5\n" /* im3 | re3 */
181 "shufps $0x27, %%xmm3, %%xmm3\n" /* c1 | -s1 | -s1 | -c1 */
183 "movaps 32(%%ecx), %%xmm6\n" /* -c2 | -s2 | -s2 | c2 */
184 "movaps 48(%%ecx), %%xmm7\n" /* -c3 | -s3 | -s3 | c3 */
186 "shufps $0x50, %%xmm4, %%xmm4\n" /* im2 | im2 | re2 | re2 */
187 "shufps $0x50, %%xmm5, %%xmm5\n" /* im3 | im3 | re3 | re3 */
189 "mulps %%xmm2, %%xmm0\n"
190 "mulps %%xmm3, %%xmm1\n"
192 "shufps $0x27, %%xmm6, %%xmm6\n" /* c2 | -s2 | -s2 | -c2 */
193 "shufps $0x27, %%xmm7, %%xmm7\n" /* c3 | -s3 | -s3 | -c3 */
195 "movhlps %%xmm0, %%xmm2\n"
196 "movhlps %%xmm1, %%xmm3\n"
198 "mulps %%xmm6, %%xmm4\n"
199 "mulps %%xmm7, %%xmm5\n"
201 "addps %%xmm2, %%xmm0\n"
202 "addps %%xmm3, %%xmm1\n"
204 "movhlps %%xmm4, %%xmm6\n"
205 "movhlps %%xmm5, %%xmm7\n"
207 "addps %%xmm6, %%xmm4\n"
208 "addps %%xmm7, %%xmm5\n"
210 "movlhps %%xmm1, %%xmm0\n"
211 "movlhps %%xmm5, %%xmm4\n"
213 "movaps %%xmm0, (%%eax)\n"
214 "movaps %%xmm4, 16(%%eax)\n"
222 : "a" (buf), "c" (xcos_sin_sse) );
225 static void imdct512_window_delay_sse (complex_t *buf, float *data_ptr, float *window_prt, float *delay_prt)
227 __asm__ __volatile__ (
230 "movl %%esp, %%ebp\n"
239 "movl 20(%%ebp), %%ebx\n" /* delay */
240 "movl 16(%%ebp), %%edx\n" /* window */
242 "movl 8(%%ebp), %%eax\n" /* buf */
243 "movl $16, %%ecx\n" /* loop count */
244 "leal 516(%%eax), %%esi\n" /* buf[64].im */
245 "leal 504(%%eax), %%edi\n" /* buf[63].re */
246 "movl 12(%%ebp), %%eax\n" /* data */
249 ".first_128_samples:\n"
250 "movss (%%esi), %%xmm0\n"
251 "movss 8(%%esi), %%xmm2\n"
252 "movss (%%edi), %%xmm1\n"
253 "movss -8(%%edi), %%xmm3\n"
255 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
256 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
258 "movups (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
259 "movaps (%%ebx), %%xmm5\n" /* d3 | d2 | d1 | d0 */
260 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
262 "movss 16(%%esi), %%xmm6\n" /* im2 */
263 "movss 24(%%esi), %%xmm7\n" /* im3 */
264 "subps %%xmm1, %%xmm0\n" /* -re1 | im1 | -re0 | im0 */
265 "movss -16(%%edi), %%xmm2\n" /* re2 */
266 "movss -24(%%edi), %%xmm3\n" /* re3 */
267 "mulps %%xmm4, %%xmm0\n"
268 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
269 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
270 "addps %%xmm5, %%xmm0\n"
271 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
272 "movups 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
273 "movaps 16(%%ebx), %%xmm5\n" /* d7 | d6 | d5 | d4 */
274 "subps %%xmm2, %%xmm6\n" /* -re3 | im3 | -re2 | im2 */
276 "movaps %%xmm0, (%%eax)\n"
278 "mulps %%xmm4, %%xmm6\n"
281 "addps %%xmm5, %%xmm6\n"
283 "movaps %%xmm6, -16(%%eax)\n"
285 "jnz .first_128_samples\n"
287 "movl 8(%%ebp), %%esi\n" /* buf[0].re */
288 "leal 1020(%%esi), %%edi\n" /* buf[127].im */
289 "movl $16, %%ecx\n" /* loop count */
292 ".second_128_samples:\n"
293 "movss (%%esi), %%xmm0\n" /* buf[i].re */
294 "movss 8(%%esi), %%xmm2\n" /* re1 */
295 "movss (%%edi), %%xmm1\n" /* buf[127-i].im */
296 "movss -8(%%edi), %%xmm3\n" /* im1 */
298 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
299 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im1 */
301 "movups (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
302 "movaps (%%ebx), %%xmm5\n" /* d3 | d2 | d1 | d0 */
304 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
305 "movss 16(%%esi), %%xmm6\n" /* re2 */
306 "movss 24(%%esi), %%xmm7\n" /* re3 */
307 "movss -16(%%edi), %%xmm2\n" /* im2 */
308 "movss -24(%%edi), %%xmm3\n" /* im3 */
309 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
310 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
311 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
312 "mulps %%xmm4, %%xmm0\n"
313 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
314 "movups 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
316 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
317 "addps %%xmm5, %%xmm0\n"
318 "mulps %%xmm4, %%xmm6\n"
320 "movaps 16(%%ebx), %%xmm5\n" /* d7 | d6 | d5 | d4 */
321 "movaps %%xmm0, (%%eax)\n"
322 "addps %%xmm5, %%xmm6\n"
326 "movaps %%xmm6, -16(%%eax)\n"
328 "jnz .second_128_samples\n"
330 "movl 8(%%ebp), %%eax\n"
331 "leal 512(%%eax), %%esi\n" /* buf[64].re */
332 "leal 508(%%eax), %%edi\n" /* buf[63].im */
333 "movl $16, %%ecx\n" /* loop count */
334 "movl 20(%%ebp), %%eax\n" /* delay */
337 ".first_128_delay:\n"
338 "movss (%%esi), %%xmm0\n"
339 "movss 8(%%esi), %%xmm2\n"
340 "movss (%%edi), %%xmm1\n"
341 "movss -8(%%edi), %%xmm3\n"
343 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
344 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im0 */
346 "movups -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
347 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
348 "movss 16(%%esi), %%xmm6\n" /* re2 */
349 "movss 24(%%esi), %%xmm7\n" /* re3 */
350 "movss -16(%%edi), %%xmm2\n" /* im2 */
351 "movss -24(%%edi), %%xmm3\n" /* im3 */
352 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
354 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
355 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
356 "mulps %%xmm4, %%xmm0\n"
357 "movups (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
358 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
359 "movaps %%xmm0, (%%eax)\n"
361 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
363 "mulps %%xmm5, %%xmm6\n"
365 "movaps %%xmm6, -16(%%eax)\n"
367 "jnz .first_128_delay\n"
369 "movl 8(%%ebp), %%ebx\n"
370 "leal 4(%%ebx), %%esi\n" /* buf[0].im */
371 "leal 1016(%%ebx), %%edi\n" /* buf[127].re */
372 "movl $16, %%ecx\n" /* loop count */
375 ".second_128_delay:\n"
376 "movss (%%esi), %%xmm0\n"
377 "movss 8(%%esi), %%xmm2\n"
378 "movss (%%edi), %%xmm1\n"
379 "movss -8(%%edi), %%xmm3\n"
381 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
382 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
384 "movups -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
385 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
386 "movss 16(%%esi), %%xmm6\n" /* im2 */
387 "movss 24(%%esi), %%xmm7\n" /* im3 */
388 "movss -16(%%edi), %%xmm2\n" /* re2 */
389 "movss -24(%%edi), %%xmm3\n" /* re3 */
390 "subps %%xmm0, %%xmm1\n" /* re1 | -im1 | re0 | -im0 */
392 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
393 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
394 "mulps %%xmm4, %%xmm1\n"
395 "movups (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
396 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
397 "movaps %%xmm1, (%%eax)\n"
399 "subps %%xmm6, %%xmm2\n" /* re | -im3 | re | -im2 */
401 "mulps %%xmm5, %%xmm2\n"
403 "movaps %%xmm2, -16(%%eax)\n"
405 "jnz .second_128_delay\n"
418 static void imdct512_window_delay_nol_sse (complex_t *buf, float *data_ptr, float *window_prt, float *delay_prt)
420 __asm__ __volatile__ (
423 "movl %%esp, %%ebp\n"
432 /* movl 20(%%ebp), %%ebx delay */
433 "movl 16(%%ebp), %%edx\n" /* window */
435 "movl 8(%%ebp), %%eax\n" /* buf */
436 "movl $16, %%ecx\n" /* loop count */
437 "leal 516(%%eax), %%esi\n" /* buf[64].im */
438 "leal 504(%%eax), %%edi\n" /* buf[63].re */
439 "movl 12(%%ebp), %%eax\n" /* data */
442 ".first_128_sample:\n"
443 "movss (%%esi), %%xmm0\n"
444 "movss 8(%%esi), %%xmm2\n"
445 "movss (%%edi), %%xmm1\n"
446 "movss -8(%%edi), %%xmm3\n"
448 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
449 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
451 "movups (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
452 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
454 "movss 16(%%esi), %%xmm6\n" /* im2 */
455 "movss 24(%%esi), %%xmm7\n" /* im3 */
456 "subps %%xmm1, %%xmm0\n" /* -re1 | im1 | -re0 | im0 */
457 "movss -16(%%edi), %%xmm2\n" /* re2 */
458 "movss -24(%%edi), %%xmm3\n" /* re3 */
459 "mulps %%xmm4, %%xmm0\n"
460 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
461 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
462 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
463 "movups 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
464 "subps %%xmm2, %%xmm6\n" /* -re3 | im3 | -re2 | im2 */
466 "movaps %%xmm0, (%%eax)\n"
467 "mulps %%xmm4, %%xmm6\n"
471 "movaps %%xmm6, -16(%%eax)\n"
473 "jnz .first_128_sample\n"
475 "movl 8(%%ebp), %%esi\n" /* buf[0].re */
476 "leal 1020(%%esi), %%edi\n" /* buf[127].im */
477 "movl $16, %%ecx\n" /* loop count */
480 ".second_128_sample:\n"
481 "movss (%%esi), %%xmm0\n" /* buf[i].re */
482 "movss 8(%%esi), %%xmm2\n" /* re1 */
483 "movss (%%edi), %%xmm1\n" /* buf[127-i].im */
484 "movss -8(%%edi), %%xmm3\n" /* im1 */
486 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
487 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im1 */
489 "movups (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
491 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
492 "movss 16(%%esi), %%xmm6\n" /* re2 */
493 "movss 24(%%esi), %%xmm7\n" /* re3 */
494 "movss -16(%%edi), %%xmm2\n" /* im2 */
495 "movss -24(%%edi), %%xmm3\n" /* im3 */
496 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
497 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
498 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
499 "mulps %%xmm4, %%xmm0\n"
500 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
501 "movups 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
503 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
504 "mulps %%xmm4, %%xmm6\n"
506 "movaps %%xmm0, (%%eax)\n"
509 "movaps %%xmm6, -16(%%eax)\n"
511 "jnz .second_128_sample\n"
513 "movl 8(%%ebp), %%eax\n"
514 "leal 512(%%eax), %%esi\n" /* buf[64].re */
515 "leal 508(%%eax), %%edi\n" /* buf[63].im */
516 "movl $16, %%ecx\n" /* loop count */
517 "movl 20(%%ebp), %%eax\n" /* delay */
520 ".first_128_delays:\n"
521 "movss (%%esi), %%xmm0\n"
522 "movss 8(%%esi), %%xmm2\n"
523 "movss (%%edi), %%xmm1\n"
524 "movss -8(%%edi), %%xmm3\n"
526 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
527 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im0 */
529 "movups -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
530 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
531 "movss 16(%%esi), %%xmm6\n" /* re2 */
532 "movss 24(%%esi), %%xmm7\n" /* re3 */
533 "movss -16(%%edi), %%xmm2\n" /* im2 */
534 "movss -24(%%edi), %%xmm3\n" /* im3 */
535 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
537 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
538 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
539 "mulps %%xmm4, %%xmm0\n"
540 "movups (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
541 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
542 "movaps %%xmm0, (%%eax)\n"
544 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
546 "mulps %%xmm5, %%xmm6\n"
548 "movaps %%xmm6, -16(%%eax)\n"
550 "jnz .first_128_delays\n"
552 "movl 8(%%ebp), %%ebx\n"
553 "leal 4(%%ebx), %%esi\n" /* buf[0].im */
554 "leal 1016(%%ebx), %%edi\n" /* buf[127].re */
555 "movl $16, %%ecx\n" /* loop count */
558 ".second_128_delays:\n"
559 "movss (%%esi), %%xmm0\n"
560 "movss 8(%%esi), %%xmm2\n"
561 "movss (%%edi), %%xmm1\n"
562 "movss -8(%%edi), %%xmm3\n"
564 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
565 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
567 "movups -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
568 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
569 "movss 16(%%esi), %%xmm6\n" /* im2 */
570 "movss 24(%%esi), %%xmm7\n" /* im3 */
571 "movss -16(%%edi), %%xmm2\n" /* re2 */
572 "movss -24(%%edi), %%xmm3\n" /* re3 */
573 "subps %%xmm0, %%xmm1\n" /* re1 | -im1 | re0 | -im0 */
575 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
576 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
577 "mulps %%xmm4, %%xmm1\n"
578 "movups (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
579 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
580 "movaps %%xmm1, (%%eax)\n"
582 "subps %%xmm6, %%xmm2\n" /* re | -im3 | re | -im2 */
584 "mulps %%xmm5, %%xmm2\n"
586 "movaps %%xmm2, -16(%%eax)\n"
588 "jnz .second_128_delays\n"