program counter...

2 messages, 2 authors, 2001-08-20 · open the first message on its own page

program counter...

From: Raghava Raju <hidden>
Date: 2001-08-17 17:14:37

Hi

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

  Thank You
  Raj.


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

Re: program counter...

From: Scott Anderson <hidden>
Date: 2001-08-20 17:46:36

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@mvista.com   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/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help