« Return to Thread: FreeBSD/ppc ABI

Re: FreeBSD/ppc ABI

by Peter Grehan :: Rate this Message:

Reply to Author | View in Thread

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.
_______________________________________________
freebsd-ppc@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-ppc
To unsubscribe, send any mail to "freebsd-ppc-unsubscribe@..."

 « Return to Thread: FreeBSD/ppc ABI