[Bug tdep/29543] [gdb/tdep, ppc] inferior call with long double vararg not handled correctly
uweigand at gcc dot gnu.org
sourceware-bugzilla@sourceware.org
Wed Sep 7 12:10:24 GMT 2022
https://sourceware.org/bugzilla/show_bug.cgi?id=29543
--- Comment #9 from Ulrich Weigand <uweigand at gcc dot gnu.org> ---
(In reply to Tom de Vries from comment #8)
> (In reply to Ulrich Weigand from comment #7)
> > Note it would appear the same problem also exists when handling homogeneous
> > (ELFv2) or single-element (ELFv1) aggregates: these also need 16-byte
> > alignment if the base type is a vector or _Float128 type.
>
> Can you or Carl propose a patch for this additional problem?
It's just a few lines further down in the same function, in the final else
branch:
else
{
ppc64_sysv_abi_push_val (gdbarch, val, TYPE_LENGTH (type), 0, argpos);
[...]
followed by either ppc64_sysv_abi_push_vreg or ppc64_sysv_abi_push_freg.
The problem is that alignment of 0 is only correct in those cases where
ppc64_sysv_abi_push_freg is called - in those cases where
ppc64_sysv_abi_push_vreg is called, we also need to use 16 byte alignment here.
> Alternatively, can you show code examples that fail due this problem?
I haven't tried, but the original test case in the bugzilla should show this
problem if you replace the "long double _Complex" with a single-element struct
with just this type (or just "long double") as element.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the Gdb-prs
mailing list