From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 38065 invoked by alias); 8 Nov 2018 15:34:52 -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 37252 invoked by uid 89); 8 Nov 2018 15:34:51 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 08 Nov 2018 15:34:50 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 97B9856013; Thu, 8 Nov 2018 10:34:48 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id UOR6qrvSjdlG; Thu, 8 Nov 2018 10:34:48 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6E68B56009; Thu, 8 Nov 2018 10:34:48 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id A2BD8828EA; Thu, 8 Nov 2018 07:34:46 -0800 (PST) Date: Thu, 08 Nov 2018 15:34:00 -0000 From: Joel Brobecker To: Alan Hayward Cc: GDB Patches , nd Subject: Re: [RFA] (AArch64) wrong value returned by "finish" for HFA Message-ID: <20181108153446.GC18647@adacore.com> References: <1541632206-143680-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) X-SW-Source: 2018-11/txt/msg00121.txt.bz2 > Apologies, this was my goof. Fix looks good to me. Thank you. Considering that I really like what you did to the code in that respect, please do not apologize! ;-) > > gdb/ChangeLog: > > > > * aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): > > return the correct count for potential HFAs. > > > > Tested on aarch64-linux, fixes: > > > > array_return.exp: value printed by finish of Create_Small_Float_Vector Pushed to master. > I had to install gnat to test this (which is probably why I never > spotted the fail before). I don't think it was passing before either. AdaCore had a local patch to handle this that Tristan tried to submit. But, at the time, all we could do to validate it was run it through AdaCore's testsuite, and the maintainer at the time asked that it be run through the official testsuite, which would have required a bit of up-front work that we never got around to doing. This time around, one of my coworkers had a compiler handy for me, so it was less effort :). > Ideally, this case should have been tested > as part of gdb.base/infcall-nested-structs.exp. I thought about that and got started on writing a C testcase for it. Except that C doesn't allow return values that are arrays. But thinking about it more, with AArch64, we have the advantage that the calling convention for return values are the same as for arguments, so we could exercise the same scenario using an inferior function call with one argument being an array of floats! -- Joel