From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blu0S-0001kd-LV for qemu-devel@nongnu.org; Mon, 19 Sep 2016 04:32:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1blu0O-0006l5-AJ for qemu-devel@nongnu.org; Mon, 19 Sep 2016 04:32:51 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:52102 helo=mx0a-001b2d01.pphosted.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1blu0O-0006kv-5k for qemu-devel@nongnu.org; Mon, 19 Sep 2016 04:32:48 -0400 Received: from pps.filterd (m0098421.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8J8SBmW145997 for ; Mon, 19 Sep 2016 04:32:47 -0400 Received: from e23smtp08.au.ibm.com (e23smtp08.au.ibm.com [202.81.31.141]) by mx0a-001b2d01.pphosted.com with ESMTP id 25h1u75wgw-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 19 Sep 2016 04:32:47 -0400 Received: from localhost by e23smtp08.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Sep 2016 18:32:44 +1000 From: Nikunj A Dadhania In-Reply-To: <20160919061934.GC20488@umbus> References: <1474023111-11992-1-git-send-email-nikunj@linux.vnet.ibm.com> <1474023111-11992-3-git-send-email-nikunj@linux.vnet.ibm.com> <20160919061934.GC20488@umbus> Date: Mon, 19 Sep 2016 14:02:38 +0530 MIME-Version: 1.0 Content-Type: text/plain Message-Id: <871t0gmgrd.fsf@abhimanyu.i-did-not-set--mail-host-address--so-tickle-me> Subject: Re: [Qemu-devel] [PATCH v3 2/5] target-ppc: improve lxvw4x implementation List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson Cc: qemu-ppc@nongnu.org, rth@twiddle.net, qemu-devel@nongnu.org, benh@kernel.crashing.org David Gibson writes: > [ Unknown signature status ] > On Fri, Sep 16, 2016 at 04:21:48PM +0530, Nikunj A Dadhania wrote: >> Load 8byte at a time and manipulate. >> >> Signed-off-by: Nikunj A Dadhania >> --- >> target-ppc/helper.h | 1 + >> target-ppc/mem_helper.c | 5 +++++ >> target-ppc/translate/vsx-impl.inc.c | 19 +++++-------------- >> 3 files changed, 11 insertions(+), 14 deletions(-) >> >> diff --git a/target-ppc/helper.h b/target-ppc/helper.h >> index 966f2ce..9f6705d 100644 >> --- a/target-ppc/helper.h >> +++ b/target-ppc/helper.h >> @@ -297,6 +297,7 @@ DEF_HELPER_2(mtvscr, void, env, avr) >> DEF_HELPER_3(lvebx, void, env, avr, tl) >> DEF_HELPER_3(lvehx, void, env, avr, tl) >> DEF_HELPER_3(lvewx, void, env, avr, tl) >> +DEF_HELPER_1(deposit32x2, i64, i64) >> DEF_HELPER_3(stvebx, void, env, avr, tl) >> DEF_HELPER_3(stvehx, void, env, avr, tl) >> DEF_HELPER_3(stvewx, void, env, avr, tl) >> diff --git a/target-ppc/mem_helper.c b/target-ppc/mem_helper.c >> index 6548715..86e493e 100644 >> --- a/target-ppc/mem_helper.c >> +++ b/target-ppc/mem_helper.c >> @@ -285,6 +285,11 @@ STVE(stvewx, cpu_stl_data_ra, bswap32, u32) >> #undef I >> #undef LVE >> >> +uint64_t helper_deposit32x2(uint64_t x) >> +{ >> + return deposit64((x >> 32), 32, 32, (x)); >> +} > > It seems a shame to drop out to a helper for something this simple. > How hard would it be to implement this.. wordswap, I guess you'd call > it.. in tcg ops? There is a tcg_ops for deposit64, I need to do the shifting and call it. I will change that. > I'm also not particularly fond of the deposit32x2 name, though a > better one doesn't quickly come to mind. Regards Nikunj