mirror of git://gcc.gnu.org/git/gcc.git
ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long double' arguments.
* src/sparc/ffi.c (ffi_closure_sparc_inner_v9): Properly align 'long double' arguments. From-SVN: r155152
This commit is contained in:
parent
2ea54b81da
commit
fb01d970c4
|
|
@ -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>
|
2009-12-11 Eric Botcazou <ebotcazou@adacore.com>
|
||||||
|
|
||||||
* testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
|
* testsuite/libffi.call/ffitest.h: Define PRIuPTR on Solaris < 10.
|
||||||
|
|
|
||||||
|
|
@ -599,6 +599,11 @@ ffi_closure_sparc_inner_v9(ffi_closure *closure,
|
||||||
/* Right-justify. */
|
/* Right-justify. */
|
||||||
argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;
|
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
|
if (i < fp_slot_max
|
||||||
&& (arg_types[i]->type == FFI_TYPE_FLOAT
|
&& (arg_types[i]->type == FFI_TYPE_FLOAT
|
||||||
|| arg_types[i]->type == FFI_TYPE_DOUBLE
|
|| arg_types[i]->type == FFI_TYPE_DOUBLE
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue