[prev in list] [next in list] [prev in thread] [next in thread]
List: 9fans
Subject: Re: [9fans] getcallerpc on arm7
From: Michael Teichgräber <mt () wmipf ! in-berlin ! de>
Date: 2008-03-31 22:34:06
Message-ID: 47F166DE.6090502 () wmipf ! in-berlin ! de
[Download RAW message or body]
> 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.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic