aboutsummaryrefslogtreecommitdiff
path: root/libffi/src
diff options
context:
space:
mode:
authorAlan Modra <amodra@bigpond.net.au>2005-08-25 00:54:54 +0000
committerAlan Modra <amodra@gcc.gnu.org>2005-08-25 10:24:54 +0930
commit2d9c5743d6e8b054b7fbbc8a881c94b45b12053f (patch)
tree502e280b7eb2fda62c32917c5855be5aa668c880 /libffi/src
parent91432782c4aff15c1faeede2deffdc624696fff9 (diff)
downloadgcc-2d9c5743d6e8b054b7fbbc8a881c94b45b12053f.zip
gcc-2d9c5743d6e8b054b7fbbc8a881c94b45b12053f.tar.gz
gcc-2d9c5743d6e8b054b7fbbc8a881c94b45b12053f.tar.bz2
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: r103462
Diffstat (limited to 'libffi/src')
-rw-r--r--libffi/src/powerpc/ffi.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c
index ed02bf3..cc410bc 100644
--- a/libffi/src/powerpc/ffi.c
+++ b/libffi/src/powerpc/ffi.c
@@ -155,7 +155,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++;
@@ -575,7 +576,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;