9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: "Michael Teichgräber" <mt@wmipf.in-berlin.de>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] getcallerpc on arm7
Date: Tue,  1 Apr 2008 00:34:06 +0200	[thread overview]
Message-ID: <47F166DE.6090502@wmipf.in-berlin.de> (raw)
In-Reply-To: <8efca694b803e9d55c75926d809a5bce@terzarima.net>

> it should be the same as the other risc machines, and seems all right
> when i test it with 5c/5l.  gcc typically also uses a frame pointer,
> which might make it nearly as easy for that compiler.

This seems to work well:

	.text
	.globl getcallerpc
	getcallerpc:
		ldr	r0, [fp, #-4]
		bx	lr

I was a bit confused about whether or not the firstarg pointer
is expected to be used by a getcallerpc implementation (so that
it would also work in subfunctions of the current, provided
&firstarg is passed down). The BUGS section of getcallerpc(2/3)
gives a hint how this could be answered.


      reply	other threads:[~2008-03-31 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-27 10:25 Michael Teichgräber
2008-03-31 16:24 ` Russ Cox
2008-03-31 17:23   ` Michael Teichgräber
2008-03-31 19:09   ` Charles Forsyth
2008-03-31 22:34     ` Michael Teichgräber [this message]

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=47F166DE.6090502@wmipf.in-berlin.de \
    --to=mt@wmipf.in-berlin.de \
    --cc=9fans@9fans.net \
    /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).