]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/23404 (gij trashes args of functions with more than 8 fp args)
authorAlan Modra <amodra@bigpond.net.au>
Thu, 25 Aug 2005 00:54:54 +0000 (00:54 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 25 Aug 2005 00:54:54 +0000 (10:24 +0930)
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

libffi/ChangeLog
libffi/src/powerpc/ffi.c

index 33fe14ae332212856b0b73584139eb80bb90efac..fd61c4b80d6e8ce9548f687ab8065c9093e86707 100644 (file)
@@ -1,3 +1,10 @@
+2005-08-25  Alan Modra  <amodra@bigpond.net.au>
+
+       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-08-11  Jakub Jelinek  <jakub@redhat.com>
 
        * configure.ac (HAVE_HIDDEN_VISIBILITY_ATTRIBUTE): New test.
index ed02bf38d560070edcce6cb447f20309e20b807b..cc410bc6bdc93e1dee9f6f179b27d14c082c652b 100644 (file)
@@ -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;