ARM 处理器上 BP 寄存器(帧指针)的等价物是什么? [英] What's the equivalent of BP register ( Frame Pointer ) on ARM processors?

查看:45
本文介绍了ARM 处理器上 BP 寄存器(帧指针)的等价物是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在intel平台上,BP用于指向栈帧的开头并访问参数[bp+0x??]和局部变量[bp-0x??].

On intel platforms, BP is used to point to the beginning of the stack frame and to access the arguments [bp+0x??] and local variables [bp-0x??].

ARM 使用哪个寄存器?或者,是否仅基于SP寻址?

Which register is used in ARM? Or, is the addressing based on SP only?

[我没有自己编译和反汇编的基础设施来查看它.参考 AAPCS 也没有帮助我]

[I don't have infrastructure to compile and disassemble to see it by myself. Referring to AAPCS did not help me either]

推荐答案

您正在寻找的是帧指针.通常,R7在THUMB模式下作为帧指针,R11在ARM模式下作为帧指针.但是,如果愿意,操作系统可以自行决定更改此约定.

What you are looking for is the Frame Pointer. Generally, R7 acts as the frame pointer in THUMB mode and R11 acts as the frame pointer in ARM mode. But it is under the discretion of the OS to change this convention if it wishes to.

阅读此处

这篇关于ARM 处理器上 BP 寄存器(帧指针)的等价物是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆