mirror of
https://github.com/partic2/libffi
synced 2026-11-11 02:27:19 +00:00
powerpc64: Use memcpy to help platforms with no __int128. (#534)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
@@ -680,9 +680,9 @@ ffi_prep_args64 (extended_cif *ecif, unsigned long *const stack)
|
|||||||
{
|
{
|
||||||
if (vecarg_count < NUM_VEC_ARG_REGISTERS64
|
if (vecarg_count < NUM_VEC_ARG_REGISTERS64
|
||||||
&& i < nfixedargs)
|
&& i < nfixedargs)
|
||||||
*vec_base.f128++ = *arg.f128++;
|
memcpy (vec_base.f128++, arg.f128, sizeof (float128));
|
||||||
else
|
else
|
||||||
*next_arg.f128 = *arg.f128++;
|
memcpy (next_arg.f128, arg.f128++, sizeof (float128));
|
||||||
if (++next_arg.f128 == gpr_end.f128)
|
if (++next_arg.f128 == gpr_end.f128)
|
||||||
next_arg.f128 = rest.f128;
|
next_arg.f128 = rest.f128;
|
||||||
vecarg_count++;
|
vecarg_count++;
|
||||||
@@ -986,9 +986,9 @@ ffi_closure_helper_LINUX64 (ffi_cif *cif,
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (pvec < end_pvec && i < nfixedargs)
|
if (pvec < end_pvec && i < nfixedargs)
|
||||||
*to.f128 = *pvec++;
|
memcpy (to.f128, pvec++, sizeof (float128));
|
||||||
else
|
else
|
||||||
*to.f128 = *from.f128;
|
memcpy (to.f128, from.f128, sizeof (float128));
|
||||||
to.f128++;
|
to.f128++;
|
||||||
from.f128++;
|
from.f128++;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user