re PR libffi/20104 (gij fails on ppc and not on x86)
authorAndrew Haley <aph@redhat.com>
Wed, 23 Feb 2005 14:05:13 +0000 (14:05 +0000)
committerAndrew Haley <aph@gcc.gnu.org>
Wed, 23 Feb 2005 14:05:13 +0000 (14:05 +0000)
2005-02-22  Andrew Haley  <aph@redhat.com>

PR libffi/20104
        * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
        odd-numbered register pairs for 64-bit integer types.

From-SVN: r95455

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

index 6de6ef538bed71ddedf855abc3c20d955c03fe01..83a1c2b5d9e115f9a2ebbfcc070353e267147ed4 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-22  Andrew Haley  <aph@redhat.com>
+
+       * src/powerpc/ffi.c (ffi_prep_cif_machdep): Bump alignment to
+       odd-numbered register pairs for 64-bit integer types.
+
 2005-02-23  Andreas Tobler  <a.tobler@schweiz.ch>
 
        PR libffi/20104
index c8d188777c851f89887e6ebfefe2903a0514d64f..67d945bd8261d852e90b12c0eb27e88e5d4f2b52 100644 (file)
@@ -573,10 +573,14 @@ ffi_status ffi_prep_cif_machdep(ffi_cif *cif)
            /* 'long long' arguments are passed as two words, but
               either both words must fit in registers or both go
               on the stack.  If they go on the stack, they must
-              be 8-byte-aligned.  */
+              be 8-byte-aligned.  
+
+              Also, only certain register pairs can be used for
+              passing long long int -- specifically (r3,r4), (r5,r6),
+              (r7,r8), (r9,r10).
+           */
            if (intarg_count == NUM_GPR_ARG_REGISTERS-1
-               || (intarg_count >= NUM_GPR_ARG_REGISTERS
-                   && intarg_count%2 != 0))
+               || intarg_count%2 != 0)
              intarg_count++;
            intarg_count += 2;
            break;