aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTat-Chee Wan (USM)2011-04-04 17:32:09 +0800
committerTat-Chee Wan (USM)2011-04-04 17:32:09 +0800
commit373c665e5015040f402771a106e802c909c81d17 (patch)
tree46347fae17b98e1a44265ffbe7cb11cbadcc5cce
parent638ad69debcbe71fbab1a1c654b207e52c237111 (diff)
left out adc opcode support
-rw-r--r--Debugger/debug_stub.S9
1 files changed, 9 insertions, 0 deletions
diff --git a/Debugger/debug_stub.S b/Debugger/debug_stub.S
index 80565aa..e99b144 100644
--- a/Debugger/debug_stub.S
+++ b/Debugger/debug_stub.S
@@ -2284,6 +2284,15 @@ _opcode_add:
add r0, r0, r1
bx lr
+_opcode_adc:
+ /* Op1 + Op2 + C */
+ moveq r2, #DBGSTACK_USERCPSR_INDEX /* convert register enum to Debug Stack index */
+ _getdbgregisterfromindex r2, r3 /* Retrieve CPSR contents from Index (R2) into R3 */
+ ands r3, r3, #CPSR_CFLAG /* Keep C Flag, NE if C set */
+ add r0, r0, r1
+ addne r0, r0, #1 /* Add C if set */
+ bx lr
+
_opcode_sbc:
/* Op1 - Op2 + C - 1 */
moveq r2, #DBGSTACK_USERCPSR_INDEX /* convert register enum to Debug Stack index */