summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authoraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-23 14:05:13 +0000
committeraph <aph@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-23 14:05:13 +0000
commite6fd470bd88fc2aebf07af825a1ff35d54a2c10c (patch)
tree1e5002f9408d7d36ac5f7e50d98d9935198b19c9 /libffi
parent4f373876375120908a52eb4b56e38418e3d52a5b (diff)
downloadgcc-e6fd470bd88fc2aebf07af825a1ff35d54a2c10c.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@95455 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/powerpc/ffi.c10
2 files changed, 12 insertions, 3 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 6de6ef538be..83a1c2b5d9e 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -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
diff --git a/libffi/src/powerpc/ffi.c b/libffi/src/powerpc/ffi.c
index c8d188777c8..67d945bd826 100644
--- a/libffi/src/powerpc/ffi.c
+++ b/libffi/src/powerpc/ffi.c
@@ -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;