From 05eb01dbbde30b017e120fc826e0fe5c6e36798b Mon Sep 17 00:00:00 2001 From: TC Wan Date: Wed, 23 Mar 2011 15:38:45 +0800 Subject: cannot use rol, covert to ror instead --- Debugger/debug_comm.S | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Debugger/debug_comm.S') diff --git a/Debugger/debug_comm.S b/Debugger/debug_comm.S index 5e0b090..358cc76 100644 --- a/Debugger/debug_comm.S +++ b/Debugger/debug_comm.S @@ -465,9 +465,9 @@ _conv_ascii2byte_le: bne 2b /* Cummulative value done, need to rotate it into the correct position for return value */ pop {r3} /* retrieve counter */ - sub r3, r3, #1 /* count - 1 */ - lsl r3, r3, #3 /* [(count-1) x 8] bits to rotate */ - mov r0, r2, rol r3 /* Copy it to R0 as return value */ + rsb r3, r3, #5 /* 5 - count */ + lsl r3, r3, #3 /* [(5-count) x 8] bits to rotate */ + mov r0, r2, ror r3 /* Copy it to R0 as return value */ _exit_conv_ascii2byte_le: ldmfd sp!, {r2,r3, pc} /* return hex value in R0 */ -- cgit v1.2.3