mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
libffi: fix handling of homogeneous float128 structs (#689)
If there is a homogeneous struct with float128 members, they should be copied to vector register save area. The current code incorrectly copies only the value of the first member, not increasing the pointer with each iteration. Fix this. Merged from upstream libffi commit: 464b4b66e3cf3b5489e730c1466ee1bf825560e0 2023-05-03 Dan Horák <dan@danny.cz> libffi/ PR libffi/109447 * src/powerpc/ffi_linux64.c (ffi_prep_args64): Update arg.f128 pointer.
This commit is contained in:
@@ -680,7 +680,7 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
||||
{
|
||||
if (vecarg_count < NUM_VEC_ARG_REGISTERS64
|
||||
&& i < nfixedargs)
|
||||
memcpy (vec_base.f128++, arg.f128, sizeof (float128));
|
||||
memcpy (vec_base.f128++, arg.f128++, sizeof (float128));
|
||||
else
|
||||
memcpy (next_arg.f128, arg.f128++, sizeof (float128));
|
||||
if (++next_arg.f128 == gpr_end.f128)
|
||||
|
||||
Reference in New Issue
Block a user