AArch64 AAPCS: Empty structs have non zero size in C++
authorAlan Hayward <alan.hayward@arm.com>
Mon, 21 Jan 2019 15:51:49 +0000 (15:51 +0000)
committerAlan Hayward <alan.hayward@arm.com>
Mon, 21 Jan 2019 15:51:49 +0000 (15:51 +0000)
commit73021deb50855f31bb312241899a464c62155f6a
tree244743e4b0361fb6426946c1dfe9567a1ec64f53
parenta6c9b4042921847ee52003811383e4b8bf5d5875
AArch64 AAPCS: Empty structs have non zero size in C++

When gdb.base/infcall-nested-structs.c is complied as C++, the compiler
will not pass structs containing empty structs via float arguments.
This is because structs in C++ have a minimum size of 1, causing padding
in the struct once compiled.  The AAPCS does not allow structs with
padding to be passed in float arguments.

Add padding checks to AArch64 and add C++ compile variant to the test.

Some of the tests fail on X86_64. This has been raised as bug gdb/24104.

gdb/ChangeLog:

* aarch64-tdep.c (aapcs_is_vfp_call_or_return_candidate_1): Check
for padding.

gdb/testsuite/ChangeLog:

* gdb.base/infcall-nested-structs.exp: Test C++ in addition to C.
gdb/ChangeLog
gdb/aarch64-tdep.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/infcall-nested-structs.exp
This page took 0.028264 seconds and 4 git commands to generate.