From: "Russ Cox" <rsc@swtch.com>
To: 9fans@cse.psu.edu
Subject: Re: [9fans] Fresh (relatively speaking) Graphviz
Date: Wed, 5 Mar 2008 13:00:54 -0500 [thread overview]
Message-ID: <20080305180137.F41AA1E8C57@holo.morphisms.net> (raw)
In-Reply-To: <c883280d7be68e6142493cb020f4773d@proxima.alt.za>
cpu% cat getcallerpc.s
TEXT getcallerpc(SB), $0
MOVL v+0(FP), AX
MOVL -4(AX), AX
RET
> .globl getcallerpc
> getcallerpc:
> movl 0(%esp),%edx
> movl -4(%edx),%eax
> ret
not quite. 0(%esp) is going to be the saved %eip.
getcallerpc:
movl 4(%esp), %eax
movl -4(%eax), %eax
or
uint
getcallerpc(void *a)
{
return ((uint*)a)[-1];
}
russ
next prev parent reply other threads:[~2008-03-05 18:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-05 12:26 lucio
2008-03-05 18:00 ` Russ Cox [this message]
2008-03-05 18:51 ` P9GCC: APE library (Was: [9fans] Fresh (relatively speaking) Graphviz) lucio
2008-03-05 18:55 ` [9fans] Fresh (relatively speaking) Graphviz lucio
2008-03-05 20:58 ` Russ Cox
2008-03-05 21:07 ` lucio
2008-03-05 21:14 ` Charles Forsyth
2008-03-05 21:23 ` lucio
2008-03-06 4:47 ` lucio
2008-03-06 4:55 ` P9GCC progress (Was: [9fans] Fresh (relatively speaking) Graphviz) lucio
2008-03-06 17:07 ` [9fans] Fresh (relatively speaking) Graphviz Russ Cox
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=20080305180137.F41AA1E8C57@holo.morphisms.net \
--to=rsc@swtch.com \
--cc=9fans@cse.psu.edu \
/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).