From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:50901) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SRBPr-00082C-1U for qemu-devel@nongnu.org; Sun, 06 May 2012 20:03:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SRBPp-0001uD-2i for qemu-devel@nongnu.org; Sun, 06 May 2012 20:03:02 -0400 Message-ID: <4FA71132.7080409@suse.de> Date: Mon, 07 May 2012 02:02:58 +0200 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <4FA54951.90908@suse.de> <4FA68483.8090805@suse.de> <4FA6CF58.6050201@suse.de> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] sparc-softmmu uninitialized memory read? List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: malc Cc: Blue Swirl , qemu-ppc , Alexander Graf , qemu-devel Am 06.05.2012 21:27, schrieb malc: > The attached patch is broken for non SysV calling conventions, would be > nice if you could test things on Darwin (and, if your power5 box still = has > AIX, on AIX) I replaced AIX 5.x with openSUSE, sorry. :) > diff --git a/tcg/ppc/tcg-target.c b/tcg/ppc/tcg-target.c > index dc40716..311af18 100644 > --- a/tcg/ppc/tcg-target.c > +++ b/tcg/ppc/tcg-target.c [...] > @@ -810,6 +829,17 @@ static void tcg_out_qemu_st (TCGContext *s, const = TCGArg *args, int opc) > #endif > =20 > /* slow path */ > +#ifdef CONFIG_TCG_PASS_AREG0 > + tcg_out_mov (s, TCG_TYPE_I32, 3, TCG_AREG0); > +#if TARGET_LONG_BITS =3D=3D 32 > + tcg_out_mov (s, TCG_TYPE_I32, 4, addr_reg); > + ir =3D 5; > +#else > + tcg_out_mov (s, TCG_TYPE_I32, 5, addr_reg2); > + tcg_out_mov (s, TCG_TYPE_I32, 6, addr_reg); Here we should be using r4 + r5 for non-aligned targets. Alternative patch sent that hopefully avoids such issues and the code duplication. If you prefer two separate code paths for some reason, please at least consider using a fool-proof alignment macro such as proposed. /-F > + ir =3D 7; > +#endif > +#else > #if TARGET_LONG_BITS =3D=3D 32 > tcg_out_mov (s, TCG_TYPE_I32, 3, addr_reg); > ir =3D 4; [snip] --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg