Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Kyjdm-0003aZ-DC for qemu-devel@nongnu.org; Sat, 08 Nov 2008 03:57:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Kyjdk-0003a1-TZ for qemu-devel@nongnu.org; Sat, 08 Nov 2008 03:57:57 -0500 Received: from [199.232.76.173] (port=47755 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kyjdk-0003Zn-Fk for qemu-devel@nongnu.org; Sat, 08 Nov 2008 03:57:56 -0500 Received: from mx20.gnu.org ([199.232.41.8]:21871) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1Kyjdj-0001IK-PI for qemu-devel@nongnu.org; Sat, 08 Nov 2008 03:57:56 -0500 Received: from hall.aurel32.net ([88.191.82.174]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Kyjdi-00038d-Qd for qemu-devel@nongnu.org; Sat, 08 Nov 2008 03:57:55 -0500 Received: from volta-wlan.aurel32.net ([2002:52e8:2fb:ffff:21d:e0ff:fe49:1047] helo=volta.aurel32.net) by hall.aurel32.net with esmtpsa (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Kyjdi-00084f-2r for qemu-devel@nongnu.org; Sat, 08 Nov 2008 09:57:54 +0100 Received: from aurel32 by volta.aurel32.net with local (Exim 4.69) (envelope-from ) id 1Kyjdh-0006vs-DD for qemu-devel@nongnu.org; Sat, 08 Nov 2008 09:57:53 +0100 Date: Sat, 8 Nov 2008 09:57:53 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] qemu-system-ppc broken ? Message-ID: <20081108085753.GN9549@volta.aurel32.net> References: <35733639105-BeMail@laptop> <20081107070852.GA32665@hall.aurel32.net> <761ea48b0811070838m2b9405a9w7564bf5eef2fddbf@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <761ea48b0811070838m2b9405a9w7564bf5eef2fddbf@mail.gmail.com> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org On Fri, Nov 07, 2008 at 05:38:32PM +0100, Laurent Desnogues wrote: > On Fri, Nov 7, 2008 at 8:08 AM, Aurelien Jarno wrote: > > > > Any one has an idea what happens? > > It looks like the i386 runs out of registers for allocation due > to too many global registers allocated by the ppc target. > > Here is a quick and dirty fix that seems to solve the problem. > This should be considered as temporary. > Thanks, applied. > Laurent > > Signed-off-by: Laurent Desnogues > Index: target-ppc/cpu.h > =================================================================== > --- target-ppc/cpu.h (revision 5645) > +++ target-ppc/cpu.h (working copy) > @@ -530,8 +530,12 @@ > * during translated code execution > */ > #if TARGET_LONG_BITS > HOST_LONG_BITS > - target_ulong t0, t1, t2; > + target_ulong t0, t1; > #endif > + /* XXX: this is a temporary workaround for i386. cf translate.c comment */ > +#if (TARGET_LONG_BITS > HOST_LONG_BITS) || defined(HOST_I386) > + target_ulong t2; > +#endif > #if !defined(TARGET_PPC64) > /* temporary fixed-point registers > * used to emulate 64 bits registers on 32 bits targets > Index: target-ppc/translate.c > =================================================================== > --- target-ppc/translate.c (revision 5645) > +++ target-ppc/translate.c (working copy) > @@ -97,8 +97,17 @@ > #else > cpu_T[0] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG1, "T0"); > cpu_T[1] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG2, "T1"); > +#ifdef HOST_I386 > + /* XXX: This is a temporary workaround for i386. > + * On i386 qemu_st32 runs out of registers. > + * The proper fix is to remove cpu_T. > + */ > + cpu_T[2] = tcg_global_mem_new(TCG_TYPE_TL, > + TCG_AREG0, offsetof(CPUState, t2), "T2"); > +#else > cpu_T[2] = tcg_global_reg_new(TCG_TYPE_TL, TCG_AREG3, "T2"); > #endif > +#endif > #if !defined(TARGET_PPC64) > cpu_T64[0] = tcg_global_mem_new(TCG_TYPE_I64, > TCG_AREG0, offsetof(CPUState, t0_64), -- .''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' aurel32@debian.org | aurelien@aurel32.net `- people.debian.org/~aurel32 | www.aurel32.net