ARM CPU 寄存器组织

来源:互联网 发布:淘宝上文玩核桃哪家好 编辑:程序博客网 时间:2024/05/16 18:50


ARM CPU 为用户模式提供了 16 个通用寄存器和一个状态寄存器 (CPSR), 不同模式间还提供有备份状态寄存器(SPSR). 对于软硬件的一些约定, 下面三个寄存器有着不同的含义, 使用时要注意:

  • R13 is used as stack pointer (SP) that holds the current stack address(堆栈指针)
  • R14 is used as link register (LR) that saves return address for the BL and BLX instruction(链接寄存器)
  • R15 is used as program counter (PC) that points to the executed instruction(程序计数器)

当不同的 CPU 操作模式之间进行切换时, ARM 提供了影子寄存器. 这些影子寄存器可以缩短中断延迟时间(Interrupt Latency), 以提高性能. 这些寄存器的分布如下图所示:





原创粉丝点击