From: Pedro Alves <palves@redhat.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/7] New regs_info for aarch32
Date: Tue, 04 Aug 2015 10:11:00 -0000 [thread overview]
Message-ID: <55C08FDD.30703@redhat.com> (raw)
In-Reply-To: <86614ve5z5.fsf@gmail.com>
On 08/04/2015 10:51 AM, Yao Qi wrote:
> Pedro Alves <palves@redhat.com> writes:
>
>> 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?
>
> aarch32 means armv7+neon,
Ah.
> so ideally we only need call
> init_registers_arm_with_neon for aarch32. However, arm_store_vfpregset
> and arm_fill_vfpregset need to check tdesc_arm_with_vfpv3 and
> tdesc_arm_with_vfpv2, so we need to call init_registers_arm_with_vfpv2
> and init_registers_arm_with_vfpv3 to init them. That is the reason I
> call them inside initialize_low_arch_aarch32.
>
> I agree the "#ifndef __aarch64__" is confusing, and let me remove that
> block out of initialize_low_arch_aarch32. The patch below is updated to
> initialize arm_with_neon target description in
> linux-aarch32-low.c:initialize_low_arch_aarch32, and leave vfpv2 and
> vfpv3 target descriptions inside linux-arm-low.c. This is cleaner than
> the previous version. As a result, patch 3/7 is cleaner too, because
> "#ifndef __aarch64__" is not needed anymore.
>
Nice.
> The guideline of adding new arm targets in my mind is if new arm target
> can be run on aarch32 (32-bit mode on aarch64), it should be initialized
> in initialize_low_arch_aarch32. If new arm target can't be run on
> 32-bit mode on aarch64, it should be initialized in
> linux-arm-low.c:initialize_low_arch.
>
OK, that makes sense. This version looks good to me. Thanks!
--
Pedro Alves
next prev parent reply other threads:[~2015-08-04 10:11 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-31 15:17 [PATCH 0/7] Aarch64 linux GDB remote multi-arch debugging Yao Qi
2015-07-31 15:16 ` [PATCH 1/7] Move have_ptrace_getregset to linux-low.c Yao Qi
2015-07-31 15:17 ` [PATCH 4/7] Get and set PC correctly on aarch64 in multi-arch Yao Qi
2015-07-31 15:17 ` [PATCH 2/7] New regs_info for aarch32 Yao Qi
2015-08-03 13:58 ` Pedro Alves
2015-08-03 16:34 ` Yao Qi
2015-08-03 17:11 ` Pedro Alves
2015-08-04 9:52 ` Yao Qi
2015-08-04 10:11 ` Pedro Alves [this message]
2015-08-11 19:40 ` Joel Brobecker
2015-08-18 15:21 ` Yao Qi
2015-08-18 22:42 ` Joel Brobecker
2015-07-31 15:17 ` [PATCH 5/7] Disable Z0 packet on aarch64 on multi-arch debugging Yao Qi
2015-07-31 15:17 ` [PATCH 6/7] Disable tracepoint support for aarch32 Yao Qi
2015-07-31 15:17 ` [PATCH 3/7] Use arm target description and regs_info for 32-bit file on aarch64 GDBserver Yao Qi
2015-08-04 13:44 ` Yao Qi
2015-07-31 15:17 ` [PATCH 7/7] Mention multi-arch debugging support in NEWS Yao Qi
2015-08-19 8:26 ` Yao Qi
2015-09-04 14:30 ` Yao Qi
2015-08-03 14:00 ` [PATCH 0/7] Aarch64 linux GDB remote multi-arch debugging Pedro Alves
2015-08-04 13:41 ` Yao Qi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55C08FDD.30703@redhat.com \
--to=palves@redhat.com \
--cc=gdb-patches@sourceware.org \
--cc=qiyaoltc@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox