From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55634) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiBsw-00010H-1w for qemu-devel@nongnu.org; Wed, 07 May 2014 20:08:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WiBsp-0001aC-TC for qemu-devel@nongnu.org; Wed, 07 May 2014 20:08:25 -0400 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]:49233) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WiBsp-0001a8-LP for qemu-devel@nongnu.org; Wed, 07 May 2014 20:08:19 -0400 Received: by mail-pa0-f48.google.com with SMTP id rd3so1842745pab.35 for ; Wed, 07 May 2014 17:08:18 -0700 (PDT) Date: Thu, 8 May 2014 00:08:25 +0000 From: "Edgar E. Iglesias" Message-ID: <20140508000825.GD7381@hostname> References: <1399356506-5609-1-git-send-email-edgar.iglesias@gmail.com> <1399356506-5609-2-git-send-email-edgar.iglesias@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 01/22] target-arm: A64: Add friendly logging of PSTATE A and I flags List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Rob Herring , Peter Crosthwaite , QEMU Developers , Alexander Graf , John Williams , Alex =?iso-8859-1?Q?Benn=E9e?= On Wed, May 07, 2014 at 09:50:27AM +0100, Peter Maydell wrote: > On 6 May 2014 07:08, Edgar E. Iglesias wrote: > > From: "Edgar E. Iglesias" > > > > Signed-off-by: Edgar E. Iglesias > > --- > > target-arm/translate-a64.c | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/target-arm/translate-a64.c b/target-arm/translate-a64.c > > index b62db4d..4f8246f 100644 > > --- a/target-arm/translate-a64.c > > +++ b/target-arm/translate-a64.c > > @@ -137,8 +137,10 @@ void aarch64_cpu_dump_state(CPUState *cs, FILE *f, > > cpu_fprintf(f, " "); > > } > > } > > - cpu_fprintf(f, "PSTATE=%08x (flags %c%c%c%c)\n", > > + cpu_fprintf(f, "PSTATE=%08x (flags %c%c%c%c%c%c)\n", > > psr, > > + psr & PSTATE_A ? 'A' : '-', > > + psr & PSTATE_I ? 'I' : '-', > > psr & PSTATE_N ? 'N' : '-', > > psr & PSTATE_Z ? 'Z' : '-', > > psr & PSTATE_C ? 'C' : '-', > > Why A and I ? In particular in QEMU the A bit is always zero > because we don't do System Errors (aka asynchronous > external aborts), and it's weird to show I but not F. The > idea of splitting out NZCV is really that (as with the A32/T32 > state dump) they're the most useful bits for immediately > figuring out code flow); anything else you can fish out of > the hex value by hand if you really need it. I think you can > make a case for "decode only a small set of key bits" or > for "completely decode the whole register", but I'm not > sure adding only two more bits makes sense. Hi, TBH I didn't give this much thought. I used the I flag while debugging some virq stuff and probably added A while stumbling in the dark at some point.. For v2 I've added the DAIF flags with delimiter if thats not good enough I suggest removing the patch, it's not very important. Cheers, Edgar