Download ARM Instruction Set

Transcript
Thumb Instruction Set
5.6
Stack Operations—PUSH and POP
This section describes
5.6.1
•
Pushing and popping registers
•
Stack pointer adjustment operation
Group 1: PUSH/POP instructions
This group has the syntax:
opcode
{register-list}
where register-list is a comma-separated list of registers or register ranges. A register
range is two register names joined by a hyphen. All registers must be in the range 0 to 7 plus
R14 for PUSH or R15 for POP.
opcode may be one of:
PUSH
Push a block of registers, optionally including the link register, from the implicit
program stack.
POP
Pop a block of registers, optionally including the program counter, from the
implicit program stack.
The implicit program stack is a full descending stack using R13 as the stack pointer.
5.6.2
Group 2: stack pointer adjust
This group has the syntax:
opcode
R13, #N
where:
N
is an immediate constant in the range -508 to +508.
The assembler also allows the form:
opcode
R13, R13, #N
opcode may be one of :
ADD
SUB
5.6.3
R13 + N -> R13
R13 - N -> R13
Effect on condition codes
The stack operations do not affect the condition codes.
Reference Manual
ARM DUI 0020D
5-15