From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:32953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpSWo-0002xx-TY for qemu-devel@nongnu.org; Thu, 29 Sep 2016 00:00:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpSWk-0008JK-Uo for qemu-devel@nongnu.org; Thu, 29 Sep 2016 00:00:58 -0400 Sender: Richard Henderson References: <1475041518-9757-1-git-send-email-raji@linux.vnet.ibm.com> <1475041518-9757-2-git-send-email-raji@linux.vnet.ibm.com> <20160929020745.GE8390@umbus.fritz.box> From: Richard Henderson Message-ID: <6c666347-fa50-a824-b8bb-8a6f31f454e5@twiddle.net> Date: Wed, 28 Sep 2016 21:00:51 -0700 MIME-Version: 1.0 In-Reply-To: <20160929020745.GE8390@umbus.fritz.box> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 1/6] target-ppc: add vmul10[u, eu, cu, ecu]q instructions List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: David Gibson , Rajalakshmi Srinivasaraghavan Cc: qemu-ppc@nongnu.org, qemu-devel@nongnu.org, nikunj@linux.vnet.ibm.com, benh@kernel.crashing.org, Vasant Hegde On 09/28/2016 07:07 PM, David Gibson wrote: >> + tcg_gen_mulu2_i64(t0, t1, cpu_avrl[rA(ctx->opcode)], val); \ > > Do you really want to be using an actual mul op, rather than (in << 3) > + (in << 1)? Obviously working out al the carries correctly will be a > bit fiddly. I think it's fine. Modern hardware will do the double-word multiply in 3-5 cycles, which is probably equal to what we could do by hand with shifts. r~