英特爾 XScale(R) 技術主題POP (Thumb*) - 彈出多個暫存器

語法

POP reg {, reglist }

其中:

 reg

要載入的有效暫存器,範圍是 [R0..R7]

說明

POP 指令載入 reg 指定的部分甚至全部通用暫存器以及 PC。如果載入 PC,則 R 位設為 1。reg 指定的暫存器按照升序從自低到高的記憶體地址進行載入。必須在暫存器列表中指定至少一個暫存器,否則結果將會“無法預知”。

備註

如果試圖進行無效的載入或儲存數據訪問,則產生數據終止異常。如果實現系統控制協處理器時啟用對齊檢查,並且存在位 [01:0] != 0b00 的地址,則產生對齊異常。

定址模式

無運算元。

影響的標誌

N

Z

C

V

Q

S

I

F

T

 

 

 

 

 

 

 

 

M

編碼

15

14

13

12

11

10

9

8

7

 

0

1

0

1

1

1

1

0

R

reglist

示例

1                                       ;@.text
2                                       ;@.globl funpop
3                                       ;@.align 0
4                                       ;
5                                   AREA example,CODE,READONLY
6                                   CODE16
7
8                                   label1
9                                       ; POP a block of registers off the
10                                      ; stack.Registers are loaded in
11                                      ; numerical, not listed, order.
12                                      ; So loading list is: R1,R2,R4,R5,
13                                      ; R6,R7, then PC.
14                                      ; SP is incremented as normal
15                                      ; by 28 bytes.
16                                      ; Loading to PC causes a branch
17                                      ; to its new address
18    00000000    BDF6    POP    {R2,R4-R7,PC,R1}
19
20
21
22                                      ; Pop a block of registers
23                                      ; R1,R2,R3,R4 from stack.
24                                      ; Pop order is R1,R2,R3, then R4.
25                                      ; SP is incremented as normal
26                                      ; by 16 bytes.
27    00000002    BC1E    POP    {R1-R4}

更多資訊

請參閱 PUSH 指令