ARM A32多数据处理汇编指令理解分享

在ARM A32多数据处理汇编指令分为多数据存储指令和多数据加载指令:
1,多数据存储指令:push, STMFD(STMDB), STMED(STMDA) , STMFA(STMIB), STMEA(STMIA);
2,多数据加载指令:pop,LDMF(LDMIA), LDMFA(LDMDA), LDMEA(LDMDB), LDMED(LDMIB);

1 多数据存储指令

多数据存储指令:push, STMFD(STMDB), STMED(STMDA) , STMFA(STMIB), STMEA(STMIA);

1.1 push指令

Push multiple registers to Stack stores multiple general-purpose registers to the stack, storing to consecutive memory locations ending just below the address in SP, and updates SP to point to the start of the stored data.
将多个寄存器压入栈(Push multiple registers to stack)会将多个通用寄存器保存到栈中,保存到连续的内存位置,结束地址位于栈指针(SP)所指向地址的下方,并且更新栈指针(SP)到已存储数据的起始位置。
This instruction is an alias of the STMDB, STMFD instruction.
该指令是 STMDBSTMFD 指令的别名。
指令执行的结果示意图如下所示:
在这里插入图片描述

1.2 STMFD/STMDB指令

Store Multiple Decrement Before (Full Descending) stores multiple registers to consecutive memory locations using an address from a base register. The consecutive memory locations end just below this address, and the address of the first of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.
该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

1.3 STMED/STMDA指令

Store Multiple Decrement After (Empty Descending) stores multiple registers to consecutive memory locations using an address from a base register. The consecutive memory locations end at this address, and the address just below the lowest of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.
该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

1.4 STMFA/STMIB指令

Store Multiple Increment Before (Full Ascending) stores multiple registers to consecutive memory locations using an address from a base register. The consecutive memory locations start just above this address, and the address of the last of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.

该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
**加粗样式**

1.5 STMEA/STMIA指令

Store Multiple (Increment After, Empty Ascending) stores multiple registers to consecutive memory locations using an address from a base register. The consecutive memory locations start at this address, and the address just above the last of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.

该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

2 多数据加载指令

多数据加载指令:pop,LDMF(LDMIA), LDMFA(LDMDA), LDMEA(LDMDB), LDMED(LDMIB);

2.1 pop指令

Pop Multiple Registers from Stack loads multiple general-purpose registers from the stack, loading from consecutive memory locations starting at the address in SP, and updates SP to point just above the loaded data.
This instruction is an alias of the LDM, LDMIA, LDMFD instruction.

该数据存储指令的格式:
在这里插入图片描述
该数据存储指令执行简易示意图:
在这里插入图片描述

2.2 LDMFD/LDMIA指令

Load Multiple (Increment After, Full Descending) loads multiple registers from consecutive memory locations using an address from a base register. The consecutive memory locations start at this address, and the address just above the highest of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.

该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

2.3 LDMFA/LDMDA指令

Load Multiple Decrement After (Full Ascending) loads multiple registers from consecutive memory locations using an address from a base register. The consecutive memory locations end at this address, and the address just below the lowest of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.

该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

2.4 LDMEA/LDMDB指令

Load Multiple Decrement Before (Empty Ascending) loads multiple registers from consecutive memory locations using an address from a base register. The consecutive memory locations end just below this address, and the address of the lowest of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.

该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

2.5 LDMED/LDMIB指令

Load Multiple Increment Before (Empty Descending) loads multiple registers from consecutive memory locations using an address from a base register. The consecutive memory locations start just above this address, and the address of the last of those locations can optionally be written back to the base register.
The lowest-numbered register is loaded from the lowest memory address, through to the highest-numbered register from the highest memory address.

该数据存储指令的格式:
在这里插入图片描述

该数据存储指令执行简易示意图:
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值