新闻中心

ARM寄存器详解

作者: 时间:2016-11-20 来源:网络 收藏
一共有37个寄存器

1. 31个通用寄存器

本文引用地址://m.amcfsurvey.com/article/201611/318751.htm

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寄存

评论


技术专区

关闭