From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N3Znv-0008I5-RZ for qemu-devel@nongnu.org; Thu, 29 Oct 2009 14:32:59 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N3Znv-0008Hs-Fp for qemu-devel@nongnu.org; Thu, 29 Oct 2009 14:32:59 -0400 Received: from [199.232.76.173] (port=39588 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N3Znv-0008Hp-9e for qemu-devel@nongnu.org; Thu, 29 Oct 2009 14:32:59 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:39176) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N3Znt-0006pe-Hv for qemu-devel@nongnu.org; Thu, 29 Oct 2009 14:32:58 -0400 Received: by fg-out-1718.google.com with SMTP id 16so2273412fgg.10 for ; Thu, 29 Oct 2009 11:32:56 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20091029182217.GA10660@miranda.arrow> References: <1256824875-46345-1-git-send-email-juha.riihimaki@nokia.com> <20091029182217.GA10660@miranda.arrow> Date: Thu, 29 Oct 2009 19:32:56 +0100 Message-ID: <761ea48b0910291132t6306047evdb551eb1bb0eaa06@mail.gmail.com> Subject: Re: [Qemu-devel] [PATCH] target-arm: tcg temp variable usage cleanup From: Laurent Desnogues Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stuart Brady Cc: qemu-devel@nongnu.org On Thu, Oct 29, 2009 at 7:22 PM, Stuart Brady wrote: > On Thu, Oct 29, 2009 at 04:01:15PM +0200, juha.riihimaki@nokia.com wrote: >> >> -static inline TCGv gen_ld8s(TCGv addr, int index) >> +static inline void gen_ld8s(TCGv ret, TCGv addr, int index) >> =A0{ >> - =A0 =A0TCGv tmp =3D new_tmp(); >> - =A0 =A0tcg_gen_qemu_ld8s(tmp, addr, index); >> - =A0 =A0return tmp; >> + =A0 =A0tcg_gen_qemu_ld8s(ret, addr, index); >> =A0} > [...] >> =A0static inline void gen_st8(TCGv val, TCGv addr, int index) >> =A0{ >> =A0 =A0 =A0tcg_gen_qemu_st8(val, addr, index); >> - =A0 =A0dead_tmp(val); >> =A0} >> =A0static inline void gen_st16(TCGv val, TCGv addr, int index) >> =A0{ >> =A0 =A0 =A0tcg_gen_qemu_st16(val, addr, index); >> - =A0 =A0dead_tmp(val); >> =A0} > [...] > > Why not remove these functions entirely, replacing them with calls to > tcg_gen_qemu_ld/st()? It eases adding calls to a memory tracer for instance. Laurent > I presume there's a reason, given this: > >> @@ -1001,25 +955,24 @@ VFP_GEN_FIX(ulto) >> =A0static inline void gen_vfp_ld(DisasContext *s, int dp, TCGv addr) >> =A0{ >> =A0 =A0 =A0if (dp) >> - =A0 =A0 =A0 =A0tcg_gen_qemu_ld64(cpu_F0d, addr, IS_USER(s)); >> + =A0 =A0 =A0 =A0gen_ld64(cpu_F0d, addr, IS_USER(s)); >> =A0 =A0 =A0else >> - =A0 =A0 =A0 =A0tcg_gen_qemu_ld32u(cpu_F0s, addr, IS_USER(s)); >> + =A0 =A0 =A0 =A0gen_ld32(cpu_F0s, addr, IS_USER(s)); >> =A0} > > Cheers, > -- > Stuart Brady > > >