Format 14: Push/Pop Registers; Operation - Samsung S3C2500B User Manual

Table of Contents

Advertisement

INSTRUCTION SET

3.33 FORMAT 14: PUSH/POP REGISTERS

15
14
13
1
0
1

3.33.1 OPERATION

The instructions in this group allow registers 0-7 and optionally LR to be pushed onto the stack, and registers 0-7
and optionally PC to be popped off the stack. The THUMB assembler syntax is shown in Table 3-21.
L
B
THUMB
Assembler
0
0
PUSH { Rlist }
0
1
PUSH { Rlist, LR }
1
0
POP { Rlist }
1
1
POP { Rlist, PC }
3-88
11
10
9
12
1
L
1
0
[7:0] Register List
[8] PC/LR Bit
0 = Do not store LR/Load PC
1 = Store LR/Load PC
[11] Load/Store Bit
0 = Store to memory
1 = Load from memory
Figure 3-43. Format 14
The stack is always assumed to be full descending.
Table 3-21. PUSH and POP Instructions
ARM Equivalent
STMDB R13!, { Rlist }
STMDB R13!, { Rlist, R14} Push the Link Register and the registers specified
LDMIA R13!, { Rlist }
LDMIA R13!, {Rlist, R15}
8
7
R
NOTE
Push the registers specified by Rlist onto the stack.
Update the stack pointer.
by Rlist (if any) onto the stack. Update the stack
pointer.
Pop values off the stack into the registers specified
by Rlist. Update the stack pointer.
Pop values off the stack and load into the registers
specified by Rlist. Pop the PC off the stack.
Update the stack pointer.
0
Rlist
Action
S3C2500B

Advertisement

Table of Contents
loading

Table of Contents