From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=36016 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PnwPQ-0004KF-7M for qemu-devel@nongnu.org; Fri, 11 Feb 2011 12:03:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PnwPO-0003al-N1 for qemu-devel@nongnu.org; Fri, 11 Feb 2011 12:03:51 -0500 Received: from mail.codesourcery.com ([38.113.113.100]:38789) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PnwPO-0003Zd-9a for qemu-devel@nongnu.org; Fri, 11 Feb 2011 12:03:50 -0500 Date: Fri, 11 Feb 2011 09:03:47 -0800 From: Nathan Froyd Subject: Re: [Qemu-devel] [PATCH 1/2] target-arm: Move Neon VUZP to a helper function Message-ID: <20110211170346.GP6247@codesourcery.com> References: <1297440841-17979-1-git-send-email-peter.maydell@linaro.org> <1297440841-17979-2-git-send-email-peter.maydell@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org, patches@linaro.org On Fri, Feb 11, 2011 at 04:53:30PM +0000, Peter Maydell wrote: > On 11 February 2011 16:14, Peter Maydell wrote: > > +void HELPER(neon_unzip)(CPUState *env, uint32_t insn) > > +{ > > +    int rd = ((insn >> 18) & 0x10) | ((insn >> 12) & 0x0f); > > +    int rm = ((insn >> 1) & 0x10) | (insn & 0x0f); > > +    int size = (insn >> 18) & 3; > > +    if (insn & 0x40) { /* Q */ > > +        uint64_t zm0 = float64_val(env->vfp.regs[rm]); > > +        uint64_t zm1 = float64_val(env->vfp.regs[rm + 1]); > > +        uint64_t zd0 = float64_val(env->vfp.regs[rd]); > > +        uint64_t zd1 = float64_val(env->vfp.regs[rd + 1]); > > I can rework these patches if people don't like the way this is > effectively doing decoding in a helper function, incidentally, > although I'm not convinced it would end up any nicer overall. I do think the preferred way would be to extract rd, rm, size, and Q up-front, rather than having the helper twiddle instruction bits. -Nathan