summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNils Wallménius <nils@rockbox.org>2010-06-18 13:47:37 +0000
committerNils Wallménius <nils@rockbox.org>2010-06-18 13:47:37 +0000
commit273d05906de397785d97f71c221b8dde9e77e93e (patch)
tree744fc563736500ca96b59f6391bce0e733399b89
parent68e2023184ab0138a0c475e2100c1d76891ef2af (diff)
downloadrockbox-273d05906de397785d97f71c221b8dde9e77e93e.tar.gz
rockbox-273d05906de397785d97f71c221b8dde9e77e93e.zip
libmad: Optimize away 2 instructions from coldfire III_imdct, no measurable speed difference.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@26918 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/codecs/libmad/imdct_mcf5249.S12
1 files changed, 5 insertions, 7 deletions
diff --git a/apps/codecs/libmad/imdct_mcf5249.S b/apps/codecs/libmad/imdct_mcf5249.S
index d6d4460986..b5e2a12b0f 100644
--- a/apps/codecs/libmad/imdct_mcf5249.S
+++ b/apps/codecs/libmad/imdct_mcf5249.S
@@ -34,10 +34,10 @@ III_imdct_s:
34 * get more low bits out of the accext01 register _before_ doing the 34 * get more low bits out of the accext01 register _before_ doing the
35 * movclrs. 35 * movclrs.
36 */ 36 */
37 sub.l %a0, %a0 /* clear loop variable */ 37 moveq.l #3, %d5 /* we do three outer loop iterations */
38.imdctloop: /* outer loop label */ 38.imdctloop: /* outer loop label */
39 lea.l imdct_s, %a1 /* load pointer to imdct coefs in a1 */ 39 lea.l imdct_s, %a1 /* load pointer to imdct coefs in a1 */
40 movem.l (%a2), %d0-%d5 /* load some input data in d0-d5 */ 40 movem.l (%a2), %d0-%d4/%a0 /* load some input data in d0-d4/a0 */
41 lea.l (6*4, %a2), %a2 41 lea.l (6*4, %a2), %a2
42 42
43 clr.l %d7 /* clear loop variable */ 43 clr.l %d7 /* clear loop variable */
@@ -48,7 +48,7 @@ III_imdct_s:
48 mac.l %d2, %a4, (%a1)+, %a4, %acc0 48 mac.l %d2, %a4, (%a1)+, %a4, %acc0
49 mac.l %d3, %a4, (%a1)+, %a4, %acc0 49 mac.l %d3, %a4, (%a1)+, %a4, %acc0
50 mac.l %d4, %a4, (%a1)+, %a4, %acc0 50 mac.l %d4, %a4, (%a1)+, %a4, %acc0
51 mac.l %d5, %a4, (%a1)+, %a4, %acc0 51 mac.l %a0, %a4, (%a1)+, %a4, %acc0
52 movclr.l %acc0, %d6 /* get result, left shifted once */ 52 movclr.l %acc0, %d6 /* get result, left shifted once */
53 asl.l #3, %d6 /* one shift free, shift three more */ 53 asl.l #3, %d6 /* one shift free, shift three more */
54 move.l %d6, (%a3, %d7.l*4) /* yptr[i] = result */ 54 move.l %d6, (%a3, %d7.l*4) /* yptr[i] = result */
@@ -60,7 +60,7 @@ III_imdct_s:
60 mac.l %d2, %a4, (%a1)+, %a4, %acc0 60 mac.l %d2, %a4, (%a1)+, %a4, %acc0
61 mac.l %d3, %a4, (%a1)+, %a4, %acc0 61 mac.l %d3, %a4, (%a1)+, %a4, %acc0
62 mac.l %d4, %a4, (%a1)+, %a4, %acc0 62 mac.l %d4, %a4, (%a1)+, %a4, %acc0
63 mac.l %d5, %a4, (%a1)+, %a4, %acc0 63 mac.l %a0, %a4, (%a1)+, %a4, %acc0
64 movclr.l %acc0, %d6 /* get result */ 64 movclr.l %acc0, %d6 /* get result */
65 asl.l #3, %d6 65 asl.l #3, %d6
66 move.l %d6, (11*4, %a3, %d7.l*4) /* yptr[11 - i] = result */ 66 move.l %d6, (11*4, %a3, %d7.l*4) /* yptr[11 - i] = result */
@@ -72,9 +72,7 @@ III_imdct_s:
72 jne .macloop 72 jne .macloop
73 73
74 lea.l (12*4, %a3), %a3 /* add pointer increment */ 74 lea.l (12*4, %a3), %a3 /* add pointer increment */
75 addq.l #1, %a0 /* increment outer loop variable */ 75 subq.l #1, %d5 /* decrement outer loop variable */
76 moveq.l #3, %d0
77 cmp.l %d0, %a0 /* we do three outer loop iterations */
78 jne .imdctloop 76 jne .imdctloop
79 77
80 /* windowing, overlapping and concatenation */ 78 /* windowing, overlapping and concatenation */