]> 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 01:09:56 +0000 (01:09 +0000)
committerAlan Modra <amodra@gcc.gnu.org>
Thu, 25 Aug 2005 01:09:56 +0000 (10:39 +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: r103464

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

index c9fe18f747747d29034b4bb6884cec0300b0a8d5..66b4d062fc4b46c9b884a6f82fdbed5c4a1d1eef 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-05-19  Release Manager
 
        * GCC 3.4.4 released.
index 454c7ac35e58a8dd7e5967130750138d5c7a1a47..cc5b88ebd42950df0af1059dd1332ea1bc81e364 100644 (file)
@@ -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;