From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39943) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu3CE-0000BN-Om for qemu-devel@nongnu.org; Fri, 20 Dec 2013 11:45:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vu3C8-0002sp-W5 for qemu-devel@nongnu.org; Fri, 20 Dec 2013 11:45:06 -0500 Received: from mail-qa0-x234.google.com ([2607:f8b0:400d:c00::234]:50228) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vu3C8-0002sl-R2 for qemu-devel@nongnu.org; Fri, 20 Dec 2013 11:45:00 -0500 Received: by mail-qa0-f52.google.com with SMTP id cm18so2805026qab.18 for ; Fri, 20 Dec 2013 08:45:00 -0800 (PST) Sender: Richard Henderson Message-ID: <52B47407.9090603@twiddle.net> Date: Fri, 20 Dec 2013 08:44:55 -0800 From: Richard Henderson MIME-Version: 1.0 References: <1387293144-11554-1-git-send-email-peter.maydell@linaro.org> <1387293144-11554-3-git-send-email-peter.maydell@linaro.org> <52B33112.7090700@twiddle.net> <52B46FA4.8070705@twiddle.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 02/21] target-arm: A64: add support for ld/st unsigned imm List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Laurent Desnogues , Patch Tracking , Michael Matz , QEMU Developers , Claudio Fontana , Dirk Mueller , Will Newton , =?UTF-8?B?QWxleCBCZW5uw6ll?= , "kvmarm@lists.cs.columbia.edu" , Christoffer Dall On 12/20/2013 08:29 AM, Peter Maydell wrote: > On 20 December 2013 16:26, Richard Henderson wrote: >> On 12/20/2013 08:08 AM, Peter Maydell wrote: >>>> In particular, opc = 2 && size = 2 should be unallocated. >>> >>> This is LDRSW (immediate), not unallocated, isn't it? >>> >>> I agree the decode logic isn't laid out the same as the ARM ARM, >>> but I'm pretty sure it's correct. >> >> Oops, typo: opc=3 && size=2. Basically, >> >> >> if opc<1> == '0' then >> // store or zero-extending load >> memop = if opc<0> == '1' then MemOp_LOAD else MemOp_STORE; >> regsize = if size == '11' then 64 else 32; >> signed = FALSE; >> else >> if size == '11' then >> memop = MemOp_PREFETCH; >> if opc<0> == '1' then UnallocatedEncoding(); >> else >> // sign-extending load >> memop = MemOp_LOAD; >> if size == '10' && opc<0> == '1' then UnallocatedEncoding(); >> >> this one ----^ > > + if (size == 3 && opc == 2) { > + /* PRFM - prefetch */ > + return; > + } > + if (opc == 3 && size > 1) { > + unallocated_encoding(s); > + return; > + } > + is_store = (opc == 0); > + is_signed = opc & (1<<1); > + is_extended = (size < 3) && (opc & 1); > > That is caught by 'if (opc == 3 && size > 1)'. Ah, right. In which case, patches 2, 3, 4 get Reviewed-by: Richard Henderson r~