From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33205) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vszdc-0000rg-9b for qemu-devel@nongnu.org; Tue, 17 Dec 2013 13:45:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VszdW-0007Vy-FV for qemu-devel@nongnu.org; Tue, 17 Dec 2013 13:45:00 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:60651) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VszdW-0007Vu-9K for qemu-devel@nongnu.org; Tue, 17 Dec 2013 13:44:54 -0500 Received: by mail-pd0-f177.google.com with SMTP id q10so7109966pdj.22 for ; Tue, 17 Dec 2013 10:44:53 -0800 (PST) Date: Tue, 17 Dec 2013 10:44:52 -0800 From: Christoffer Dall Message-ID: <20131217184452.GM5711@cbox> References: <1385645602-18662-1-git-send-email-peter.maydell@linaro.org> <1385645602-18662-3-git-send-email-peter.maydell@linaro.org> <20131216233932.GB5711@cbox> <20131217044546.GH5711@cbox> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH 2/7] target-arm: Clean up handling of AArch64 PSTATE List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Patch Tracking , QEMU Developers , "kvmarm@lists.cs.columbia.edu" On Tue, Dec 17, 2013 at 11:42:42AM +0000, Peter Maydell wrote: > On 17 December 2013 04:45, Christoffer Dall wrote: > > I think this could be written slightly more clearly for the uninitiated, > > but maybe I'm just not qemu-savy enough. > > It was a bit compressed; I've reworded it to: > /* PSTATE isn't an architectural register for ARMv8. However, it is > * convenient for us to assemble the underlying state into a 32 bit format > * identical to the architectural format used for the SPSR. (This is also > * what the Linux kernel's 'pstate' field in signal handlers and KVM's > * 'pstate' register are.) Of the PSTATE bits: > * NZCV are kept in the split out env->CF/VF/NF/ZF, (which have the same > * semantics as for AArch32, as described in the comments on each field) > * nRW (also known as M[4]) is kept, inverted, in env->aarch64 > * all other bits are stored in their correct places in env->pstate > */ > Much clearer, thanks! -- Christoffer