From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68199 invoked by alias); 28 Aug 2018 16:00:51 -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 67999 invoked by uid 89); 28 Aug 2018 16:00:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: smtp.polymtl.ca Received: from smtp.polymtl.ca (HELO smtp.polymtl.ca) (132.207.4.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 28 Aug 2018 16:00:40 +0000 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id w7SG0Y1r016257 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 Aug 2018 12:00:38 -0400 Received: by simark.ca (Postfix, from userid 112) id F1B8F1E186; Tue, 28 Aug 2018 12:00:33 -0400 (EDT) Received: from simark.ca (localhost [127.0.0.1]) by simark.ca (Postfix) with ESMTP id A74F91E05F; Tue, 28 Aug 2018 12:00:32 -0400 (EDT) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 28 Aug 2018 16:00:00 -0000 From: Simon Marchi To: Alan Hayward Cc: gdb-patches@sourceware.org, nd Subject: Re: [PATCH 1/4] Aarch64: Func to detect args passed in float regs In-Reply-To: References: <20180820092933.83224-1-alan.hayward@arm.com> <20180820092933.83224-2-alan.hayward@arm.com> <5b0e04b204c06e9ca8bab1cfbafdd3f8@polymtl.ca> Message-ID: <374e4a0b72b9c900319acc2071974f8b@polymtl.ca> X-Sender: simon.marchi@polymtl.ca User-Agent: Roundcube Webmail/1.3.6 X-IsSubscribed: yes X-SW-Source: 2018-08/txt/msg00690.txt.bz2 On 2018-08-28 11:49, Alan Hayward wrote: >> On 28 Aug 2018, at 16:43, Simon Marchi >> wrote: >> >> On 2018-08-20 05:29, Alan Hayward wrote: >>> aapcs_is_vfp_call_or_return_candidate is as an eventual replacement >>> for is_hfa_or_hva. >>> This function is based on the GCC code >>> gcc/config/aarch64/aarch64.c:aarch64_vfp_is_call_or_return_candidate >>> () >>> 2018-08-20 Alan Hayward >>> * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro. >>> (aapcs_is_vfp_call_or_return_candidate_1): New function. >>> (aapcs_is_vfp_call_or_return_candidate): Likewise. >> >> I'm not an AArch64 expert, but I didn't spot anything suspicious. The >> documentation >> helps a lot to understand, thanks for that. >> >> >>> +/* Return true if an argument, whose type is described by TYPE, can >>> be passed or >>> + returned in simd/fp registers, providing enough parameter passing >>> registers >>> + are available. This is as described in the AAPCS64. >>> + >>> + Upon successful return, *COUNT returns the number of needed >>> registers, >>> + *FUNDAMENTAL_TYPE contains the type of those registers. >>> + >>> + Candidate as per the AAPCS64 5.4.2.C is either a: >>> + - float. >>> + - short-vector. >>> + - HFA (Homogeneous Floating-point Aggregate, 4.3.5.1). A >>> Composite >>> type where >>> + all the members are floats and has at most 4 members. >>> + - HVA (Homogeneous Short-vector Aggregate, 4.3.5.2). A Composite >>> type where >>> + all the members are short vectors and has at most 4 members. >>> + - Complex (7.1.1) >>> + >>> + Note that HFAs and HVAs can include nested structures and arrays. >>> */ >>> + >>> +bool >> >> static? >> > > Yes, it should be static. But, in this patch nothing calls the > function, which > causes a compile failure. I make it static in patch 2. > A little awkward, but seemed the best way to do it. > > > Alan. Ah, I see. Another option would be to put __attribute__((unused)) temporarily. But I'm fine with what you've done too. Simon