On Tue, Jul 7, 2009 at 1:52 PM, Peter Grehan<
grehan@...> wrote:
> Hi Justin,
>
>> The trick is only needed in user space, as a shim between two
>> functions, so I just need any volatile registers that I can use but
>> aren't function arguments. The target is G4/G5. I only need 3 or 4
>> volatile registers, but the more the better.
>
> You'll probably have to use the stack to spill the param register. Have a
> look at the MCOUNT macro in ppc's <machine/profile.h> for an example of code
> that is an intercept between two routines and has to assume that all param
> registers are used
>
> (
http://svn.freebsd.org/viewvc/base/head/sys/powerpc/include/profile.h?view=markup&pathrev=153813> is the version that has the code fragment commented).
>
> later,
>
> Peter.
>
Thanks Peter, and Rafal,
I think this is just what I need. I can use the 3 volatile registers,
and save the parameter registers when I need to call library
functions. I'm doing this largely in assembly for performance
reasons, but knowing how mcount does it will help for the uncommon
case branches.
- Justin
_______________________________________________
freebsd-ppc@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ppcTo unsubscribe, send any mail to "
freebsd-ppc-unsubscribe@..."