From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122831 invoked by alias); 3 Aug 2015 17:11:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 122817 invoked by uid 89); 3 Aug 2015 17:11:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 03 Aug 2015 17:11:12 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 71AD98F292; Mon, 3 Aug 2015 17:11:11 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t73HB9v4004003; Mon, 3 Aug 2015 13:11:10 -0400 Message-ID: <55BFA0AD.5000408@redhat.com> Date: Mon, 03 Aug 2015 17:11:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH 2/7] New regs_info for aarch32 References: <1438355801-25798-1-git-send-email-yao.qi@linaro.org> <1438355801-25798-3-git-send-email-yao.qi@linaro.org> <55BF7383.5030304@redhat.com> <55BF980F.5010306@gmail.com> In-Reply-To: <55BF980F.5010306@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-08/txt/msg00036.txt.bz2 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