[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v1 02/22] target-arm: Make elr_el1 an array
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v1 02/22] target-arm: Make elr_el1 an array |
Date: |
Fri, 16 May 2014 15:19:36 +0100 |
On 8 May 2014 01:13, Edgar E. Iglesias <address@hidden> 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
>> <address@hidden> wrote:
>> > From: "Edgar E. Iglesias" <address@hidden>
>> >
>> > No functional change.
>> > Prepares for future additions of the EL2 and 3 versions of this reg.
>> >
>> > Signed-off-by: Edgar E. Iglesias <address@hidden>
>> > ---
>> > 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.
thanks
-- PMM
[Qemu-devel] [PATCH v1 03/22] target-arm: Make esr_el1 an array, Edgar E. Iglesias, 2014/05/06
[Qemu-devel] [PATCH v1 04/22] target-arm: c12_vbar -> vbar_el[], Edgar E. Iglesias, 2014/05/06
[Qemu-devel] [PATCH v1 05/22] target-arm: Add arm_el_to_mmu_idx(), Edgar E. Iglesias, 2014/05/06