From: Matt Kraai Date: Thu, 26 Feb 2004 02:09:35 +0000 (+0000) Subject: ffi.c (ffi_prep_args_SYSV): Change ecif->cif->bytes to bytes. X-Git-Tag: releases/gcc-4.0.0~9843 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fecf735c6740e1080c60766bdd27de0ee407c8dd;p=thirdparty%2Fgcc.git ffi.c (ffi_prep_args_SYSV): Change ecif->cif->bytes to bytes. * src/powerpc/ffi.c (ffi_prep_args_SYSV): Change ecif->cif->bytes to bytes. (ffi_prep_cif_machdep): Add braces around nested if statement. From-SVN: r78477 --- diff --git a/libffi/ChangeLog b/libffi/ChangeLog index b8e3a301a057..e4a674af9055 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,9 @@ +2004-02-25 Matt Kraai + + * src/powerpc/ffi.c (ffi_prep_args_SYSV): Change + ecif->cif->bytes to bytes. + (ffi_prep_cif_machdep): Add braces around nested if statement. + 2004-02-09 Alan Modra * src/types.c (pointer): POWERPC64 has 8 byte pointers. diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c index 454c7ac35e58..29f7dba38278 100644 --- a/libffi/src/powerpc/ffi.c +++ b/libffi/src/powerpc/ffi.c @@ -94,7 +94,7 @@ void ffi_prep_args_SYSV(extended_cif *ecif, unsigned *const stack) const unsigned flags = ecif->cif->flags; /* 'stacktop' points at the previous backchain pointer. */ - unsigned *const stacktop = stack + (ecif->cif->bytes / sizeof(unsigned)); + unsigned *const stacktop = stack + (bytes / sizeof(unsigned)); /* 'gpr_base' points at the space for gpr3, and grows upwards as we use GPR registers. */ @@ -521,13 +521,15 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) case FFI_TYPE_STRUCT: if (cif->abi != FFI_GCC_SYSV && cif->abi != FFI_LINUX64) - if (cif->rtype->size <= 4) - break; - else if (cif->rtype->size <= 8) - { - flags |= FLAG_RETURNS_64BITS; + { + if (cif->rtype->size <= 4) break; - } + else if (cif->rtype->size <= 8) + { + flags |= FLAG_RETURNS_64BITS; + break; + } + } /* else fall through. */ #if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE case FFI_TYPE_LONGDOUBLE: