From: Alan Modra Date: Thu, 25 Aug 2005 01:09:56 +0000 (+0000) Subject: re PR target/23404 (gij trashes args of functions with more than 8 fp args) X-Git-Tag: releases/gcc-3.4.5~240 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f1210b00de981ca606586f49ff279c7cfdb8a232;p=thirdparty%2Fgcc.git re PR target/23404 (gij trashes args of functions with more than 8 fp args) PR target/23404 * src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack homed fp args. (ffi_status ffi_prep_cif_machdep): Correct stack sizing for same. From-SVN: r103464 --- diff --git a/libffi/ChangeLog b/libffi/ChangeLog index c9fe18f74774..66b4d062fc4b 100644 --- a/libffi/ChangeLog +++ b/libffi/ChangeLog @@ -1,3 +1,10 @@ +2005-08-25 Alan Modra + + PR target/23404 + * src/powerpc/ffi.c (ffi_prep_args_SYSV): Correct placement of stack + homed fp args. + (ffi_status ffi_prep_cif_machdep): Correct stack sizing for same. + 2005-05-19 Release Manager * GCC 3.4.4 released. diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c index 454c7ac35e58..cc5b88ebd429 100644 --- a/libffi/src/powerpc/ffi.c +++ b/libffi/src/powerpc/ffi.c @@ -162,7 +162,8 @@ void ffi_prep_args_SYSV(extended_cif *ecif, unsigned *const stack) if (fparg_count >= NUM_FPR_ARG_REGISTERS) { - if (intarg_count%2 != 0) + if (intarg_count >= NUM_GPR_ARG_REGISTERS + && intarg_count % 2 != 0) { intarg_count++; next_arg++; @@ -564,7 +565,8 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif) /* If this FP arg is going on the stack, it must be 8-byte-aligned. */ if (fparg_count > NUM_FPR_ARG_REGISTERS - && intarg_count%2 != 0) + && intarg_count >= NUM_GPR_ARG_REGISTERS + && intarg_count % 2 != 0) intarg_count++; break;