From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1c9pJF-0004ZK-DH for qemu-devel@nongnu.org; Thu, 24 Nov 2016 03:23:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1c9pJC-0002Gn-8l for qemu-devel@nongnu.org; Thu, 24 Nov 2016 03:23:09 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52589 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1c9pJC-0002GX-0q for qemu-devel@nongnu.org; Thu, 24 Nov 2016 03:23:06 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id uAO8IYMk137232 for ; Thu, 24 Nov 2016 03:23:05 -0500 Received: from e23smtp05.au.ibm.com (e23smtp05.au.ibm.com [202.81.31.147]) by mx0b-001b2d01.pphosted.com with ESMTP id 26wdvudcys-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Thu, 24 Nov 2016 03:23:04 -0500 Received: from localhost by e23smtp05.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 24 Nov 2016 18:23:02 +1000 From: Nikunj A Dadhania In-Reply-To: <0331c36b-f131-5aa5-d963-410c3ff96716@twiddle.net> 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> <0331c36b-f131-5aa5-d963-410c3ff96716@twiddle.net> Date: Thu, 24 Nov 2016 13:52:53 +0530 MIME-Version: 1.0 Content-Type: text/plain Message-Id: <87wpftwale.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> 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: Richard Henderson , David Gibson Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, bharata@linux.vnet.ibm.com, Avinesh Kumar Richard Henderson writes: > 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. Sure, let me add int128_extract as well. Will be helpful. Regards Nikunj