summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire/ata-as-coldfire.S
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2010-05-02 19:36:20 +0000
committerJens Arnold <amiconn@rockbox.org>2010-05-02 19:36:20 +0000
commite891e90883fa816536a0b8771ca4b18234d83088 (patch)
tree8729ae69f1913a1e70848fd56b405d477323b1f0 /firmware/target/coldfire/ata-as-coldfire.S
parent5768f2b145bbf4fff6d7fbfb91648b05495c5248 (diff)
downloadrockbox-e891e90883fa816536a0b8771ca4b18234d83088.tar.gz
rockbox-e891e90883fa816536a0b8771ca4b18234d83088.zip
Save a few instructions by better use of conditions.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25786 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/ata-as-coldfire.S')
-rw-r--r--firmware/target/coldfire/ata-as-coldfire.S18
1 files changed, 5 insertions, 13 deletions
diff --git a/firmware/target/coldfire/ata-as-coldfire.S b/firmware/target/coldfire/ata-as-coldfire.S
index 7f46a987ee..28993c1769 100644
--- a/firmware/target/coldfire/ata-as-coldfire.S
+++ b/firmware/target/coldfire/ata-as-coldfire.S
@@ -80,7 +80,7 @@ copy_read_sectors:
and.l #0xFFFFFFF0,%d0 /* d0 == first line bound */
cmp.l %a0, %d0 /* any leading longwords? */
bls.b .r_end_u_l1 /* no: skip loop */
-
+
.r_loop_u_l1:
move.w (%a2), %d3 /* load first word */
swap %d3 /* move to upper 16 bit */
@@ -150,9 +150,7 @@ copy_read_sectors:
bhi.b .r_loop_u_l2
.r_end_u_l2:
- addq.l #2, %a1 /* back to final end address */
- cmp.l %a0, %a1 /* one word left? */
- bls.b .r_end_u_w2
+ blo.b .r_end_u_w2 /* one word left? */
swap %d2 /* move old word to upper 16 bits */
move.w (%a2), %d2 /* load final word */
@@ -220,9 +218,7 @@ copy_read_sectors:
bhi.b .r_loop_a_l2
.r_end_a_l2:
- addq.l #2, %a1 /* back to final end address */
- cmp.l %a0, %a1 /* one word left? */
- bls.b .r_end_a_w2
+ blo.b .r_end_a_w2 /* one word left? */
move.w (%a2), (%a0)+ /* copy final word */
@@ -366,9 +362,7 @@ copy_write_sectors:
bhi.b .w_loop_u_l2
.w_end_u_l2:
- addq.l #2, %a1 /* back to final end address */
- cmp.l %a0, %a1 /* one word left? */
- bls.b .w_end_u_w2
+ blo.b .w_end_u_w2 /* one word left? */
swap %d2
move.w (%a0)+, %d2
@@ -444,9 +438,7 @@ copy_write_sectors:
bhi.b .w_loop_a_l2
.w_end_a_l2:
- addq.l #2, %a1 /* back to final end address */
- cmp.l %a0, %a1 /* one word left? */
- bls.b .w_end_a_w2
+ blo.b .w_end_a_w2 /* one word left? */
move.w (%a0)+, (%a2) /* copy final word */