Subject: Re: program counter...

From: Scott Anderson <[email-masked]>
Date: Mon, 20 Aug 2001 10:46:36 -0700

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
    [email-masked]   MontaVista Software Inc.
    (408)328-9214               1237 East Arques Ave.
    http://www.mvista.com       Sunnyvale, CA  94085

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/