From owner-freebsd-ppc@FreeBSD.ORG Tue Jul 7 17:07:02 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 42813106564A for ; Tue, 7 Jul 2009 17:07:02 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.247]) by mx1.freebsd.org (Postfix) with ESMTP id EF0F58FC18 for ; Tue, 7 Jul 2009 17:07:01 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by an-out-0708.google.com with SMTP id d14so2218532and.13 for ; Tue, 07 Jul 2009 10:07:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=9jnPWNujeMZJEuXFHNQv2e3fW8kegwPQ2gIa91Ei05I=; b=nEgDD0qlaJ4x+0lv29uJNOK7frLbZqRNbG+OYerxc33wgrortlzIKs/OpLDlyyVopk 8qSpGnlzX6bY8g9Vi/7ZpErgTqR2WbaGoXtRWIaKw3tcZsU27mdvJKDgHmxhmx/cbpzv qcoMCl1PyiyjnyvEm5tzZC+6TFxD2dczjx3wU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=e8xu/LwcVdL8ATV8+vic2L/2W6j/twvL4+qIwZPpQBRbI72+EvxV+qfj0BlTZCr8+4 K6PZV1/jr0O66aZJ3AV0DOutEaewW8IoY9RpL6TqPPIYtQ8pF5EjbXR1sWtk9zu0fEot bckZIrYTCom42tumvcnn0gVuNujpWx+82YeX8= MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.100.227.5 with SMTP id z5mr10678871ang.175.1246986421035; Tue, 07 Jul 2009 10:07:01 -0700 (PDT) In-Reply-To: References: Date: Tue, 7 Jul 2009 13:07:00 -0400 X-Google-Sender-Auth: 2bd57afcf78283c6 Message-ID: From: Justin Hibbits To: Rafal Jaworowski Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 17:07:02 -0000 Thanks. 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. - Justin On Tue, Jul 7, 2009 at 11:56 AM, Rafal Jaworowski wrote: > > On 2009-07-07, at 15:41, Justin Hibbits wrote: > >> What's the current FreeBSD/ppc ABI register usage? =A0I'm writing a >> proxy function that messes with some arguments before making the >> target function call, and need to know which registers are free for me >> to use without having to save argument registers. =A0From reading the >> gcc source it looks like it's a strict SysV R4 ABI, leaving r0, r11, >> and r12 available for me to use. =A0Is this the case, and are there any >> others available? > > We use the plain SVR4 ABI. My understanding is R0, R11 and R12 are among > volatile group, so you should be careful. Can you use one of the SPRGs (w= hat > CPU is this, do you need to do the trick in user or supervisor mode)? > > Rafal > >