summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTC Wan2011-03-23 15:38:45 +0800
committerTC Wan2011-03-23 15:38:45 +0800
commit05eb01dbbde30b017e120fc826e0fe5c6e36798b (patch)
tree458e1145531f7ba483cff42316cb3028d650de6f
parent4063fdfc7bae2702e71db748934bc2a83fe73e8d (diff)
cannot use rol, covert to ror instead
-rw-r--r--Debugger/debug_comm.S6
1 files changed, 3 insertions, 3 deletions
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 */