| 1 |
/* |
| 2 |
equalizer_3dnow: 3DNow! optimized do_equalizer() |
| 3 |
|
| 4 |
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1 |
| 5 |
see COPYING and AUTHORS files in distribution or http://mpg123.org |
| 6 |
initially written by KIMURA Takuhiro |
| 7 |
*/ |
| 8 |
|
| 9 |
#include "mangle.h" |
| 10 |
|
| 11 |
.text |
| 12 |
ALIGN4 |
| 13 |
.globl ASM_NAME(INT123_do_equalizer_3dnow) |
| 14 |
/* .type ASM_NAME(INT123_do_equalizer_3dnow),@function */ |
| 15 |
/* void do_equalizer(real *bandPtr,int channel, real equalizer[2][32]); */ |
| 16 |
ASM_NAME(INT123_do_equalizer_3dnow): |
| 17 |
pushl %esi |
| 18 |
pushl %ebx |
| 19 |
/* bandPtr */ |
| 20 |
movl 12(%esp),%ebx |
| 21 |
/* channel */ |
| 22 |
movl 16(%esp),%ecx |
| 23 |
xorl %edx,%edx |
| 24 |
/* equalizer */ |
| 25 |
movl 20(%esp),%esi |
| 26 |
sall $7,%ecx |
| 27 |
ALIGN4 |
| 28 |
.L9: |
| 29 |
movq (%ebx,%edx),%mm0 |
| 30 |
pfmul (%esi,%ecx),%mm0 |
| 31 |
|
| 32 |
movq 8(%ebx,%edx),%mm1 |
| 33 |
pfmul 8(%esi,%ecx),%mm1 |
| 34 |
movq %mm0,(%ebx,%edx) |
| 35 |
|
| 36 |
movq 16(%ebx,%edx),%mm0 |
| 37 |
pfmul 16(%esi,%ecx),%mm0 |
| 38 |
movq %mm1,8(%ebx,%edx) |
| 39 |
|
| 40 |
movq 24(%ebx,%edx),%mm1 |
| 41 |
pfmul 24(%esi,%ecx),%mm1 |
| 42 |
movq %mm0,16(%ebx,%edx) |
| 43 |
|
| 44 |
movq 32(%ebx,%edx),%mm0 |
| 45 |
pfmul 32(%esi,%ecx),%mm0 |
| 46 |
movq %mm1,24(%ebx,%edx) |
| 47 |
|
| 48 |
movq 40(%ebx,%edx),%mm1 |
| 49 |
pfmul 40(%esi,%ecx),%mm1 |
| 50 |
movq %mm0,32(%ebx,%edx) |
| 51 |
|
| 52 |
movq 48(%ebx,%edx),%mm0 |
| 53 |
pfmul 48(%esi,%ecx),%mm0 |
| 54 |
movq %mm1,40(%ebx,%edx) |
| 55 |
|
| 56 |
movq 56(%ebx,%edx),%mm1 |
| 57 |
pfmul 56(%esi,%ecx),%mm1 |
| 58 |
movq %mm0,48(%ebx,%edx) |
| 59 |
movq %mm1,56(%ebx,%edx) |
| 60 |
|
| 61 |
addl $64,%edx |
| 62 |
addl $32,%ecx |
| 63 |
cmpl $124,%edx |
| 64 |
jle .L9 |
| 65 |
ALIGN4 |
| 66 |
popl %ebx |
| 67 |
popl %esi |
| 68 |
ret |
| 69 |
|
| 70 |
NONEXEC_STACK |