英特爾 XScale(R) 技術主題PUSH (Thumb*) - 壓入多個暫存器

語法

PUSH reg {, reglist }

其中:

 reg

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

說明

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

備註

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

定址模式

無運算元。

影響的標誌

N

Z

C

V

Q

S

I

F

T

 

 

 

 

 

 

 

 

 

編碼

15

14

13

12

11

10

9

8

7

 

0

1

0

1

1

0

1

0

R

reglist

示例

1                                       ;@.text
2                                       ;@.globl funpush
3                                       ;@.align 0
4                                       ;
5                                   AREA example,CODE,READONLY
6                                   CODE16
7
8                                   label1
9                                       ; Push a block of registers onto the
10                                      ; stack.Registers are pushed onto
11                                      ; the stack in reverse numerical,
12                                      ; not listed, order to comply with POP.
13                                      ; Highest numbered register to
14                                      ; lowest.So pushing order is LR,R7,
15                                      ; R6,R5,R4,R2, then R1.
16                                      ; SP is decremented as normal
17                                      ; by 28 bytes.
18    00000000    B5F6    PUSH    {R2,R4-R7,LR,R1}
19
20
21
22                                      ; Push a block of registers
23                                      ; R1,R2,R3,R4 onto stack.
24                                      ; Push order is R4,R3,R2, then R1.
25                                      ; SP is decremented as normal
26                                      ; by 16 bytes.
27    00000002    B41E    PUSH    {R1-R4}

更多資訊

請參閱 POP 指令