From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42596) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zjm3e-0003a1-JT for qemu-devel@nongnu.org; Wed, 07 Oct 2015 06:34:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zjm3Y-0006Oq-43 for qemu-devel@nongnu.org; Wed, 07 Oct 2015 06:34:48 -0400 Received: from mailapp01.imgtec.com ([195.59.15.196]:13130 helo=imgpgp01.kl.imgtec.org) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Zjm3X-0006Nb-S4 for qemu-devel@nongnu.org; Wed, 07 Oct 2015 06:34:44 -0400 Date: Wed, 7 Oct 2015 11:34:40 +0100 From: James Hogan Message-ID: <20151007103440.GF29862@jhogan-linux.le.imgtec.org> References: <1443788657-14537-1-git-send-email-james.hogan@imgtec.com> <1443788657-14537-7-git-send-email-james.hogan@imgtec.com> <5614E9F6.8060102@twiddle.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="vA66WO2vHvL/CRSR" Content-Disposition: inline In-Reply-To: <5614E9F6.8060102@twiddle.net> Subject: Re: [Qemu-devel] [PATCH v3 6/6] tcg/mips: Support r6 SEL{NE, EQ}Z instead of MOVN/MOVZ List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: Leon Alrae , qemu-devel@nongnu.org, Aurelien Jarno --vA66WO2vHvL/CRSR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Oct 07, 2015 at 08:46:30PM +1100, Richard Henderson wrote: > On 10/02/2015 10:24 PM, James Hogan wrote: > > Extend MIPS movcond implementation to support the SELNEZ/SELEQZ > > instructions introduced in MIPS r6 (where MOVN/MOVZ have been removed). > > > > Whereas the "MOVN/MOVZ rd, rs, rt" instructions have the following > > semantics: > > rd =3D [!]rt ? rs : rd > > > > The "SELNEZ/SELEQZ rd, rs, rt" instructions are slightly different: > > rd =3D [!]rt ? rs : 0 > > > > First we ensure that if one of the movcond input values is zero that it > > comes last (we can swap the input arguments if we invert the condition). > > This is so that it can exactly match one of the SELNEZ/SELEQZ > > instructions and avoid the need to emit the other one. > > > > Otherwise we emit the opposite instruction first into a temporary > > register, and OR that into the result: > > SELNEZ/SELEQZ TMP1, v2, c1 > > SELEQZ/SELNEZ ret, v1, c1 > > OR ret, ret, TMP1 > > > > Which does the following: > > ret =3D cond ? v1 : v2 > > > > Signed-off-by: James Hogan > > Cc: Richard Henderson > > Cc: Aurelien Jarno >=20 > Reviewed-by: Richard Henderson Thanks for the reviewing! >=20 >=20 > > { INDEX_op_brcond_i32, { "rZ", "rZ" } }, > > +#if !use_mips32r6_instructions > > { INDEX_op_movcond_i32, { "r", "rZ", "rZ", "rZ", "0" } }, > > +#else > > + { INDEX_op_movcond_i32, { "r", "rZ", "rZ", "rZ", "rZ" } }, > > +#endif >=20 >=20 > The only thing I'd change is preferring positive tests to negative ones. = So=20 > swap the order of these lines, and the sense of the #if. No problem. Shall I do a full resend for that, or can it be fixed up by whoever applies? Cheers James >=20 > Leon, do you want to take this as a mips maintainer, or shall I as tcg ma= intainer? >=20 >=20 > r~ --vA66WO2vHvL/CRSR Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWFPVAAAoJEGwLaZPeOHZ6r78QAJI5V1M8Y5yJ9WM5QzuLuuHX cw6bNdQRRUcaJrj9T1XcsQBaABEHh5xZsdpSj6pq074yXNBgf40HD/oZDN6Uz6Ya snkcLjOpAW7VzVhlT0ykD1iW2kgQGJpaAly4/cR+TxORVq0vrim1QRaf35Wh3U38 zRD7ibcvay7mZtxOCILonpKWcJkSGRBa1zQjGYz40gLxMTjbuEZByKM2Zxmemdet PMt1IK2EWgZsBQrjZ41E08m9m4dvagWQ4MKNbWlIIW3xPu2zGTPqXliQSyMzD9Hc 4ExrxvcxS6f1jgQ/ISp2ruLUW8XHMgH9+J3xPR/Vn3lmH/p5TUPOjhfcOuOjNaDU Eg52OE7GsAf3wKuFkL/VYxOPaLKBO3/sE+FR1iChlj69z/zYMsMRWHxgVWUzx/uz cTfbQSdNzSijjq9k+Of+KvIIvU1/6Bi2veBelcMoIJ9vVpMuFVw9ujP77WzjOe9s srxnMoev6ExMDL9z6js2ecZKD1WUI7PZhjkYKZXy7cabzvNXE+L6MnZVo37gDHFJ Bjr2xivjFKQZ6VxmWq3dmBEXqExLRU4Y2mYSAknGF2IShtc6ozBXHQbIb2Y/zjYR r4ri4C46jfM2PEqrroqag6WadTcr1bviPlU2UxCBtto218jmHdi2fgdGCuZPHGFc XHcVrmhRbTUaZh0C1G4O =LOnS -----END PGP SIGNATURE----- --vA66WO2vHvL/CRSR--