From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:46169) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bzERk-0008Nw-LO for qemu-devel@nongnu.org; Tue, 25 Oct 2016 23:00:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bzERj-0004N1-IM for qemu-devel@nongnu.org; Tue, 25 Oct 2016 23:00:08 -0400 Received: from ozlabs.org ([2401:3900:2:1::2]:45015) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1bzERi-0004IY-VM for qemu-devel@nongnu.org; Tue, 25 Oct 2016 23:00:07 -0400 Date: Wed, 26 Oct 2016 12:48:24 +1100 From: David Gibson Message-ID: <20161026014824.GT11052@umbus.fritz.box> References: <1476589070-5792-1-git-send-email-rth@twiddle.net> <1476589070-5792-9-git-send-email-rth@twiddle.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="PpHgzJIASOO9qXt6" Content-Disposition: inline In-Reply-To: <1476589070-5792-9-git-send-email-rth@twiddle.net> Subject: Re: [Qemu-devel] [PATCH 08/15] tcg/ppc: Implement field extraction opcodes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Richard Henderson Cc: qemu-devel@nongnu.org --PpHgzJIASOO9qXt6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Oct 15, 2016 at 08:37:43PM -0700, Richard Henderson wrote: > Signed-off-by: Richard Henderson Reviewed-by: David Gibson > --- > tcg/ppc/tcg-target.h | 4 ++-- > tcg/ppc/tcg-target.inc.c | 10 ++++++++++ > 2 files changed, 12 insertions(+), 2 deletions(-) >=20 > diff --git a/tcg/ppc/tcg-target.h b/tcg/ppc/tcg-target.h > index c765d3e..b42c57a 100644 > --- a/tcg/ppc/tcg-target.h > +++ b/tcg/ppc/tcg-target.h > @@ -69,7 +69,7 @@ typedef enum { > #define TCG_TARGET_HAS_nand_i32 1 > #define TCG_TARGET_HAS_nor_i32 1 > #define TCG_TARGET_HAS_deposit_i32 1 > -#define TCG_TARGET_HAS_extract_i32 0 > +#define TCG_TARGET_HAS_extract_i32 1 > #define TCG_TARGET_HAS_sextract_i32 0 > #define TCG_TARGET_HAS_movcond_i32 1 > #define TCG_TARGET_HAS_mulu2_i32 0 > @@ -102,7 +102,7 @@ typedef enum { > #define TCG_TARGET_HAS_nand_i64 1 > #define TCG_TARGET_HAS_nor_i64 1 > #define TCG_TARGET_HAS_deposit_i64 1 > -#define TCG_TARGET_HAS_extract_i64 0 > +#define TCG_TARGET_HAS_extract_i64 1 > #define TCG_TARGET_HAS_sextract_i64 0 > #define TCG_TARGET_HAS_movcond_i64 1 > #define TCG_TARGET_HAS_add2_i64 1 > diff --git a/tcg/ppc/tcg-target.inc.c b/tcg/ppc/tcg-target.inc.c > index a3262cf..7ec54a2 100644 > --- a/tcg/ppc/tcg-target.inc.c > +++ b/tcg/ppc/tcg-target.inc.c > @@ -2396,6 +2396,14 @@ static void tcg_out_op(TCGContext *s, TCGOpcode op= c, const TCGArg *args, > } > break; > =20 > + case INDEX_op_extract_i32: > + tcg_out_rlw(s, RLWINM, args[0], args[1], > + 32 - args[2], 32 - args[3], 31); > + break; > + case INDEX_op_extract_i64: > + tcg_out_rld(s, RLDICL, args[0], args[1], 64 - args[2], 64 - args= [3]); > + break; > + > case INDEX_op_movcond_i32: > tcg_out_movcond(s, TCG_TYPE_I32, args[5], args[0], args[1], args= [2], > args[3], args[4], const_args[2]); > @@ -2530,6 +2538,7 @@ static const TCGTargetOpDef ppc_op_defs[] =3D { > { INDEX_op_movcond_i32, { "r", "r", "ri", "rZ", "rZ" } }, > =20 > { INDEX_op_deposit_i32, { "r", "0", "rZ" } }, > + { INDEX_op_extract_i32, { "r", "r" } }, > =20 > { INDEX_op_muluh_i32, { "r", "r", "r" } }, > { INDEX_op_mulsh_i32, { "r", "r", "r" } }, > @@ -2585,6 +2594,7 @@ static const TCGTargetOpDef ppc_op_defs[] =3D { > { INDEX_op_movcond_i64, { "r", "r", "ri", "rZ", "rZ" } }, > =20 > { INDEX_op_deposit_i64, { "r", "0", "rZ" } }, > + { INDEX_op_extract_i64, { "r", "r" } }, > =20 > { INDEX_op_mulsh_i64, { "r", "r", "r" } }, > { INDEX_op_muluh_i64, { "r", "r", "r" } }, --=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 --PpHgzJIASOO9qXt6 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYEAtlAAoJEGw4ysog2bOSVHkP/AxGFIbHOAbzrllcA2yocRJK mRbKX3U5iWmxmh8DtsvyMtopUBcnZXDPU9HAe311E6aQbphM8zzAxuE7/Q53cida q6m61bdcoR4N6p8+C4eF0aWi1bip3Fu+9/Zfz8wT1FAej0x6z8O91+7stBA7zkac XUOf4XaYqRjx0LJT9oAkAVKMow1mAtTny9CTQyNfN4g0BrszfoQZ/BKOgOsiSkNE SlGxrBCt/iuWrHo260LCgOIyHH3UDt4rxxoMdQ3Ehsg2Rj75pOzEiRLnUIDVqIuL ZQRRgws4hChqLp2mzka0KDd44wejjJXi7mZN6u3whutMxvk5aedpPBa80Mu38XEE aTr54iEKLve70dvnnyfseA4LULuemTvSP2yjgMp/HQ/1arj2enmYo6RwPcVmpR5Q nRA/nNZnxuz8WlijyBzHg6+2ye0ZnNpVYDBwhrRdyVXihUjtVNo3cjXKAaBbzOar YNHUrL+mKI8Uk3+D7cppDr1JBY/+MR9HKpa+u6cTh/C6KzOdA32lBqTlqYtY86zQ /cRi83UFcKPX1ve0OFTt5+o/pYyDFx7suniYJJsb5cfiICwKVIJkiAQ8on1/ZU7f YD4WSvxOOshSCmsz85Xs6fvzWTJWJCPkhvsl4nWa+13s6dHF76neDJjNkowB2m8n AnuIef5Mx/Uj97au0Kve =5tfx -----END PGP SIGNATURE----- --PpHgzJIASOO9qXt6--