From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b9jeT-0006zC-4A for qemu-devel@nongnu.org; Sun, 05 Jun 2016 21:48:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b9jeM-0000ll-6S for qemu-devel@nongnu.org; Sun, 05 Jun 2016 21:48:25 -0400 Date: Mon, 6 Jun 2016 11:34:41 +1000 From: David Gibson Message-ID: <20160606013441.GF9226@voom.fritz.box> References: <20160603154549.GA31406@ibawizard> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="65ImJOski3p8EhYV" Content-Disposition: inline In-Reply-To: <20160603154549.GA31406@ibawizard> Subject: Re: [Qemu-devel] Bug in ppc/BookE wait instruction List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jakub Horak Cc: qemu-devel@nongnu.org, qemu-ppc@nongnu.org --65ImJOski3p8EhYV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 register. >=20 > Best regards, > Jakub Horak The fix looks correct, but I need a Signed-off-by line in order to apply it. 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 >=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 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 --65ImJOski3p8EhYV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXVNMxAAoJEGw4ysog2bOSE7AP/A1MnZsLWNXhhOjOo+Eqe4wn jBv0Z2Ay9XI7xz/fweFADJegziWQbamAhkhijD6KE+vSh7Ejqg2zGnKAvy75GovP UIJzrlvx9jqUX0FihBiyCWucQh3eENmv5B01pnNqvhpJTR6TGfdHtIaBJux/grvr LfTlJstSmGs5lserBqS6Fd4hOZK6gSBd8csFeTOKvfGCvspJ5HEl2Z+WqMiyJSJt XmdNmTMnSOSM1YLuIwJDR1jVb3q1y+Fhfdi406izIMvXvB6h/J5589tFh0w6SsSS VU4VfhlP3bNCyMcOqyQ6j8nbVpFO92oYOneG3TLY/1LdfdTx2jgwvrSFMITwKQoW udwYEcg1VQ26NgE1+1KGIAZOLZKe3o7Sur1wDPAsZ5WZ9c3sjdB1OB0xQ6rGqqrB SRfxq3xIJzf/xpS+pwaYUZjyjgGmHW/DOyGoin0ksQW2w3N0UkpsHxPFABdEkvZ8 rP1K8t3CqLAZmpaPYc9o2ATGrwOgqKvYnOUg46VRhM/tAKKyx9v2kM1yhoVkQU4c g7jPl7seMl28ORWfV4rnJO8g0pp9/ituhK2ht4oDeuiWpNsAAt8Le+OtpkqKQgsk sJfmpTxwxdxOAdmlywvXHZAgWZAWLIdieKQWdJSDsoC6Mi7cIf5lqhhY6e/EB1jE nDT5HoEJsn8p392n0eSV =3lMK -----END PGP SIGNATURE----- --65ImJOski3p8EhYV--