2.6.1 Instruction Set Summary

The processor implements a version of the Thumb instruction set. The following table lists the supported instructions.

In the following table:

  • angle brackets, <>, enclose alternative forms of the operand
  • braces, {}, enclose optional operands
  • the Operands column is not exhaustive
  • Op2 is a flexible second operand that can be either a register or a constant
  • most instructions can use an optional condition code suffix.

For more information on the instructions and operands, see the instruction descriptions.

Table 2-20. Cortex-M3 Processor Instructions
MnemonicOperandsBrief descriptionFlags
ADC, ADCS{Rd,} Rn, Op2Add with CarryN, Z, C, V
ADD, ADDS{Rd,} Rn, Op2AddN, Z, C, V
ADD, ADDW{Rd,} Rn, #imm12AddN, Z, C, V
ADRRd, labelLoad PC-relative Address—
AND, ANDS{Rd,} Rn, Op2Logical ANDN, Z, C
ASR, ASRSRd, Rm, <Rs|#n>Arithmetic Shift RightN, Z, C
BlabelBranch—
BFCRd, #lsb, #widthBit Field Clear—
BFIRd, Rn, #lsb, #widthBit Field Insert—
BIC, BICS{Rd,} Rn, Op2Bit ClearN, Z, C
BKPT#immBreakpoint—
BLlabelBranch with Link—
BLXRmBranch indirect with Link—
BXRmBranch indirect—
CBNZRn, labelCompare and Branch if Non Zero
CBZRn, labelCompare and Branch if Zero—
CLREXClear Exclusive—
CLZRd, RmCount Leading Zeros—
CMNRn, Op2Compare NegativeN, Z, C, V
CMPRn, Op2CompareN, Z, C, V
CPSIDiChange Processor State, Disable Interrupts—
CPSIEiChange Processor State, Enable Interrupts—
DMBData Memory Barrier—
DSBData Synchronization Barrier—
EOR, EORS{Rd,} Rn, Op2Exclusive ORN, Z, C
ISBInstruction Synchronization Barrier—
ITIf-Then condition block—
LDMRn{!}, reglistLoad Multiple registers, increment after—
LDMDB, LDMEARn{!}, reglistLoad Multiple registers, decrement before—
LDMFD, LDMIARn{!}, reglistLoad Multiple registers, increment after—
LDRRt, [Rn, #offset]Load Register with word—
LDRB, LDRBTRt, [Rn, #offset]Load Register with byte—
LDRDRt, Rt2, [Rn, #offset]Load Register with two bytes—
LDREXRt, [Rn, #offset]Load Register Exclusive
LDREXBRt, [Rn]Load Register Exclusive with Byte—
LDREXHRt, [Rn]Load Register Exclusive with Halfword—
LDRH, LDRHTRt, [Rn, #offset]Load Register with Halfword—
LDRSB, LDRSBTRt, [Rn, #offset]Load Register with Signed Byte—
LDRSH, LDRSHTRt, [Rn, #offset]Load Register with Signed Halfword—
LDRTRt, [Rn, #offset]Load Register with word—
LSL, LSLSRd, Rm, <Rs|#n>Logical Shift LeftN, Z, C
LSR, LSRSRd, Rm, <Rs|#n>Logical Shift RightN, Z, C
MLARd, Rn, Rm, RaMultiply with Accumulate, 32-bit result—
MLSRd, Rn, Rm, RaMultiply and Subtract, 32-bit result—
MOV, MOVSRd, Op2MoveN, Z, C
MOVTRd, #imm16Move Top—
MOVW, MOVRd, #imm16Move 16-bit constantN, Z, C
MRSRd, spec_regMove from Special Register to general register—
MSRspec_reg, RmMove from general register to Special RegisterN, Z, C,V
MUL, MULS{Rd,} Rn, RmMultiply, 32-bit resultN, Z
MVN, MVNSRd, Op2Move NOTN, Z, C
NOPNo Operation—
ORN, ORNS{Rd,} Rn, Op2Logical OR NOTN, Z, C
ORR, ORRS{Rd,} Rn, Op2Logical ORN, Z, C
POPreglistPop registers from stack—
PUSHreglistPush registers onto stack—
RBITRd, RnReverse Bits—
REVRd, RnReverse byte order in a word—
REV16Rd, RnReverse byte order in each halfword—
REVSHRd, RnReverse byte order in bottom halfword and sign extend—
ROR, RORSRd, Rm, <Rs|#n>Rotate RightN, Z, C
RRX, RRXSRd, RmRotate Right with ExtendN, Z, C
RSB, RSBS{Rd,} Rn, Op2Reverse SubtractN, Z, C, V
SBC, SBCS{Rd,} Rn, Op2Subtract with CarryN, Z, C, V
SBFXRd, Rn, #lsb, #widthSigned Bit Field Extract—
SDIV{Rd,} Rn, RmSigned Divide—
SEVSend Event—
SMLALRdLo, RdHi, Rn, RmSigned Multiply with Accumulate (32 x 32 + 64), 64-bit result—
SMULLRdLo, RdHi, Rn, RmSigned Multiply (32 x 32), 64-bit result—
SSATRd, #n, Rm {,shift #s}Signed SaturateQ
STMRn{!}, reglistStore Multiple registers, increment after—
STMDB, STMEARn{!}, reglistStore Multiple registers, decrement before—
STMFD, STMIARn{!}, reglistStore Multiple registers, increment after—
STRRt, [Rn, #offset]Store Register word—
STRB, STRBTRt, [Rn, #offset]Store Register byte—
STRDRt, Rt2, [Rn, #offset]Store Register two words—
STREXRd, Rt, [Rn, #offset]Store Register Exclusive
STREXBRd, Rt, [Rn]Store Register Exclusive Byte—
STREXHRd, Rt, [Rn]Store Register Exclusive Halfword—
STRH, STRHTRt, [Rn, #offset]Store Register Halfword—
STRTRt, [Rn, #offset]Store Register word—
SUB, SUBS{Rd,} Rn, Op2SubtractN, Z, C, V
SUB, SUBW{Rd,} Rn, #imm12SubtractN, Z, C, V
SVC#immSupervisor Call—
SXTB{Rd,} Rm {,ROR #n}Sign extend a byte—
SXTH{Rd,} Rm {,ROR #n}Sign extend a halfword—
TBB[Rn, Rm]Table Branch Byte—
TBH[Rn, Rm, LSL #1]Table Branch Halfword—
TEQRn, Op2Test EquivalenceN, Z, C
TSTRn, Op2TestN, Z, C
UBFXRd, Rn, #lsb, #widthUnsigned Bit Field Extract—
UDIV{Rd,} Rn, RmUnsigned Divide—
UMLALRdLo, RdHi, Rn, RmUnsigned Multiply with Accumulate
(32 x 32 + 64), 64-bit result—
UMULLRdLo, RdHi, Rn, RmUnsigned Multiply (32 x 32), 64-bit result—
USATRd, #n, Rm {,shift #s}Unsigned SaturateQ
UXTB{Rd,} Rm {,ROR #n}Zero extend a Byte—
UXTH{Rd,} Rm {,ROR #n}Zero extend a Halfword—
WFEWait for Event—
WFIWait for Interrupt—