Received: from eggs.gnu.org ([2001:4830:134:3::10]:46693) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhOrH-0005pW-5Y for qemu-devel@nongnu.org; Wed, 30 Sep 2015 17:24:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZhOrE-0006Pt-0E for qemu-devel@nongnu.org; Wed, 30 Sep 2015 17:24:15 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:9118 helo=imgpgp01.kl.imgtec.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZhOrD-0006Pd-Oo for qemu-devel@nongnu.org; Wed, 30 Sep 2015 17:24:11 -0400 Date: Wed, 30 Sep 2015 22:24:10 +0100 From: James Hogan Message-ID: <20150930212410.GC23982@jhogan-linux.le.imgtec.org> References: <1443627027-2193-1-git-send-email-james.hogan@imgtec.com> <1443627027-2193-5-git-send-email-james.hogan@imgtec.com> <560C4AC7.5010107@twiddle.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="t0UkRYy7tHLRMCai" Content-Disposition: inline In-Reply-To: <560C4AC7.5010107@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 4/7] tcg/mips: Support r6 JR encoding List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Leon Alrae , qemu-devel@nongnu.org, Aurelien Jarno --t0UkRYy7tHLRMCai Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Richard, On Thu, Oct 01, 2015 at 06:49:11AM +1000, Richard Henderson wrote: > On 10/01/2015 01:30 AM, James Hogan wrote: > > MIPSr6 encodes JR as JALR with zero as the link register, and the pre-r6 > > JR encoding is removed. Update TCG to use the new encoding when built > > for r6. > > > > We still use the old encoding for pre-r6, so as not to confuse return > > prediction stack hardware which may detect only particular encodings of > > the return instruction. > > > > Signed-off-by: James Hogan > > Cc: Richard Henderson > > Cc: Aurelien Jarno > > --- > > tcg/mips/tcg-target.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/tcg/mips/tcg-target.c b/tcg/mips/tcg-target.c > > index 4305af967326..0a16140b1cdb 100644 > > --- a/tcg/mips/tcg-target.c > > +++ b/tcg/mips/tcg-target.c > > @@ -288,7 +288,7 @@ typedef enum { > > OPC_SRLV =3D OPC_SPECIAL | 0x06, > > OPC_ROTRV =3D OPC_SPECIAL | (0x01 << 6) | 0x06, > > OPC_SRAV =3D OPC_SPECIAL | 0x07, > > - OPC_JR =3D OPC_SPECIAL | 0x08, > > + OPC_JR_R5 =3D OPC_SPECIAL | 0x08, > > OPC_JALR =3D OPC_SPECIAL | 0x09, > > OPC_MOVZ =3D OPC_SPECIAL | 0x0A, > > OPC_MOVN =3D OPC_SPECIAL | 0x0B, > > @@ -322,6 +322,9 @@ typedef enum { > > OPC_SEH =3D OPC_SPECIAL3 | 0x620, > > } MIPSInsn; > > > > +/* MIPS r6 doesn't have JR, JALR should be used instead */ > > +#define OPC_JR (use_mips32r6_instructions ? OPC_JALR : OPC_JR_R5) >=20 > This could be done in the enum instead of a define, but otherwise, True, I'll do that. Thanks James >=20 >=20 > Reviewed-by: Richard Henderson >=20 >=20 > r~ >=20 >=20 --t0UkRYy7tHLRMCai Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWDFL6AAoJEGwLaZPeOHZ6x5sP/RiRFlg2GKSaxbTOJR8lhDBr 9vObS6JmOlbQvDs413qF2GVmPRCJHPLHTrkN7mK7EHixB8T7b4NMgfYI9JR34hyp sWeI0bbyc/vjEreMxbnyq9DNapSvWn1rJTtn46LcF7WQqUaE36Tn5zMeBxxfGqos 8qIVFzQKZNQeY71BKSjj5l/5CiezzOeGHkyZG6TDtZzbvJKp+eYOZHCF5JRxNE+5 K5CsOh7WGnfRSql9IOfwn4ruqx00QeK47anbYcpMDnQhONCAYAA/7jarYgwc9jps qfjzjHfTde9cBDzWyh0EA1yTEH0dIrDess+Ew8bttJwrMLOeu9fM/7uLvLeyVbxp vZQTBHAK02ujK+7S2HGVyMhm2N1daDaKHg9FhX0s8LtQw49iSEV7YmsXBYiqPBYP GdCdR7rLguRBEVn5L2BRvhSinC3T9Z4Xh3ttiYs+inLpBZTcXXy6cVkkMT92biAL wCR0T0Qm4exlik+QXOtIPnL9W+s4rkrPb9Y7FY6Yvv+X/Rl8Q/1KURMQ/L7B9gv+ NFDZZi2QzAHHM4JFXz1HRl3T1tl7fRf0i1yJM+432W1n+x4zMVeBDWnwTk/SxpVU aIEUYoeDdwrelNWp7WgvMTgqugKiyOAPg0qkcAvk1MTxNR+LeFQc62NPFtptUFQ2 uYD6XjZF6/f/6SjUy50u =vF+T -----END PGP SIGNATURE----- --t0UkRYy7tHLRMCai--