summaryrefslogtreecommitdiffstats
path: root/firmware/decompressor/sh_nrv2e_d8.S
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2008-10-29 07:14:37 +0000
committerJens Arnold <amiconn@rockbox.org>2008-10-29 07:14:37 +0000
commit9ae256186282db0ed0e5491c925f92e61591f396 (patch)
tree6dd3d9bb4f521f6b449ea4aa374b598d756bae7c /firmware/decompressor/sh_nrv2e_d8.S
parent2d4eacb9ec06e636519f6065c78c8f481b587f94 (diff)
downloadrockbox-9ae256186282db0ed0e5491c925f92e61591f396.tar.gz
rockbox-9ae256186282db0ed0e5491c925f92e61591f396.zip
Save another 4 bytes without sacrificing performance by subroutine rearrangement.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18916 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/decompressor/sh_nrv2e_d8.S')
-rw-r--r--firmware/decompressor/sh_nrv2e_d8.S20
1 files changed, 9 insertions, 11 deletions
diff --git a/firmware/decompressor/sh_nrv2e_d8.S b/firmware/decompressor/sh_nrv2e_d8.S
index c002911c0c..167251d595 100644
--- a/firmware/decompressor/sh_nrv2e_d8.S
+++ b/firmware/decompressor/sh_nrv2e_d8.S
@@ -81,15 +81,6 @@ eof_n2e:
rts
mov src, r0
- .align 2
-get1_n2e: ! in: T bit set
- mov.b @src+, bits ! SH1 sign-extends on load
- rotcl bits ! LSB = T, T = MSB
- shll16 bits
- rts
- shll8 bits
-
- .align 2
lit_n2e:
mov.b @src, tmp
add #1, src ! Need to fill the pipeline latency anyway
@@ -135,6 +126,13 @@ len_n2e:
bra gotlen_n2e
add #6-2, len
+get1_n2e: ! in: T bit set
+ mov.b @src+, bits ! SH1 sign-extends on load
+ rotcl bits ! LSB = T, T = MSB
+ shll16 bits
+ rts
+ shll8 bits
+
lenlast_n2e:
getnextb(len) ! 0,1,2,3
add #2, len
@@ -143,11 +141,11 @@ gotlen_n2e:
movt tmp ! too far away, so minimum match length is 3
add tmp, len
copy_n2e:
- add #-1, len
mov.b @(off,dst), tmp
- tst len, len
+ add #-1, len
mov.b tmp, @dst
add #1, dst
+ tst len, len
bf copy_n2e
bra top_n2e
nop