Thumb Instruction Reference

5.2.2ADD, 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.

5-18

Copyright © 2000, 2001 ARM Limited. All rights reserved.

ARM DUI 0068B

Page 212
Image 212
ARM VERSION 1.2 manual 2 ADD, high or low registers, Is a register containing the second operand