cotex m3汇编--thumb指令集

16-Bit Data Processing Instructions

Instruction Function
ADC Add with carry
ADD Add
ADR Add PC and an immediate value and put the result in a register
AND Logical AND
ASR Arithmetic shift right
BIC Bit clear (Logical AND one value with the logic inversion of another value)
CMN Compare negative (compare one data with two’s complement of another data and update flags)
CMP Compare (compare two data and update flags)
CPY Copy (available from architecture v6; move a value from one high or low register to another high or low register); synonym of MOV instruction
EOR Exclusive OR
LSL Logical shift left
LSR Logical shift right
MOV Move (can be used for register-to-register transfers or loading immediate data)
MUL Multiply
MVN Move NOT (obtain logical inverted value)
NEG Negate (obtain two’s complement value), equivalent to RSB
ORR Logical OR
RSB Reverse subtract
ROR Rotate right
SBC Subtract with carry
SUB Subtract
TST Test (use as logical AND; Z flag is updated but AND result is not stored)
REV Reverse the byte order in a 32-bit register (available from architecture v6)
REV16 Reverse the byte order in each 16-bit half word of a 32-bit register (available from architecture v6)
REVSH Reverse the byte order in the lower 16-bit half word of a 32-bit register and sign extends the result to 32 bits (available from architecture v6)
SXTB Signed extend byte (available from architecture v6)
SXTH Signed extend half word (available from architecture v6)
UXTB Unsigned extend byte (available from architecture v6)
UXTH Unsigned extend half word (available from architecture v6)

16-Bit Branch Instructions

Instruction Function
B Branch
B< cond > Conditional branch
BL Branch with link; call a subroutine and store the return address in LR (this is actually a 32-bit instruction, but it is also available in Thumb in traditional ARM processors)
BLX Branch with link and change state (BLX < reg > only)1
BX < reg > Branch with exchange state
CBZ Compare and branch if zero (architecture v7)
CBNZ Compare and branch if nonzero (architecture v7)
IT IF-THEN (architecture v7)

16-Bit Load and Store Instructions

Instruction Function
LDR Load word from memory to register
LDRH Load half word from memory to register
LDRB Load byte from memory to register
LDRSH Load half word from memory, sign extend it, and put it in register
LDRSB Load byte from memory, sign extend it, and put it in register
STR Store word from register to memory
STRH Store half word from register to memory
STRB Store byte from register to memory
LDM/LDMIA Load multiple/Load multiple increment after
STM/STMIA Store multiple/Store multiple increment after
PUSH Push multiple registers
POP Pop multiple registers

Other 16-Bit Instructions

Instruction Function
SVC Supervisor call
SEV Send event
WFE Sleep and wait for event
WFI Sleep and wait for interrupt
BKPT Breakpoint; if debug is enabled, it will enter debug mode (halted), or if debug monitor exception is enabled, it will invoke the debug exception; otherwise, it will invoke a fault exception
NOP No operation
CPSIE Enable PRIMASK (CPSIE i)/FAULTMASK (CPSIE f ) register (set the register to 0)
CPSID Disable PRIMASK (CPSID i)/ FAULTMASK (CPSID f ) register (set the register to 1)

32-Bit Data Processing Instructions

Instruction Function
ADC Add with carry
ADD Add
ADDW Add wide (#immed_12)
ADR Add PC and an immediate value and put the result in a register
AND Logical AND
ASR Arithmetic shift right
BIC Bit clear (logical AND one value with the logic inversion of another value)
BFC Bit field clear
BFI Bit field insert
CMN Compare negative (compare one data with two’s complement of another data and update flags)
CMP Compare (compare two data and update flags)
CLZ Count leading zero
EOR Exclusive OR
LSL Logical shift left
LSR Logical shift right
MLA Multiply accumulate
MLS Multiply and subtract
MOV Move
MOVW Move wide (write a 16-bit immediate value to register)
MOVT Move top (write an immediate value to the top half word of destination reg)
MVN Move negative
MUL Multiply
ORR Logical OR
ORN Logical OR NOT
RBIT Reverse bit
REV Byte reverse word
REV16 Byte reverse packed half word
REVSH Byte reverse signed half word
ROR Rotate right
RSB Reverse subtract
RRX Rotate right extended
SBC Subtract with carry
SBFX Signed bit field extract
SDIV Signed divide
SMLAL Signed multiply accumulate long
SMULL Signed multiply long
SSAT Signed saturate
SBC Subtract with carry
SUB Subtract
SUBW Subtract wide (#immed_12)
SXTB Sign extend byte
SXTH Sign extend half word
TEQ Test equivalent (use as logical exclusive OR; flags are updated but result is not stored)
TST Test (use as logical AND; Z flag is updated but AND result is not stored)
UBFX Unsigned bit field extract
UDIV Unsigned divide
UMLAL Unsigned multiply accumulate long
UMULL Unsigned multiply long
USAT Unsigned saturate
UXTB Unsigned extend byte
UXTH Unsigned extend half word

32-Bit Load and Store Instructions

Instruction Function
LDR Load word data from memory to register
LDRT Load word data from memory to register with unprivileged access
LDRB Load byte data from memory to register
LDRBT Load byte data from memory to register with unprivileged access
LDRH Load half word data from memory to register
LDRHT Load half word data from memory to register with unprivileged access
LDRSB Load byte data from memory, sign extend it, and put it to register
LDRSBT Load byte data from memory with unprivileged access, sign extend it, and put it to register
LDRSH Load half word data from memory, sign extend it, and put it to register
LDRSHT Load half word data from memory with unprivileged access, sign extend it, and put it to register
LDM/LDMIA Load multiple data from memory to registers
LDMDB Load multiple decrement before
LDRD Load double word data from memory to registers
STR Store word to memory
STRT Store word to memory with unprivileged access
STRB Store byte data to memory
STRBT Store byte data to memory with unprivileged access
STRH Store half word data to memory
STRHT Store half word data to memory with unprivileged access
STM/STMIA Store multiple words from registers to memory
STMDB Store multiple decrement before
STRD Store double word data from registers to memory
PUSH Push multiple registers
POP Pop multiple registers

32-Bit Branch Instructions

Instruction Function
B Branch
B< cond > Conditional branch
BL Branch and link
TBB Table branch byte; forward branch using a table of single byte offset
TBH Table branch half word; forward branch using a table of half word offset

Other 32-Bit Instructions

Instruction Function
LDREX Exclusive load word
LDREXH Exclusive load half word
LDREXB Exclusive load byte
STREX Exclusive store word
STREXH Exclusive store half word
STREXB Exclusive store byte
CLREX Clear the local exclusive access record of local processor
MRS Move special register to general-purpose register
MSR Move to special register from general-purpose register
NOP No operation
SEV Send event
WFE Sleep and wait for event
WFI Sleep and wait for interrupt
ISB Instruction synchronization barrier
DSB Data synchronization barrier
DMB Data memory barrier

你可能感兴趣的:(Stm32f103,Arm,&,Asm)