This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA] (AArch64) wrong value returned by "finish" for HFA


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]