Thumb Instruction Referenc e
5-18 Copyright © 2000, 2001 ARM Limited. A ll rights reserved. ARM DUI 0068B
5.2.2 ADD, high or low registers
Add values in registers, returning the result to the first operand register.
Syntax
ADD Rd, Rm
where:
Rd
is the destination register. It is also used for the first operand.
Rm
is a register containing the second operand.
Usage
This instruction adds the values in
Rd
and
Rm
, and places the result in
Rd
.
Note
An
ADD Rd,Rm
instruction where both
Rd
and
Rm
are low registers assembles to an
ADD
Rd,Rd,Rm
instruction (see ADD and SUB, low registers on page 5-16).
Be aware of this when looking at disassembly listings.
Condition flags
The N, Z, C, and V condition flags are:
updated if both
Rd
and
Rm
are low registers
unaffected otherwise.
Architectures
This instruction is available in all T variants of the ARM architecture.
Examples
ADD r12,r4
ADD r10,r11
ADD r0,r8
ADD r2,r4 ; equivalent to ADD r2,r2,r4. Does affect flags.