当前位置:网站首页>ARM指令集之Load/Store指令寻址方式(二)
ARM指令集之Load/Store指令寻址方式(二)
2022-06-12 11:37:00 【fanxiaoyu321】
这篇笔记记录了第二类Load/Store指令的寻址方式,这类指令是指1)操作数为半字(包括有符号和无符号)的Load/Store指令;2)有符号字节数据的Load/Store指令;3)双字的Load/Store指令。
上述指令的语法格式如下:
LDR|STR{<cond>}H|SH|SB|D <Rd>, <address_mode>
这些指令有如下寻址方式:
| 语法 | 说明 | |
|---|---|---|
| 1 | [<Rn>, #+/-<offset_8>] | 立即数偏移量寻址 |
| 2 | [<Rn>, +/-<Rm>] | 寄存器偏移量寻址 |
| 3 | [<Rn>, #+/-<offset_8>]! | 立即数事先更新寻址 |
| 4 | [<Rn>, #+/-<Rm>]! | 寄存器事先更新寻址 |
| 5 | [<Rn>], #+/-<offset_8> | 立即数事后更新寻址 |
| 6 | [<Rn>], +/- | 寄存器事后更新寻址 |
立即数偏移量寻址
[<Rn>, #+/-<offset_8>]
# 8位立即数是按照高4位和低4位分开编码的
offset_8 = (immedH << 4) | immedL
if U == 1 then
address = Rn + offset_8
else
address = Rn - offset_8
寄存器偏移量寻址
[<Rn>, +/-<Rm>]
if U == 1 then
address = Rn + Rm
else
address = Rn - Rm
立即数事先更新寻址
[<Rn>, #+/-<offset_8>]!
offset_8 = (immedH << 4) | immedL
if U == 1 then
address = Rn + offset_8
else
address = Rn - offset_8
if CondPassed then
Rn = address
寄存器事先更新寻址
[<Rn>, #+/-<Rm>]!
if U == 1 then
address = Rn + Rm
else
address = Rn - Rm
if CondPassed then
Rn = address
立即数事后更新寻址
[<Rn>], #+/-<offset_8>
address = Rn
offset_8 = (immedH << 4) | immedL
if CondPassed then
if U == 1 then
Rn = Rn + offset_8
else
Rn = Rn - offset_8
寄存器事后更新寻址
[<Rn>], +/-<Rm>
address = Rn
if CondPassed then
if U == 1 then
Rn = Rn + Rm
else
Rn = Rn - Rm
边栏推荐
- AcWing 1921. 重新排列奶牛(环图)
- 无限生长,我们都将奔赴未来 | InfoQ中国成立15周年
- Lambda expression | shallow solution
- 21 reasons why you need social media QR code
- Golang Foundation (7)
- The difference between meta universe chain games and traditional games
- Byte order (network / host) conversion
- Manuscript manuscript format preparation
- Lambda and filter, List 和 numpy array的索引,以及各种距离指标distance-metrics,拼接数组以及axis=0 and axis=1的区分
- Unlimited growth, we will all go to the future | the 15th anniversary of the founding of InfoQ China
猜你喜欢

VirtualBox 虚拟机因系统异常关机虚拟机启动项不见了

Clickhouse column basic data type description

Logrotate log rotation method create and copyruncate principles

Byte order - how to judge the big end and the small end

logrotate日志轮转方式create和copytruncate原理

A simple understanding of b+ tree

MySQL45讲 01 | 基础架构:一条SQL查询语句是如何执行的?
![[Blue Bridge Cup SCM 11th National race]](/img/da/3c8a9efd5b28f67816f239531a0339.png)
[Blue Bridge Cup SCM 11th National race]

Unity connect to Microsoft SQLSERVER database

VirtualBox virtual machine shut down due to abnormal system. The virtual machine startup item is missing
随机推荐
Sendmail dovecot mail server
Relation entre les classes et à l'intérieur des classes de classification vidéo - - Régularisation
^34 scope interview questions
C# 36. DataGridView line number
Using stairs function in MATLAB
postman传入list
Pessimistic lock and optimistic lock of MySQL
conda环境下pip install 无法安装到指定conda环境中(conda环境的默认pip安装位置)
FormatConversionTool.exe
6.6 Convolution de séparation
Naming specification / annotation specification / logical specification
Design of virtual scrolling list
C# 36. DataGridView行号
CLJ3-100ALH30剩余电流继电器
Signal relay rxsf1-rk271018dc110v
Unit test case framework --unittest
AcWing 1921. Rearranging cows (ring diagram)
程序分析与优化 - 6 循环优化
One must keep writing, so as not to be submerged by the vast crowd.
[the 11th national competition of Blue Bridge Cup single chip microcomputer]