From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55636) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9pBG-00032Z-69 for qemu-devel@nongnu.org; Thu, 24 Nov 2016 03:14:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9pBD-0006Pf-16 for qemu-devel@nongnu.org; Thu, 24 Nov 2016 03:14:54 -0500 Sender: Richard Henderson References: <1479901039-7113-1-git-send-email-nikunj@linux.vnet.ibm.com> <1479901039-7113-10-git-send-email-nikunj@linux.vnet.ibm.com> <20161124010212.GK17795@umbus.fritz.box> <878ts9xw2i.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> From: Richard Henderson Message-ID: <0331c36b-f131-5aa5-d963-410c3ff96716@twiddle.net> Date: Thu, 24 Nov 2016 09:14:46 +0100 MIME-Version: 1.0 In-Reply-To: <878ts9xw2i.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit 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 , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, bharata@linux.vnet.ibm.com, Avinesh Kumar On 11/24/2016 06:53 AM, Nikunj A Dadhania wrote: > David Gibson writes: > >> [ Unknown signature status ] >> On Wed, Nov 23, 2016 at 05:07:18PM +0530, Nikunj A Dadhania wrote: >>> From: Avinesh Kumar >>> >>> vextublx: Vector Extract Unsigned Byte Left >>> vextuhlx: Vector Extract Unsigned Halfword Left >>> vextuwlx: Vector Extract Unsigned Word Left >>> >>> 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 has both the implementation, just that the defines might have > confused you: > > #if defined(HOST_WORDS_BIGENDIAN) > > # if defined(CONFIG_INT128) > # else > # endif > > #else /* !defined (HOST_WORDS_BIGENDIAN) */ > > # if defined(CONFIG_INT128) > # else > # endif > > #endif In include/qemu/int128.h, we do have int128_rshift. So you don't *really* have to do this by hand, exactly. r~