From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49013) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bD2Kx-0005Rx-UA for qemu-devel@nongnu.org; Wed, 15 Jun 2016 00:21:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bD2Kt-0003XM-N6 for qemu-devel@nongnu.org; Wed, 15 Jun 2016 00:21:54 -0400 Date: Wed, 15 Jun 2016 14:06:58 +1000 From: David Gibson Message-ID: <20160615040658.GH4882@voom.fritz.box> References: <20160603154549.GA31406@ibawizard> <20160606013441.GF9226@voom.fritz.box> <20160606084728.GB24720@ibawizard> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="T+d4WTH4wtHHX3b6" Content-Disposition: inline In-Reply-To: <20160606084728.GB24720@ibawizard> Subject: Re: [Qemu-devel] [Qemu-ppc] Bug in ppc/BookE wait instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jakub Horak Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org --T+d4WTH4wtHHX3b6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jun 06, 2016 at 10:47:28AM +0200, Jakub Horak wrote: >=20 > Hello, >=20 > David Gibson (david@gibson.dropbear.id.au) wrote: > > On Fri, Jun 03, 2016 at 05:45:49PM +0200, Jakub Horak wrote: > > > Hello, > > > I think there's a bug in "wait" instruction code generator for PowerPC > > > architecture. It doesn't make sense to store a non-initialized regist= er. > > >=20 > > > Best regards, > > > Jakub Horak > >=20 > > The fix looks correct, but I need a Signed-off-by line in order to > > apply it. >=20 > Here you go: >=20 > Fixed bug in code generator. > =20 > Signed-off-by: Jakub Horak >=20 > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > index f5ceae5..6af567b 100644 > --- a/target-ppc/translate.c > +++ b/target-ppc/translate.c > @@ -3439,7 +3439,7 @@ static void gen_sync(DisasContext *ctx) > /* wait */ > static void gen_wait(DisasContext *ctx) > { > - TCGv_i32 t0 =3D tcg_temp_new_i32(); > + TCGv_i32 t0 =3D tcg_const_i32(1); > tcg_gen_st_i32(t0, cpu_env, > -offsetof(PowerPCCPU, env) + offsetof(CPUState, halte= d)); > tcg_temp_free_i32(t0); >=20 >=20 > >=20 > > In future, please send such patches to myself and Alex Graf > > (target-ppc maintainers) the qemu-ppc list as well as qemu-devel. I > > wouldn't have spotted this if Marc Cave-Ayland hadn't copied it to me. >=20 > Sorry, I'll be more thoughtful next time. Sorry, I forgot about this one after you resent, I've now applied to ppc-fo= r-2.7. >=20 > Best regards, > Jakub=20 >=20 > >=20 > > >=20 > > >=20 > > > diff --git a/target-ppc/translate.c b/target-ppc/translate.c > > > index f5ceae5..6af567b 100644 > > > --- a/target-ppc/translate.c > > > +++ b/target-ppc/translate.c > > > @@ -3439,7 +3439,7 @@ static void gen_sync(DisasContext *ctx) > > > /* wait */ > > > static void gen_wait(DisasContext *ctx) > > > { > > > - TCGv_i32 t0 =3D tcg_temp_new_i32(); > > > + TCGv_i32 t0 =3D tcg_const_i32(1); > > > tcg_gen_st_i32(t0, cpu_env, > > > -offsetof(PowerPCCPU, env) + offsetof(CPUState, h= alted)); > > > tcg_temp_free_i32(t0); > > >=20 > >=20 >=20 >=20 >=20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --T+d4WTH4wtHHX3b6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXYNRiAAoJEGw4ysog2bOSF6gQAJtNobNR5QJU3Bb+mf0EoaDd 8uCVeqESWsPlh5745yLQVtrBsVpizAxqIvzND+hSO/DVSR6Wgo6663GdSEQqXUly 0++taaMdNlhBJL5Dsmn/QqgsBFcp5HDDY9iH2ylTJ6SZeft78Ea7fFUjJ6iEeSbT yAIrh2MHZuAuFeNGJsSvNkNJ6US+ZYbyrnE9pc+FUI1chpt2agEuZ5r7jJ1FW7Jf gQXi/QbsYcw4yaLmFpqmcuwtMEf0jt0RxPdjJU3aKwyrBKpWW/afXMJ2Tu6qTzil kZPydEC2pqZtsEE2j7emOpaUVbQ8PVPe6COtFQxlySno80rRO/VopMwbo+9VAj// RonxAXJ36AEqMb7k0b0uRv8EUj2qZDOBv9hr/RP5PRayDo1u5zmxmgTZgHrdlKWv C5adKHZuimBio693wyUiihQS1f4ASMs14gjCVVpnq8FBCEbvYKgPTg9vm35h23cd EEdvVqheSRyvXt5tHAGGWyWsliiSLt0TPjCPA8P5O2xgwaMF6vpQhnXFXY0WTJQD 8b75djs4j5Xv+aTrVPxX6k9i1HSTVJ8/td1p2y8BhLXw0VVuquqUqB9TSopcIZCO ZChf/MlD34Sc2yhGRKmQhek7ukjKgfLEUMw1xhI8ue3Tqs2+8JT/8iP+K8gJ3xdz 2fxuaGzRwA7+zCY4PIDp =AG/q -----END PGP SIGNATURE----- --T+d4WTH4wtHHX3b6--