当前位置: 首页 > news >正文

ARM A64 STR指令

ARM A64 STR指令

  • 1 STR (immediate)
    • 1.1 Post-index
      • 1.1.1 32-bit variant
      • 1.1.2 64-bit variant
    • 1.2 Pre-index
      • 1.2.1 32-bit variant
      • 1.2.2 64-bit variant
    • 1.3 Unsigned offset
      • 1.3.1 32-bit variant
      • 1.3.2 64-bit variant
    • 1.4 Assembler symbols
  • 2 STR (register)
    • 2.1 32-bit variant
    • 2.2 64-bit variant
    • 2.3 Assembler symbols
  • 3 STRB (immediate)
    • 3.1 Post-index
    • 3.2 Pre-index
    • 3.3 Unsigned offset
  • 4 STRB (register)
    • 4.1 Extended register variant
    • 4.2 Shifted register variant
  • 5 STRH (immediate)
    • 5.1 Post-index
    • 5.2 Pre-index
    • 5.3 Unsigned offset
  • 6 STRH (register)
    • 6.1 Encoding
    • 6.2 Assembler symbols

Arm Architecture Reference Manual Armv8, for Armv8-A architecture profile

1 STR (immediate)

Store Register (immediate) stores a word or a doubleword from a register to memory. The address that is used for the store is calculated from a base register and an immediate offset.

1.1 Post-index

在这里插入图片描述

1.1.1 32-bit variant

Applies when size == 10.
在这里插入图片描述

STR <Wt>, [<Xn|SP>], #<simm>

1.1.2 64-bit variant

Applies when size == 11.
在这里插入图片描述

STR <Xt>, [<Xn|SP>], #<simm>

1.2 Pre-index

在这里插入图片描述

1.2.1 32-bit variant

Applies when size == 10.
在这里插入图片描述

STR <Wt>, [<Xn|SP>], #<simm>

1.2.2 64-bit variant

Applies when size == 11.
在这里插入图片描述

STR <Xt>, [<Xn|SP>], #<simm>

1.3 Unsigned offset

在这里插入图片描述

1.3.1 32-bit variant

Applies when size == 10.
在这里插入图片描述

STR <Wt>, [<Xn|SP>{, #<pimm>}]

1.3.2 64-bit variant

Applies when size == 11.
在这里插入图片描述

STR <Xt>, [<Xn|SP>{, #<pimm>}]

1.4 Assembler symbols

<Wt>
Is the 32-bit name of the general-purpose register to be transferred, encoded in the “Rt” field.
<Xt>
Is the 64-bit name of the general-purpose register to be transferred, encoded in the “Rt” field.
<Xn|SP>
Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the “Rn” field.
<simm>
Is the signed immediate byte offset, in the range -256 to 255, encoded in the “imm9” field.
<pimm>
For the 32-bit variant: is the optional positive immediate byte offset, a multiple of 4 in the range 0 to 16380, defaulting to 0 and encoded in the “imm12” field as <pimm>/4.
For the 64-bit variant: is the optional positive immediate byte offset, a multiple of 8 in the range 0 to 32760, defaulting to 0 and encoded in the “imm12” field as <pimm>/8.

2 STR (register)

Store Register (register) calculates an address from a base register value and an offset register value, and stores a 32-bit word or a 64-bit doubleword to the calculated address, from a register.
The instruction uses an offset addressing mode, that calculates the address used for the memory access from a base register value and an offset register value. The offset can be optionally shifted and extended.
在这里插入图片描述

2.1 32-bit variant

Applies when size == 10.

STR <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]

2.2 64-bit variant

Applies when size == 11.

STR <Xt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]

2.3 Assembler symbols

<Wt> Is the 32-bit name of the general-purpose register to be transferred, encoded in the “Rt” field.
<Xt> Is the 64-bit name of the general-purpose register to be transferred, encoded in the “Rt” field.
<Xn|SP> Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the “Rn” field.
<Wm> When option<0> is set to 0, is the 32-bit name of the general-purpose index register, encoded in the “Rm” field.
<Xm> When option<0> is set to 1, is the 64-bit name of the general-purpose index register, encoded in the “Rm” field.
<extend> Is the index extend/shift specifier, defaulting to LSL, and which must be omitted for the LSL option when <amount> is omitted. encoded in the “option” field. It can have the following values:
UXTW when option = 010
LSL when option = 011
SXTW when option = 110
SXTX when option = 111
<amount> For the 32-bit variant: is the index shift amount, optional only when <extend> is not LSL. Where it is permitted to be optional, it defaults to #0. It is encoded in the “S” field. It can have the following values:
#0 when S = 0
#2 when S = 1
For the 64-bit variant: is the index shift amount, optional only when <extend> is not LSL. Where it is permitted to be optional, it defaults to #0. It is encoded in the “S” field. It can have the following
values:
#0 when S = 0
#3 when S = 1

3 STRB (immediate)

Store Register Byte (immediate) stores the least significant byte of a 32-bit register to memory. The address that is used for the store is calculated from a base register and an immediate offset.

3.1 Post-index

在这里插入图片描述

STRB <Wt>, [<Xn|SP>], #<simm>

3.2 Pre-index

在这里插入图片描述

STRB <Wt>, [<Xn|SP>, #<simm>]!

3.3 Unsigned offset

在这里插入图片描述

STRB <Wt>, [<Xn|SP>{, #<pimm>}]

4 STRB (register)

Store Register Byte (register) calculates an address from a base register value and an offset register value, and stores a byte from a 32-bit register to the calculated address.
The instruction uses an offset addressing mode, that calculates the address used for the memory access from a base register value and an offset register value. The offset can be optionally shifted and extended.
在这里插入图片描述

4.1 Extended register variant

Applies when option != 011.

STRB <Wt>, [<Xn|SP>, (<Wm>|<Xm>), <extend> {<amount>}]

4.2 Shifted register variant

Applies when option == 011.

STRB <Wt>, [<Xn|SP>, <Xm>{, LSL <amount>}]

5 STRH (immediate)

Store Register Halfword (immediate) stores the least significant halfword of a 32-bit register to memory. The address that is used for the store is calculated from a base register and an immediate offset.

5.1 Post-index

在这里插入图片描述

STRH <Wt>, [<Xn|SP>], #<simm>

5.2 Pre-index

在这里插入图片描述

STRH <Wt>, [<Xn|SP>, #<simm>]!

5.3 Unsigned offset

在这里插入图片描述

STRH <Wt>, [<Xn|SP>{, #<pimm>}]

6 STRH (register)

Store Register Halfword (register) calculates an address from a base register value and an offset register value, and stores a halfword from a 32-bit register to the calculated address.
The instruction uses an offset addressing mode, that calculates the address used for the memory access from a base register value and an offset register value. The offset can be optionally shifted and extended.
在这里插入图片描述

6.1 Encoding

STRH <Wt>, [<Xn|SP>, (<Wm>|<Xm>){, <extend> {<amount>}}]

6.2 Assembler symbols

<Wt> Is the 32-bit name of the general-purpose register to be transferred, encoded in the “Rt” field.
<Xn|SP> Is the 64-bit name of the general-purpose base register or stack pointer, encoded in the “Rn” field.
<Wm> When option<0> is set to 0, is the 32-bit name of the general-purpose index register, encoded in the “Rm” field.
<Xm> When option<0> is set to 1, is the 64-bit name of the general-purpose index register, encoded in the “Rm” field.
<extend> Is the index extend/shift specifier, defaulting to LSL, and which must be omitted for the LSL option when <amount> is omitted. encoded in the “option” field. It can have the following values:
UXTW when option = 010
LSL when option = 011
SXTW when option = 110
SXTX when option = 111
<amount> Is the index shift amount, optional only when <extend> is not LSL. Where it is permitted to be optional, it defaults to #0. It is encoded in the “S” field. It can have the following values:
#0 when S = 0
#1 when S = 1

相关文章:

  • Java大厂面试:从Web框架到微服务技术的场景化提问与解析
  • Java基础知识总结(超详细整理)
  • 发布时将多个bpl 打包成一个bpl的方法,或者说:不需要vcl60.bpl情况下 18.5K的exe 照常可以运行。
  • c++学习之--- list
  • Nordic 的RTC(Real-time counter)的介绍
  • 虚幻引擎5-Unreal Engine笔记之Default Pawn与GamMode、Camera的关系
  • IDE/IoT/搭建物联网(LiteOS)集成开发环境,基于 VSCode + IoT Link 插件
  • SQL脚本规范
  • 【OpenCV基础 1】几何变换、形态学处理、阈值分割、区域提取和脱敏处理
  • 2025.5.12-2025.5.18:开始练习英语口语
  • httpx[http2] 和 httpx 的核心区别及使用场景如下
  • 01 Nginx安装及基本配置
  • PostGIS实现矢量数据转栅格数据【ST_AsRaster】
  • pnpm项目内网迁移
  • minicom串口调试助手
  • Linux云计算训练营笔记day10(MySQL数据库)
  • MapReduce-WordCount实现按照value降序排序、字符小写、识别不同标点
  • 计算机科技笔记: 容错计算机设计05 n模冗余系统 TMR 三模冗余系统
  • C++多态与虚函数详解——从入门到精通
  • 编译原理--期末复习
  • 盲人不能刷脸认证、营业厅拒人工核验,央媒:别让刷脸困住尊严
  • 从《缶翁的世界》看吴昌硕等湖州籍书画家对海派的影响
  • 俄乌刚谈完美国便筹划与俄乌领导人通话,目的几何?
  • 国家统计局:2024年城镇单位就业人员工资平稳增长
  • “家国万里时光故事会” 举行,多家庭共话家风与家国情怀
  • 体坛联播|巴萨提前2轮西甲夺冠,郑钦文不敌高芙止步4强