Cortex-M0
Instruction Set Summary
The
Cortex M0 processor implements a version of the Thumb instruction set. Table 1 lists the
supported instructions.
Note
In Table 1:
For more information on the instructions and operands,
see the instruction descriptions.
Table 1 Cortex-M0 instructions
Mnemonic |
Operands |
Brief description |
Flags |
See |
ADCS |
{Rd,} Rn, Rm |
Add with Carry |
N,Z,C,V |
|
ADD{S} |
{Rd,} Rn,
<Rm|#imm> |
Add |
N,Z,C,V |
|
ADR |
Rd, label |
PC-relative Address to Register |
- |
|
ANDS |
{Rd,} Rn,
Rm |
Bitwise AND |
N,Z |
|
ASRS |
{Rd,} Rm,
<Rs|#imm> |
Arithmetic Shift Right |
N,Z,C |
|
B{cc} |
label |
Branch {conditionally} |
- |
|
BICS |
{Rd,} Rn,
Rm |
Bit Clear |
N,Z |
|
BKPT |
#imm |
Breakpoint |
- |
|
BL |
label |
Branch with Link |
- |
|
BLX |
Rm |
Branch indirect with Link |
- |
|
BX |
Rm |
Branch indirect |
- |
|
CMN |
Rn, Rm |
Compare Negative |
N,Z,C,V |
|
CMP |
Rn, <Rm|#imm> |
Compare |
N,Z,C,V |
|
CPSID |
i |
Change Processor State, Disable Interrupts |
- |
|
CPSIE |
i |
Change Processor State, Enable Interrupts |
- |
|
DMB |
- |
Data Memory Barrier |
- |
|
DSB |
- |
Data Synchronization Barrier |
- |
|
EORS |
{Rd,} Rn,
Rm |
Exclusive OR |
N,Z |
|
ISB |
- |
Instruction Synchronization Barrier |
- |
|
LDM |
Rn{!}, reglist |
Load Multiple registers, increment after |
- |
|
LDR |
Rt, label |
Load Register from PC-relative address |
- |
|
LDR |
Rt, [Rn, <Rm|#imm>] |
Load Register with word |
- |
|
LDRB |
Rt, [Rn, <Rm|#imm>] |
Load Register with byte |
- |
|
LDRH |
Rt, [Rn, <Rm|#imm>] |
Load Register with halfword |
- |
|
LDRSB |
Rt, [Rn, <Rm|#imm>] |
Load Register with signed byte |
- |
|
LDRSH |
Rt, [Rn, <Rm|#imm>] |
Load Register with signed halfword |
- |
|
LSLS |
{Rd,} Rn,
<Rs|#imm> |
Logical Shift Left |
N,Z,C |
|
LSRS |
{Rd,} Rn,
<Rs|#imm> |
Logical Shift Right |
N,Z,C |
|
MOV{S} |
Rd, Rm |
Move |
N,Z |
|
MRS |
Rd, spec_reg |
Move to general register from special register |
- |
|
MSR |
spec_reg, Rm |
Move to special register from general register |
N,Z,C,V |
|
MULS |
Rd, Rn, Rm |
Multiply, 32-bit result |
N,Z |
|
MVNS |
Rd, Rm |
Bitwise NOT |
N,Z |
|
NOP |
- |
No Operation |
- |
|
ORRS |
{Rd,} Rn,
Rm |
Logical OR |
N,Z |
|
POP |
reglist |
Pop registers from stack |
- |
|
PUSH |
reglist |
Push registers onto stack |
- |
|
REV |
Rd, Rm |
Byte-Reverse word |
- |
|
REV16 |
Rd, Rm |
Byte-Reverse packed halfwords |
- |
|
REVSH |
Rd, Rm |
Byte-Reverse signed halfword |
- |
|
RORS |
{Rd,} Rn,
Rs |
Rotate Right |
N,Z,C |
|
RSBS |
{Rd,} Rn,
#0 |
Reverse Subtract |
N,Z,C,V |
|
SBCS |
{Rd,} Rn,
Rm |
Subtract with Carry |
N,Z,C,V |
|
SEV |
- |
Send Event |
- |
|
STM |
Rn!, reglist |
Store Multiple registers, increment after |
- |
|
STR |
Rt, [Rn, <Rm|#imm>] |
Store Register as word |
- |
|
STRB |
Rt, [Rn, <Rm|#imm>] |
Store Register as byte |
- |
|
STRH |
Rt, [Rn, <Rm|#imm>] |
Store Register as halfword |
- |
|
SUB{S} |
{Rd,} Rn,
<Rm|#imm> |
Subtract |
N,Z,C,V |
|
SVC |
#imm |
Supervisor Call |
- |
|
SXTB |
Rd, Rm |
Sign extend byte |
- |
|
SXTH |
Rd, Rm |
Sign extend halfword |
- |
|
TST |
Rn, Rm |
Logical AND based test |
N,Z |
|
UXTB |
Rd, Rm |
Zero extend a byte |
- |
|
UXTH |
Rd, Rm |
Zero extend a halfword |
- |
|
WFE |
- |
Wait For Event |
- |
|
WFI |
- |
Wait For Interrupt |
- |