From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 7 18:09:13 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A8FC81065697 for ; Tue, 7 Jul 2009 18:09:13 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) by mx1.freebsd.org (Postfix) with ESMTP id 670258FC14 for ; Tue, 7 Jul 2009 18:09:13 +0000 (UTC) (envelope-from grehan@freebsd.org) Received: from dommail.onthenet.com.au (dommail.OntheNet.com.au [203.13.70.57]) by alto.onthenet.com.au (Postfix) with ESMTP id 37D0F11AF7; Wed, 8 Jul 2009 03:53:42 +1000 (EST) Received: from armstd-lxp.hq.netapp.com (nat-198-95-226-231.netapp.com [198.95.226.231]) by dommail.onthenet.com.au (MOS 3.10.6-GA) with ESMTP id EWC36195 (AUTH peterg@ptree32.com.au); Wed, 8 Jul 2009 03:52:41 +1000 (EST) Message-ID: <4A538B64.2080506@freebsd.org> Date: Tue, 07 Jul 2009 10:52:36 -0700 From: Peter Grehan User-Agent: Thunderbird 2.0.0.22 (Macintosh/20090605) MIME-Version: 1.0 To: Justin Hibbits References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: FreeBSD PowerPC ML Subject: Re: FreeBSD/ppc ABI X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2009 18:09:14 -0000 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 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.