huchuan2025/20-Area/22-Work/222-ReadNote/armv8体系结构/ARMv8指令汇总 (重要).md

20 lines
858 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

- 读写指令
- ldr
- 普通用法
- 伪指令用法 多一个等号
- 多一个等号相当于直接取值而不需要再解一次引用跟mov指令差不多了比如 ldr x1, =0x1000 这就是把0x1000直接拷贝到x1里 ldr x1 [x2] x2的值是0x1000这就是读取0x1000位置的数据
- pc相对寻址 注意1MB限制汇编的时候会检查
- ldr x1 label 注意label是相对于当前pc位置的偏移
- 变换
- 基地址加偏移   ldr  r5, [sp, #24] // 取栈上的值
- 前变基 ldr tmp1w, [src, \#-4]! // memmove函数
- 后变基   ldr  w0, [x1], #4 // memcpy
- 待整理
- stp/ldp
- b/bl/br/blr
- b不带返回的跳到符号
- bl将当前pc+4设置到lr寄存器带返回功能
- br调到
- isb/dmb/dsb
- dsb sy 用的比较多
- 主要是参数