The Cortex-M4 Instruction Set
ARM DUI 0553A
Copyright © 2010 ARM. All rights reserved.
3-43
ID121610
Non-Confidential
Example 3-4 64-bit addition
ADDS
R4, R0, R2
; add the least significant words
ADC
R5, R1, R3
; add the most significant words with carry
Multiword values do not have to use consecutive registers.
shows instructions that
subtract a 96-bit integer contained in R9, R1, and R11 from another contained in R6, R2, and
R8. The example stores the result in R6, R9, and R2.
Example 3-5 96-bit subtraction
SUBS
R6, R6, R9
; subtract the least significant words
SBCS
R9, R2, R1
; subtract the middle words with carry
SBC
R2, R8, R11
; subtract the most significant words with carry