diff options
author | Dan HorĂ¡k <dan@danny.cz> | 2022-01-31 14:08:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-31 08:08:09 -0500 |
commit | 464b4b66e3cf3b5489e730c1466ee1bf825560e0 (patch) | |
tree | 5af6028e1956e3a8fdc3c21d20d9d3857bbe1d3b /src | |
parent | b60d4fc7bb4419021bf566e09de55ed1d9b041db (diff) | |
download | libffi-464b4b66e3cf3b5489e730c1466ee1bf825560e0.tar.gz |
powerpc64: 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.
Diffstat (limited to 'src')
-rw-r--r-- | src/powerpc/ffi_linux64.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/powerpc/ffi_linux64.c b/src/powerpc/ffi_linux64.c index 4d50878..3454dac 100644 --- a/src/powerpc/ffi_linux64.c +++ b/src/powerpc/ffi_linux64.c @@ -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) |