Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 07 Jul 2009 10:52:36 -0700
From:      Peter Grehan <grehan@freebsd.org>
To:        Justin Hibbits <jrh29@alumni.cwru.edu>
Cc:        FreeBSD PowerPC ML <freebsd-ppc@freebsd.org>
Subject:   Re: FreeBSD/ppc ABI
Message-ID:  <4A538B64.2080506@freebsd.org>
In-Reply-To: <fd9cd3450907071007l5501ea85y81bcb1ee8f4b8bdc@mail.gmail.com>
References:  <fd9cd3450907070641l45223e72p5f7147b97fc5755f@mail.gmail.com>	<A07805D6-CAD5-4721-86AC-DE1751831D3C@semihalf.com> <fd9cd3450907071007l5501ea85y81bcb1ee8f4b8bdc@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A538B64.2080506>