From f174c3513b4b2a4a0583a2b72ee442bbb211d442 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nils=20Wallm=C3=A9nius?= Date: Fri, 5 Nov 2010 16:21:25 +0000 Subject: [PATCH] libmusepack: use postindexing on the pointer when storing to increment it for free, saves another instruction in the loop in mpc_decoder_windowing_D speed difference is in the noise though. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28492 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libmusepack/synth_filter_arm.S | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/apps/codecs/libmusepack/synth_filter_arm.S b/apps/codecs/libmusepack/synth_filter_arm.S index 521d690e28..9bd4e04626 100644 --- a/apps/codecs/libmusepack/synth_filter_arm.S +++ b/apps/codecs/libmusepack/synth_filter_arm.S @@ -238,13 +238,12 @@ mpc_decoder_windowing_D: /* store Data[01..15] */ mov r8, r8, lsr #16 orr r8, r8, r9, lsl #16 /* (lo>>16) || (hi<<16) */ - str r8, [r0] /* store Data */ /* store Data[31..17] */ mov r10, r10, lsr #16 orr r10, r10, r11, lsl #16 /* (lo>>16) || (hi<<16) */ rsb r10, r10, #0 /* r10 = -r10 */ str r10, [r0, lr] /* store Data */ - add r0, r0, #4 /* r0++ */ + str r8, [r0], #4 /* store Data */ /* correct adresses for next loop */ sub r12, r12, #4 /* r12 = V-- */ add r1, r1, #4 /* r1 = V++ */ @@ -441,13 +440,12 @@ mpc_decoder_windowing_D: /* store Data[01..15] */ mov r8, r8, lsr #16 orr r8, r8, r9, lsl #16 /* (lo>>16) || (hi<<16) */ - str r8, [r0] /* store Data */ /* store Data[31..17] */ mov r10, r10, lsr #16 orr r10, r10, r11, lsl #16 /* (lo>>16) || (hi<<16) */ rsb r10, r10, #0 /* r10 = -r10 */ str r10, [r0, lr] /* store Data */ - add r0, r0, #4 /* r0++ */ + str r8, [r0], #4 /* store Data */ /* correct adresses for next loop */ sub r12, r12, #4 /* r12 = V-- */ add r1, r1, #4 /* r1 = V++ */ @@ -641,11 +639,10 @@ mpc_decoder_windowing_D: rsb r11, r11, #0 /* r11 = -r11 */ /* store Data[01..15] */ mov r9, r9, lsl #2 - str r9, [r0] /* store Data */ /* store Data[31..17] */ mov r11, r11, lsl #2 str r11, [r0, lr] /* store Data */ - add r0, r0, #4 /* r0++ */ + str r9, [r0], #4 /* store Data */ /* next loop */ subs lr, lr, #8 bgt .loop15