ARM寄存器详解

嵌入式系统 时间:2016-11-20 来源:网络
一共有37个 寄存器

1. 31个通用寄存器

2. 6个状态寄存器

R13作为堆栈指针

R14链接寄存器

1.保存函数返回地址

2. 异常返回地址

R15程序计数器(PC指针)

程序状态寄存器

只有在异常时才有程序状态寄存器

为什么有两个CPSR

SPSR当异常发生时保存CPSR的地址

当异常结束时SPSR将之前保存的地址给CPSR

程序状态寄存器的数据格式

NIs set to bit 31 of the result of the instruction. If this result is regarded as a twos complement
signed integer, then N = 1 if the result is negative and N = 0 if it is positive or zero.

ZIs set to 1 if the result of the instruction is zero (this often indicates anequalresult from a
comparison), and to 0 otherwise.

I bit Disables IRQinterrupts when it is set.

F bitDisables FIQ interrupts when it is set.

M 标识处理器的工作模式

获取和设置工作模式

关键词:ARM寄存

加入微信
获取电子行业最新资讯
搜索微信公众号:EEPW

或用微信扫描左侧二维码

相关文章


用户评论

请文明上网,做现代文明人
验证码:
查看电脑版