summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-11 10:06:18 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2009-12-11 10:06:18 +0000
commitc221d0e8fd6fd323adffe92ca86fe294c42dea5e (patch)
tree1d5ee09121a1c4994864ab34fef775697470df53 /libffi
parentdb0ed9416d2f8962c5362cf71c9712f9814d5fb8 (diff)
downloadgcc-c221d0e8fd6fd323adffe92ca86fe294c42dea5e.tar.gz
* src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
double' arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155152 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/sparc/ffi.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 8f2861400ce..517ac4eff63 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,5 +1,10 @@
2009-12-11 Eric Botcazou <ebotcazou@adacore.com>
+ * src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
+ double' arguments.
+
+2009-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
* testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
2009-12-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
diff --git a/libffi/src/sparc/ffi.c b/libffi/src/sparc/ffi.c
index 3b73f0c4775..1d01f59ec23 100644
--- a/libffi/src/sparc/ffi.c
+++ b/libffi/src/sparc/ffi.c
@@ -599,6 +599,11 @@ ffi_closure_sparc_inner_v9(ffi_closure *closure,
/* Right-justify. */
argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
+ /* Align on a 16-byte boundary. */
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+ if (arg_types[i]->type == FFI_TYPE_LONGDOUBLE && (argn % 2) != 0)
+ argn++;
+#endif
if (i < fp_slot_max
&& (arg_types[i]->type == FFI_TYPE_FLOAT
|| arg_types[i]->type == FFI_TYPE_DOUBLE