dje at watson.ibm.com
Sat Aug 18 03:24:29 EST 2001
>>>>> Raghava Raju writes:
Raghava> I was unable to find the registers for
Raghava> program counter,stack pointer. Which registers
Raghava> I should use to access these values in powerpc.
The PowerPC ABI's specify that the stack pointer is in r1. The
PowerPC architecture does not have a program counter in user-accessible
register. One can obtain the PC of the last call (branch and link) from
the link register. One can branch and link to the next instruction to
obtain the current PC, but make sure that the old value in the LR is saved
and restored as required by the ABI.
** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-dev