What's the equivalent of BP register ( Frame P

2019-03-29 11:56发布

问题:

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??].

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

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

回答1:

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.

Read here