Program Counterin AArch32 state
You can use the Program Counter explicitly, for example in some A32 data processing instructions, and implicitly, for example in branch instructions.
The Program Counter (PC) is accessedas PC (or R15). It is incremented by the size of the instructionexecuted, which is always four bytes in A32 state. Branch instructionsload the destination address into the PC. You can also load thePC directly using data operation instructions. For example, to branchto the address in a general purpose register, use:
During execution, the PC does not contain the address of thecurrently executing instruction. The address of the currently executinginstruction is typically PC–8 for A32, or PC–4 for T32.
NoteARM® recommends you use the
BXinstruction to jump to an address or to return from a function, rather than writing to the PC directly.