Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Alan Hayward <Alan.Hayward@arm.com>
Cc: GDB Patches <gdb-patches@sourceware.org>, nd <nd@arm.com>
Subject: Re: [RFA] (AArch64) wrong value returned by "finish" for HFA
Date: Thu, 08 Nov 2018 15:34:00 -0000	[thread overview]
Message-ID: <20181108153446.GC18647@adacore.com> (raw)
In-Reply-To: <EBC7E118-2581-4A56-9100-B490B4B8256E@arm.com>

> 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


      reply	other threads:[~2018-11-08 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-07 23:10 Joel Brobecker
2018-11-08 10:18 ` Alan Hayward
2018-11-08 15:34   ` Joel Brobecker [this message]

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=20181108153446.GC18647@adacore.com \
    --to=brobecker@adacore.com \
    --cc=Alan.Hayward@arm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=nd@arm.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