首页 | 新闻 | 新品 | 文库 | 方案 | 视频 | 下载 | 商城 | 开发板 | 数据中心 | 座谈新版 | 培训 | 工具 | 博客 | 论坛 | 百科 | GEC | 活动 | 主题月 | 电子展
返回列表 回复 发帖

ARM 寄存器别名

ARM 寄存器别名

ARM 寄存器别名


The following register names are predeclared:
• r0-r15 and R0-R15
• a1-a4 (argument, result, or scratch registers, synonyms for r0 to
r3)
• v1-v8 (variable registers, r4 to r11)
• sb and SB (static base, r9)
• sl and SL (stack limit, r10)
• fp and FP (frame pointer, r11)
• ip and IP (intra-procedure-call scratch register, r12)
• sp and SP (stack pointer, r13)
• lr and LR (link register, r14)
• pc and PC (program counter, r15).
3.3.2 Predeclared program status register
names
The following program status register names are predeclared:
• cpsr and CPSR (current program status register)
• spsr and SPSR (saved program status register).
3.3.3 Predeclared floating-point register
names
The following floating-point register names are predeclared:
• f0-f7 and F0-F7 (FPA registers)
• s0-s31 and S0-S31 (VFP single-precision registers)
• d0-d15 and D0-D15 (VFP double-precision registers).
3.3.4 Predeclared coprocessor names
The following coprocessor names and coprocessor register names are
predeclared:
• p0-p15 (coprocessors 0-15)
• c0-c15 (coprocessor registers 0-15).
a1-a4代表R0-R3,在使用汇编语言写函数时,这四个寄存器在结束时不需要恢复成原值,因此在进入函数时不需要保存
v1-v4代表R4-R7,在使用汇编语言写函数时,这四个寄存器在函数返回时需要恢复成原值,因此需要在使用时首先保存,并在返回前恢复成原值
r12-r15可以分别使用ip,sp,lr和pc访问,这些内容是在ATPCS规则中规定的,可以在c:program
filesarmads1_2pdfspecs目录下找到ATPCS规范.
返回列表