linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: David Edelsohn <dje@watson.ibm.com>
To: Raghava Raju <vraghava_raju@yahoo.com>
Cc: linuxppc-dev@lists.linuxppc.org
Subject: Re: program counter..
Date: Fri, 17 Aug 2001 13:24:29 -0400	[thread overview]
Message-ID: <200108171724.NAA23832@makai.watson.ibm.com> (raw)
In-Reply-To: Message from Raghava Raju <vraghava_raju@yahoo.com> of "Fri, 17 Aug 2001 10:13:44 PDT." <20010817171344.83793.qmail@web20004.mail.yahoo.com>


>>>>> 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.

David


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

  reply	other threads:[~2001-08-17 17:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-17 17:13 program counter Raghava Raju
2001-08-17 17:24 ` David Edelsohn [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-08-17 17:14 Raghava Raju
2001-08-20 17:46 ` Scott Anderson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200108171724.NAA23832@makai.watson.ibm.com \
    --to=dje@watson.ibm.com \
    --cc=linuxppc-dev@lists.linuxppc.org \
    --cc=vraghava_raju@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).