From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:52062) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9iqH-0001Pk-SP for qemu-devel@nongnu.org; Wed, 23 Nov 2016 20:28:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9iqD-0005Qc-LK for qemu-devel@nongnu.org; Wed, 23 Nov 2016 20:28:49 -0500 Date: Thu, 24 Nov 2016 12:02:12 +1100 From: David Gibson Message-ID: <20161124010212.GK17795@umbus.fritz.box> References: <1479901039-7113-1-git-send-email-nikunj@linux.vnet.ibm.com> <1479901039-7113-10-git-send-email-nikunj@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="d6d1KVhp94hk3Jrm" Content-Disposition: inline In-Reply-To: <1479901039-7113-10-git-send-email-nikunj@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v1 09/10] target-ppc: add vextu[bhw]lx instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Nikunj A Dadhania Cc: qemu-ppc@nongnu.org, rth@twiddle.net, qemu-devel@nongnu.org, bharata@linux.vnet.ibm.com, Avinesh Kumar --d6d1KVhp94hk3Jrm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 23, 2016 at 05:07:18PM +0530, Nikunj A Dadhania wrote: > From: Avinesh Kumar >=20 > vextublx: Vector Extract Unsigned Byte Left > vextuhlx: Vector Extract Unsigned Halfword Left > vextuwlx: Vector Extract Unsigned Word Left >=20 > Signed-off-by: Avinesh Kumar > Signed-off-by: Nikunj A Dadhania So, when I suggested doing these without helpers before, I had forgotten that the non-byte versions can straddle the word boundary. Given that the offset is in a register, not the instruction that does make it complicated. But, this version also relies on working 128-bit arithmetic, AFAICT this will just fail to build if CONFIG_INT128 isn't defined. It really shouldn't be that hard to make a helper that works just in terms of 64-bit arithmetic - there are only 3 cases (all in the upper word, all in the lower, and straddling). I'd prefer to see it done that way, rather than increasing reliance on CONFIG_INT128. --=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 --d6d1KVhp94hk3Jrm Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJYNjwUAAoJEGw4ysog2bOSc8EQALXp9v8pQkfWxkuP5khos2/d 5gLHHNzLatM9jAvyRzNVSIyahr6EPKhhX4DVBnQ9igOGL5set4xhXPDa1UGA5MQA YZ++4iSaFYZ9iWZQs/zrpxt6JfLCIPQggrp3twXK3BMWHBNR18YWAsFtzWOaiYLv MP1jYY80cd1LWAnE8n6NsAcgwnRzICg7YiKY8tFL6YRids4yEbL5o0jfHpVOEnce 0ytKzbv21gQIoXu1r3FN8H+clZdFQ/qiLeaPIaaiP8UqDaYxWI9dR3wWzg2JkcKp KzIrqDIdLDNZX9yTY+BbaQyA2+8MXwbZSktX5n7Idd9q6KeSSekmkDyaJkSh0LHf 8IVLNSB5SAd5AsPvKjOoCDJvlcSfu20vG9jzY8k17dBT49zgMdzQJIe5H/jeow4L B1V0AK7uv4ikagXPmXNI3rU9A6dXbV7iBANKhZgOcMIiDSeNnaTumJ1tasSFNxze 4TCau5BQHMHKZyENFcGOX8ZGNQVwzZVpSoug/yH0ozalmhJ6kjE4dAXzQXooBOxU o20z7B1YkMPNqCxRppEcpFOHX0L7Qe7pD4C65XA/cBKqGek6lfeL8SEWpAHFiKE/ T5yTw0DUTaPJ5DKST7c9nOjVoWGz1IskyIf2+M/7HwEyY8ZWLD2vUiPL2Y/wi6rn vWZuk4QdE42S4staen+i =YviL -----END PGP SIGNATURE----- --d6d1KVhp94hk3Jrm--