ARM 学习笔记之14: Registers in AArch32 state

Arm processors provide general-purpose and special-purpose registers. Some additional registers are
available in privileged execution modes.
In all Arm processors in AArch32 state, the following registers are available and accessible in any processor mode:
        • 15 general-purpose registers R0-R12, the Stack Pointer (SP), and Link Register (LR).
        • 1 Program Counter (PC).
        • 1 Application Program Status Register (APSR).
------------------------------ Note ------------------------------
• SP and LR can be used as general-purpose registers, although Arm deprecates using SP other than as
a stack pointer.

--------------------------------------------------------------------
Additional registers are available in privileged software execution. Arm processors have a total of 43
registers. The registers are arranged in partially overlapping banks. There is a different register bank for
each processor mode. The banked registers give rapid context switching for dealing with processor
exceptions and privileged operations.
The additional registers in Arm processors are:
        • 2 supervisor mode registers for banked SP and LR.
        • 2 abort mode registers for banked SP and LR.
        • 2 undefined mode registers for banked SP and LR.
        • 2 interrupt mode registers for banked SP and LR.
        • 7 FIQ mode registers for banked R8-R12, SP and LR.
        • 2 monitor mode registers for banked SP and LR.
        • 1 Hyp mode register for banked SP.
        • 7 Saved Program Status Register (SPSRs), one for each exception mode.
        • 1 Hyp mode register for ELR_Hyp to store the preferred return address from Hyp mode.
--------------------------- Note -----------------------------
In privileged software execution, CPSR is an alias for APSR and gives access to additional bits.

 -----------------------------------------------------------------.
The following figure shows how the registers are banked in the Arm architecture.

                                           Figure 3-1 Organization of general-purpose registers and Program Status Registers
In Armv6‑M, Armv7‑M, Armv8‑M Baseline, and Armv8‑M Mainline based processors, SP is an alias
for the two banked stack pointer registers:
        • Main stack pointer register, that is only available in privileged software execution.
        • Process stack pointer register.
 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值