From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33002) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlQTv-00073V-8c for qemu-devel@nongnu.org; Fri, 16 May 2014 18:20:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WlQTo-0007Ds-0O for qemu-devel@nongnu.org; Fri, 16 May 2014 18:19:59 -0400 Received: from mail-pb0-x234.google.com ([2607:f8b0:400e:c01::234]:64676) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WlQTn-0007Do-QK for qemu-devel@nongnu.org; Fri, 16 May 2014 18:19:51 -0400 Received: by mail-pb0-f52.google.com with SMTP id rr13so3155417pbb.39 for ; Fri, 16 May 2014 15:19:51 -0700 (PDT) Date: Sat, 17 May 2014 08:19:31 +1000 From: "Edgar E. Iglesias" Message-ID: <20140516221930.GE18802@zapo.iiNet> References: <1399356506-5609-1-git-send-email-edgar.iglesias@gmail.com> <1399356506-5609-3-git-send-email-edgar.iglesias@gmail.com> <20140508001328.GE7381@hostname> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Qemu-devel] [PATCH v1 02/22] target-arm: Make elr_el1 an array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Rob Herring , Peter Crosthwaite , "qemu-devel@nongnu.org Developers" , Alexander Graf , John Williams , Alex =?iso-8859-1?Q?Benn=E9e?= On Fri, May 16, 2014 at 03:19:36PM +0100, Peter Maydell wrote: > On 8 May 2014 01:13, Edgar E. Iglesias wrote: > > On Wed, May 07, 2014 at 03:10:54PM +1000, Peter Crosthwaite wrote: > >> On Tue, May 6, 2014 at 4:08 PM, Edgar E. Iglesias > >> wrote: > >> > From: "Edgar E. Iglesias" > >> > > >> > No functional change. > >> > Prepares for future additions of the EL2 and 3 versions of this reg. > >> > > >> > Signed-off-by: Edgar E. Iglesias > >> > --- > >> > target-arm/cpu.h | 3 ++- > >> > target-arm/helper-a64.c | 4 ++-- > >> > target-arm/helper.c | 3 ++- > >> > target-arm/kvm64.c | 4 ++-- > >> > target-arm/machine.c | 2 +- > >> > target-arm/op_helper.c | 6 +++--- > >> > 6 files changed, 12 insertions(+), 10 deletions(-) > >> > > >> > diff --git a/target-arm/cpu.h b/target-arm/cpu.h > >> > index c83f249..eb7a0f5 100644 > >> > --- a/target-arm/cpu.h > >> > +++ b/target-arm/cpu.h > >> > @@ -162,7 +162,8 @@ typedef struct CPUARMState { > >> > uint32_t condexec_bits; /* IT bits. cpsr[15:10,26:25]. */ > >> > uint64_t daif; /* exception masks, in the bits they are in in PSTATE */ > >> > > >> > - uint64_t elr_el1; /* AArch64 ELR_EL1 */ > >> > +#define ELR_EL_IDX(x) (x - 1) > >> > + uint64_t elr_el[1]; /* AArch64 exception link regs */ > >> > >> Is it perhaps just easier to waste the space and always pad these > >> EL-banked CP arrays out to length 4 you can just use literal numbers > >> in the code? Probably make life easier when introspecting the CPU > >> state in GDB too. > > > > Thanks Peter, > > > > I've fixed all your comments except this one. I considered this > > pattern but avoided it due to the bloating of CPUARMState. Anyway, > > I'm happy to change to this full array allocation if others agree. > > > > PMM, what is your preference on this? > > I think I'd rather we just padded the array to length 4. Sounds good, I'll change the pattern. Cheers, Edgar