]> gcc.gnu.org Git - gcc.git/commitdiff
ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long double' arguments.
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 11 Dec 2009 10:06:18 +0000 (10:06 +0000)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Fri, 11 Dec 2009 10:06:18 +0000 (10:06 +0000)
* src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long
double' arguments.

From-SVN: r155152

libffi/ChangeLog
libffi/src/sparc/ffi.c

index 8f2861400ce5614107f3148cc6b76fd6faea93dc..517ac4eff63939aa6a9773eaed3ca4907791f0a8 100644 (file)
@@ -1,3 +1,8 @@
+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.
index 3b73f0c477527b3fab07c87155369f894a4fec57..1d01f59ec231c3cc554650993d62b4a4afb1f63c 100644 (file)
@@ -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
This page took 0.063345 seconds and 5 git commands to generate.