From b774bae5fdceb0a0357e8866b3c235626c94bfe9 Mon Sep 17 00:00:00 2001 From: Jens Arnold Date: Wed, 6 Dec 2006 18:44:45 +0000 Subject: 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 --- firmware/target/coldfire/ata-as-coldfire.S | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'firmware') 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 -- cgit v1.2.3