FreeBSD/ppc ABI

Peter Grehan grehan at freebsd.org
Tue Jul 7 18:09:14 UTC 2009


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.


More information about the freebsd-ppc mailing list