This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 2/7] New regs_info for aarch32
- From: Pedro Alves <palves at redhat dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>, gdb-patches at sourceware dot org
- Date: Mon, 03 Aug 2015 18:11:09 +0100
- Subject: Re: [PATCH 2/7] New regs_info for aarch32
- Authentication-results: sourceware.org; auth=none
- References: <1438355801-25798-1-git-send-email-yao dot qi at linaro dot org> <1438355801-25798-3-git-send-email-yao dot qi at linaro dot org> <55BF7383 dot 5030304 at redhat dot com> <55BF980F dot 5010306 at gmail dot com>
On 08/03/2015 05:34 PM, Yao Qi wrote:
>
>
> On 03/08/15 14:58, Pedro Alves wrote:
>> Why weren't these moved as well? At first,
>>
>>>> - init_registers_arm_with_vfpv2 ();
>>>> - init_registers_arm_with_vfpv3 ();
>>>> - init_registers_arm_with_neon ();
>>>> +
>>>> + initialize_low_arch_aarch32 ();
>> I thought that this was because aarch64 doesn't
>> do the old iwmmxt, but then in the following patch you
>> have this anyway:
>
> Yes, aarch64 doesn't support iwmmxt.
>
>>
>>>> void
>>>> initialize_low_arch_aarch32 (void)
>>>> {
>>>> +#ifndef __aarch64__
>>>> init_registers_arm_with_vfpv2 ();
>>>> init_registers_arm_with_vfpv3 ();
>>>> +#endif
>>>> init_registers_arm_with_neon ();
>>>>
>> So I don't understand when/where to initialize arm32
>> descriptions going forward.
>
> Sorry, I am not sure I understand your question.
>
> initialize_low_arch_aarch32 is called from
> linux-arm-low.c and linux-aarch64-low.c for arm and aarch64
> target respectively. For aarch64, we initialize arm_with_neon
> while for arm, we initialize arm_with_vfpv2 and arm_with_vfpv3
> additionally.
>
Let me try putting it another way then.
Why are some init_registers_arm_XXX calls done in
linux-aarch32-low.c:initialize_low_arch_aarch32 but others
in linux-arm-low.c:initialize_low_arch?
If we already end up with __aarch64__ #ifdefs, shouldn't the resulting
code end like this?
void
initialize_low_arch_aarch32 (void)
{
#ifndef __aarch64__
init_registers_arm ();
init_registers_arm_with_iwmmxt ();
init_registers_arm_with_vfpv2 ();
init_registers_arm_with_vfpv3 ();
#endif
init_registers_arm_with_neon ();
}
Isn't aarch32 the term used for all 32-bit execution state,
including pre-ARMv8? Otherwise, going forward, what is the
guideline to know where to put a new
init_registers_arm_xxx call?
Thanks,
Pedro Alves