public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Aarch64: Correctly support args passed in float registers.
@ 2018-08-20  9:29 Alan Hayward
  2018-08-20  9:29 ` [PATCH 1/4] Aarch64: Func to detect args passed in float regs Alan Hayward
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Alan Hayward @ 2018-08-20  9:29 UTC (permalink / raw)
  To: gdb-patches; +Cc: nd, Alan Hayward

GDB currently does not adhere to the AAPCS spec when passing structures that
contain float arguments. It works for simple structures but does not correctly
detect nested structures.
This is shown by the failing tests in the recently added
infcall-nested-structs.exp. See PR gdb/22943.

Patch 1 contains a new function for correctly detecting float args.
I wrote this by taking the equivalent function in GCC and modifying it until
it fit into GDB, then simplified and cleaned up.
Patches 2 and 3 then use this function.

Patch 4 extends the infcall-nested-structs test to cover structures with 4
and 5 fields - 4 fields is the maximum number of fields that can be passed
via float args.

For the full spec see:
http://infocenter.arm.com/help/topic/com.arm.doc.ihi0042f/IHI0042F_aapcs.pdf


Alan Hayward (4):
  Aarch64: Add function to detect args passed in float registers
  Aarch64: Float register detection for _push_dummy_call
  Aarch64: Float register detection for return values.
  infcall-nested-structs: Test up to five fields

 gdb/aarch64-tdep.c                                | 444 ++++++++++++----------
 gdb/testsuite/gdb.base/infcall-nested-structs.c   | 168 +++++---
 gdb/testsuite/gdb.base/infcall-nested-structs.exp |   5 +-
 3 files changed, 366 insertions(+), 251 deletions(-)

-- 
2.15.2 (Apple Git-101.1)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2018-08-28 16:52 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-20  9:29 [PATCH 0/4] Aarch64: Correctly support args passed in float registers Alan Hayward
2018-08-20  9:29 ` [PATCH 1/4] Aarch64: Func to detect args passed in float regs Alan Hayward
2018-08-28 15:43   ` Simon Marchi
2018-08-28 15:49     ` Alan Hayward
2018-08-28 16:00       ` Simon Marchi
2018-08-20  9:30 ` [PATCH 4/4] infcall-nested-structs: Test up to five fields Alan Hayward
2018-08-28 16:52   ` Simon Marchi
2018-08-20  9:30 ` [PATCH 3/4] Aarch64: Float register detection for return values Alan Hayward
2018-08-28 16:03   ` Simon Marchi
2018-08-20  9:30 ` [PATCH 2/4] Aarch64: Float register detection for _push_dummy_call Alan Hayward
2018-08-28 15:58   ` Simon Marchi
2018-08-28  9:39 ` [Ping][PATCH 0/4] Aarch64: Correctly support args passed in float registers Alan Hayward

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).