Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCM8M-0005wA-PJ for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:41:50 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCM8L-0005vE-UZ for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:41:50 -0500 Received: from [199.232.76.173] (port=49735 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCM8L-0005up-N1 for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:41:49 -0500 Received: from hall.aurel32.net ([88.191.82.174]:38977) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCM8L-0004YR-Bk for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:41:49 -0500 Date: Mon, 15 Dec 2008 23:41:46 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 03/42] target-ppc: add gen_avr_ptr function. Message-ID: <20081215224146.GX22069@hall.aurel32.net> References: <1229307315-16807-1-git-send-email-froydnj@codesourcery.com> <1229307315-16807-4-git-send-email-froydnj@codesourcery.com> <20081215221643.GG8523@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20081215221643.GG8523@volta.aurel32.net> Sender: Aurelien Jarno Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nathan Froyd Cc: qemu-devel@nongnu.org On Mon, Dec 15, 2008 at 11:16:43PM +0100, Aurelien Jarno wrote: > On Sun, Dec 14, 2008 at 06:14:36PM -0800, Nathan Froyd wrote: > > > > Signed-off-by: Nathan Froyd > > --- > > target-ppc/translate.c | 7 +++++++ > > 1 files changed, 7 insertions(+), 0 deletions(-) > > > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > > index 70047c7..41ae158 100644 > > --- a/target-ppc/translate.c > > +++ b/target-ppc/translate.c > > @@ -6053,6 +6053,13 @@ GEN_HANDLER2(icbt_440, "icbt", 0x1F, 0x16, 0x00, 0x03E00001, PPC_BOOKE) > > /*** Altivec vector extension ***/ > > /* Altivec registers moves */ > > > > +static always_inline TCGv_ptr gen_avr_ptr(int reg) > > +{ > > + TCGv_ptr r = tcg_temp_new(); > > + tcg_gen_addi_ptr(r, cpu_env, offsetof(CPUPPCState, avr[reg])); > > + return r; > > +} > > + > > #define GEN_VR_LDX(name, opc2, opc3) \ > > GEN_HANDLER(name, 0x1F, opc2, opc3, 0x00000001, PPC_ALTIVEC) \ > > { \ > > I am still pondering what is the better solution between passing a > pointer to an avr register or the avr register number. > > Does someone has an opinion about that? > Note that SSE helpers are also using pointers. -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net