program counter...

Scott Anderson scott_anderson at
Tue Aug 21 03:46:36 EST 2001

Raghava Raju wrote:
>      I was unable to find the registers for
>   program counter,stack pointer. Which registers
>   I should use to access these values in powerpc.

Er, there isn't really an program counter register that you can read.
The only way I know to find it out the value of the internal "Next
Instruction Address" is to do a bl and then look at the LR (link
register) before doing a blr.

As far as the stack pointer goes, the PowerPC ABI (Application Binary
Interface) states that gpr1 should be used as the stack pointer and
therefor, it is...

    Scott Anderson
    scott_anderson at   MontaVista Software Inc.
    (408)328-9214               1237 East Arques Ave.       Sunnyvale, CA  94085

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list