From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KZ1UX-0007c9-7D for qemu-devel@nongnu.org; Fri, 29 Aug 2008 06:46:09 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KZ1UV-0007bW-KP for qemu-devel@nongnu.org; Fri, 29 Aug 2008 06:46:08 -0400 Received: from [199.232.76.173] (port=52222 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KZ1UV-0007bO-8g for qemu-devel@nongnu.org; Fri, 29 Aug 2008 06:46:07 -0400 Received: from relay01.mx.bawue.net ([193.7.176.67]:34584) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KZ1UU-0002N5-RS for qemu-devel@nongnu.org; Fri, 29 Aug 2008 06:46:07 -0400 Date: Fri, 29 Aug 2008 12:46:03 +0200 From: Thiemo Seufer Subject: Re: [Qemu-devel] [5100] SH4: Convert register moves to TCG Message-ID: <20080829104603.GE3229@networkno.de> References: <200808282313.42947.paul@codesourcery.com> <20080828232353.GA10605@volta.aurel32.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <20080828232353.GA10605@volta.aurel32.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aurelien Jarno Cc: qemu-devel@nongnu.org Aurelien Jarno wrote: > On Thu, Aug 28, 2008 at 11:13:42PM +0100, Paul Brook wrote: > > On Thursday 28 August 2008, Aurelien Jarno wrote: > > > +static always_inline void gen_movl_T_rN (TCGv t, int reg) > > > +{ > > > + =A0 =A0tcg_gen_st_tl(t, cpu_env, offsetof(CPUState, gregs[reg])); > >=20 > > The preferred way of doing this is to have TCG variables for common (po= ssibly=20 > > all?) registers. See e.g. m68k or sparc. > >=20 >=20 > Until now I have used MIPS as an example, it copies CPU registers to TCG > variables. As you pointed, m68k and sparc use direct access to CPU > registers through TCG variables. For MIPS I tried to keep thing similiar to dyngen when both TCG and dyngen were used. Then I converted a few places to use TCG variables but had no time to finish the job. > I wonder in which way what your propose is better? It seems easier to wri= te, > but what about the runtime speed? TCG variables are (potentially) better. Thiemo