diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-12-06 18:44:45 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-12-06 18:44:45 +0000 |
commit | b774bae5fdceb0a0357e8866b3c235626c94bfe9 (patch) | |
tree | 8144cacb2e6aa1fd35a78dd7e1c677d96c45d6fe /firmware | |
parent | 4c43d9422cc1fb23d8fa87c528176872cee5e661 (diff) |
Coldfire targets: Fixed performance-hitting bug for unaligned transfers. Now unaligned transfers are less than 10% slower than aligned transfers.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11679 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rwxr-xr-x | firmware/target/coldfire/ata-as-coldfire.S | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/firmware/target/coldfire/ata-as-coldfire.S b/firmware/target/coldfire/ata-as-coldfire.S index 3b0d67f8e4..0148ea261f 100755 --- a/firmware/target/coldfire/ata-as-coldfire.S +++ b/firmware/target/coldfire/ata-as-coldfire.S @@ -62,9 +62,9 @@ copy_read_sectors: move.l %d2, %d3 lsr.l #8, %d3 move.b %d3, (%a0)+ /* write high byte of it, aligns dest addr */ - - btst.l #1, %d0 /* longword aligned? */ - beq.b .r_end_u_w1 /* yes, skip leading word handling */ + + btst.l #1, %d0 /* longword aligned? (testing old d0 value!) */ + bne.b .r_end_u_w1 /* yes, skip leading word handling */ swap %d2 /* move initial word up */ move.w (%a2), %d2 /* combine with second word */ @@ -273,8 +273,8 @@ copy_write_sectors: move.b (%a0)+, %d2 - btst.l #1, %d0 /* longword aligned? */ - beq.b .w_end_u_w1 /* yes, skip leading word handling */ + btst.l #1, %d0 /* longword aligned? (testing old d0 value!) */ + bne.b .w_end_u_w1 /* yes, skip leading word handling */ swap %d2 move.w (%a0)+, %d2 |