ARM Program Status Register 和 相关指令之笔记
来源:互联网 发布:公安网络布控 编辑:程序博客网 时间:2024/06/05 08:57
【原本发表在网易博客,可博客中的图片经常过段时间后就挂掉了,逼我换地方的节奏】
The ARM instruction set provides two instructions to directly control a program status register (psr). The MRS instruction transfers the contents of either the cpsr or spsr into a register; in the reverse direction, the MSR instruction transfers the contents of a register into the cpsr or spsr. Together these instructions are used to read and write the cpsr and spsr.
In the syntax you can see a label called fields. This can be any combination of control (c), extension (x), status (s), and flags (f). These fields relate to particular byte regions in a psr, as shown in Figure 3.9.
Syntax: MRS{<cond>} Rd,<cpsr|spsr>
MSR{<cond>} <cpsr|spsr>_<fields>,Rm
MSR{<cond>} <cpsr|spsr>_<fields>,#immediate
If you use the S suffix on a data processing instruction, then it updates the flags in the cpsr. Move and logical operations update the carry flag C, negative flag N, and zero flag Z. The carry flag is set from the result of the barrel shift as the last bit shifted out. The N flag is set to bit 31 of the result. The Z flag is set if the result is zero.
关于下面示例中的话
终于找到了答案: http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0344i/Beigeaha.html
2.15.2. Leaving an exception
When an exception has completed, the exception handler must move the LR, minus an offset to the PC. The offset varies according to the type of exception, as Table 2.12 shows.
Typically the return instruction is an arithmetic or logical operation with the S bit set to 1 and rd = r15, so the core copies the SPSR back to the CPSR.
- ARM Program Status Register 和 相关指令之笔记
- ARM APSR(Application Program Status Register)
- ARM CPSR (Current Program Status Register)
- ARM CPSR/SPSR (Program status registers)
- ARM SPSR (Saved Program Status Registers)
- Register program
- ARM/Thumb指令相关。
- ARM汇编指令和伪指令(朱友鹏课堂笔记)
- ARM指令集笔记
- ARM 指令笔记
- arm汇编指令笔记
- Arm Register
- Register指令
- @Register指令
- ARM 伪指令和 ARM 宏指令
- 2440之ARM指令
- arm指令之mov
- ARM指令之--MVN
- 我对互联网的认识
- nginx配置rtmp流媒体服务器
- vs.php中使用apache或IIS7进行外部调试
- Longest Consecutive Sequence 递归实现
- 关于spring下载源码的一点吐槽
- ARM Program Status Register 和 相关指令之笔记
- OC 自带方法 简绍 2 NSMutableString
- Objective - C基础: 第二天 - 6.关键字self的基本认识
- 总结:One weird trick for parallelizing convolutional neural networks
- 求数据类型所占字节和取值范围
- Android 应用的兼容性
- 【NumPy基础】100道numpy练习——Apprentice篇
- java--String 类用法
- 真正完美解决vs2008 添加启动画面(基于对话框)