Unit 5 Notes _ARM Instruction
Unit 5 Notes _ARM Instruction
Instruction set of a processor gives information about the instructions, addressing modes and
the timing requirement for the execution of each instruction.
ARM architecture has two instruction sets - The ARM instruction set and Thumb instruction set.
In ARM instruction set, all instructions are 32 bits wide and are aligned at 4-bytes
boundaries in memory.
On the other hand, in thumb instruction set, all instructions are of 16 bits wide and are
aligned at even or two bytes boundaries in memory.
Rotate Right
Branch B Label
B
(Unconditional jump to specified location) Branch to ‘Label’
LDM R0 !, {R4-R11}
LDM Load multiple Registers from memory Load 8-registers R4 to R11
from memory pointed by R0
STM R0 !, {R4-R11}
STM Store multiple Registers to memory Store 8-registers R4 to R11
to memory pointed by R0
(c) Stack instructions:
PUSH R4
Push R4 onto stack
PUSH Push registers onto stack PUSH {R4-R11}
Push registers R4 to R11
onto stack
POP R4
Pop R4 from stack
POP Pop registers from stack POP {R4-R11}
Pop registers R4 to R11
from stack
Swap a 32-bit word between Registers and SWP R0, R1, [R2]
SWP
Memory [R2] R1
R0 [R2]
SWPB Swap a byte between Registers and Memory SWPB R0, R1, [R2]