英特爾 XScale(R) 技術主題STMIA (Thumb*) - 多重儲存之後遞增

語法

STMIA basereg!, reg {, reglist }

其中:

 basereg

包含起始地址的基址暫存器

 !

啟用基址暫存器寫回;
必須設定。

 reg

要載入的有效暫存器

說明

STMIA 指令進行塊儲存,並啟用堆疊操作。它儲存 reg 指定的部分甚至全部通用暫存器。reg 指定的暫存器按照升序從自低到高的記憶體地址進行載入。必須在暫存器列表中指定至少一個暫存器,否則結果將會“無法預知”。

備註

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

定址模式

無運算元。

影響的標誌

N

Z

C

V

Q

S

I

F

T

 

 

 

 

 

 

 

 

 

編碼

15

14

13

12

11

10

 

8

7

 

0

1

1

0

0

0

basereg

reglist

示例

1                                      ;@.text
2                                      ;@.globl funstm
3                                      ;@.align 0
4                                      ;
5                                  AREA example,CODE,READONLY
6                                  CODE16
7
8                                  label1
9                                      ; Store a block of registers R1,R2,
10                                     ; R4,R5,R6,R7 to memory starting
11                                     ; at address held in R3.
12                                     ; R3 is incremented by 4*6 bytes.
13                                     ; Note: Registers are stored in their
14                                     ; numeric order, not as specified.
15                                     ; That is, R1 is stored first to
16                                     ; lowest memory address, i.e. [R3]
17    00000000    C3F6    STMIA    R3!, {R2,R4-R7,R1}
18
19
20
21 ; Store a block of registers
22 ; R5,R6,R7 to memory starting
23 ; at address held in R5.
24 ; Since R5 is both base address
25 ; register and in register list,
26 ; it must be the lowest register.
2700000002C5E0STMIA R5!, {R5-R7}

更多資訊

請參閱 LDMIA 指令