summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-11-19 16:31:10 +0000
committerThom Johansen <thomj@rockbox.org>2007-11-19 16:31:10 +0000
commit3947b0c6328e446fd70641885a7035614cfc90e5 (patch)
tree9703371e86781472cd911fbf8079a8cbc2538da6
parent0fc7fb3686c0e52ceac843c1a91f1070f1a70bf6 (diff)
FS #8179. Small Musepack speedup for ARM.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15692 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libmusepack/synth_filter.c79
1 files changed, 37 insertions, 42 deletions
diff --git a/apps/codecs/libmusepack/synth_filter.c b/apps/codecs/libmusepack/synth_filter.c
index eca23804c5..978e48521b 100644
--- a/apps/codecs/libmusepack/synth_filter.c
+++ b/apps/codecs/libmusepack/synth_filter.c
@@ -448,50 +448,45 @@ mpc_decoder_windowing_D(MPC_SAMPLE_FORMAT * Data, const MPC_SAMPLE_FORMAT * V)
// 32=32x32-multiply assembler for ARM
for ( k = 0; k < 32; k++, V++ )
{
- asm volatile (
- "ldmia %[D]!, { r0-r3 } \n\t"
- "ldr r4, [%[V]] \n\t"
- "mul r5, r0, r4 \n\t"
- "ldr r4, [%[V], #96*4] \n\t"
- "mla r5, r1, r4, r5 \n\t"
- "ldr r4, [%[V], #128*4] \n\t"
- "mla r5, r2, r4, r5 \n\t"
- "ldr r4, [%[V], #224*4] \n\t"
- "mla r5, r3, r4, r5 \n\t"
-
- "ldmia %[D]!, { r0-r3 } \n\t"
- "ldr r4, [%[V], #256*4] \n\t"
- "mla r5, r0, r4, r5 \n\t"
- "ldr r4, [%[V], #352*4] \n\t"
- "mla r5, r1, r4, r5 \n\t"
- "ldr r4, [%[V], #384*4] \n\t"
- "mla r5, r2, r4, r5 \n\t"
- "ldr r4, [%[V], #480*4] \n\t"
- "mla r5, r3, r4, r5 \n\t"
-
- "ldmia %[D]!, { r0-r3 } \n\t"
- "ldr r4, [%[V], #512*4] \n\t"
- "mla r5, r0, r4, r5 \n\t"
- "ldr r4, [%[V], #608*4] \n\t"
- "mla r5, r1, r4, r5 \n\t"
- "ldr r4, [%[V], #640*4] \n\t"
- "mla r5, r2, r4, r5 \n\t"
- "ldr r4, [%[V], #736*4] \n\t"
- "mla r5, r3, r4, r5 \n\t"
-
- "ldmia %[D]!, { r0-r3 } \n\t"
- "ldr r4, [%[V], #768*4] \n\t"
- "mla r5, r0, r4, r5 \n\t"
- "ldr r4, [%[V], #864*4] \n\t"
- "mla r5, r1, r4, r5 \n\t"
- "ldr r4, [%[V], #896*4] \n\t"
- "mla r5, r2, r4, r5 \n\t"
- "ldr r4, [%[V], #992*4] \n\t"
- "mla r5, r3, r4, r5 \n\t"
- "str r5, [%[Data]], #4 \n"
+ asm volatile (
+ "ldmia %[D]!, { r0-r7 } \n\t"
+ "ldr r8, [%[V]] \n\t"
+ "mul r9, r0, r8 \n\t"
+ "ldr r8, [%[V], #96*4] \n\t"
+ "mla r9, r1, r8, r9 \n\t"
+ "ldr r8, [%[V], #128*4] \n\t"
+ "mla r9, r2, r8, r9 \n\t"
+ "ldr r8, [%[V], #224*4] \n\t"
+ "mla r9, r3, r8, r9 \n\t"
+ "ldr r8, [%[V], #256*4] \n\t"
+ "mla r9, r4, r8, r9 \n\t"
+ "ldr r8, [%[V], #352*4] \n\t"
+ "mla r9, r5, r8, r9 \n\t"
+ "ldr r8, [%[V], #384*4] \n\t"
+ "mla r9, r6, r8, r9 \n\t"
+ "ldr r8, [%[V], #480*4] \n\t"
+ "mla r9, r7, r8, r9 \n\t"
+ "ldmia %[D]!, { r0-r7 } \n\t"
+ "ldr r8, [%[V], #512*4] \n\t"
+ "mla r9, r0, r8, r9 \n\t"
+ "ldr r8, [%[V], #608*4] \n\t"
+ "mla r9, r1, r8, r9 \n\t"
+ "ldr r8, [%[V], #640*4] \n\t"
+ "mla r9, r2, r8, r9 \n\t"
+ "ldr r8, [%[V], #736*4] \n\t"
+ "mla r9, r3, r8, r9 \n\t"
+ "ldr r8, [%[V], #768*4] \n\t"
+ "mla r9, r4, r8, r9 \n\t"
+ "ldr r8, [%[V], #864*4] \n\t"
+ "mla r9, r5, r8, r9 \n\t"
+ "ldr r8, [%[V], #896*4] \n\t"
+ "mla r9, r6, r8, r9 \n\t"
+ "ldr r8, [%[V], #992*4] \n\t"
+ "mla r9, r7, r8, r9 \n\t"
+ "str r9, [%[Data]], #4 \n"
: [Data] "+r" (Data), [D] "+r" (D)
: [V] "r" (V)
- : "r0", "r1", "r2", "r3", "r4", "r5");
+ : "r0", "r1", "r2", "r3", "r4", "r5", "r6", "r7", "r8", "r9");
}
#else
// 32=32x32-multiply (FIXED_POINT)