From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LCLk6-0004jP-KK for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:16:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LCLk6-0004iO-2f for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:16:46 -0500 Received: from [199.232.76.173] (port=41313 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LCLk5-0004iB-Pq for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:16:45 -0500 Received: from hall.aurel32.net ([88.191.82.174]:57500) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LCLk5-0001Ec-EC for qemu-devel@nongnu.org; Mon, 15 Dec 2008 17:16:45 -0500 Date: Mon, 15 Dec 2008 23:16:43 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [PATCH 03/42] target-ppc: add gen_avr_ptr function. Message-ID: <20081215221643.GG8523@volta.aurel32.net> References: <1229307315-16807-1-git-send-email-froydnj@codesourcery.com> <1229307315-16807-4-git-send-email-froydnj@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <1229307315-16807-4-git-send-email-froydnj@codesourcery.com> 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 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? -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net