python/sparc_longdouble.patch

24 lines
934 B
Diff
Raw Normal View History

Python ticket 6029
==== //tools/python/2.6.2/src/base/Modules/_ctypes/libffi/src/sparc/ffi.c#1 - /home/build/clifford/gpdb/tools/python/2.6.2/src/base/Modules/_ctypes/libffi/src/sparc/ffi.c ====
---
Modules/_ctypes/libffi/src/sparc/ffi.c | 5 +++++
1 file changed, 5 insertions(+)
Index: Python-2.6.5/Modules/_ctypes/libffi/src/sparc/ffi.c
===================================================================
--- Python-2.6.5.orig/Modules/_ctypes/libffi/src/sparc/ffi.c
+++ Python-2.6.5/Modules/_ctypes/libffi/src/sparc/ffi.c
@@ -586,6 +586,11 @@ ffi_closure_sparc_inner_v9(ffi_closure *
}
else
{
+#if FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE
+ /* SparcV9 long double is 16-byte aligned; skip arg if necessary */
+ if (arg_types[i]->type == FFI_TYPE_LONGDOUBLE && (argn & 1))
+ argn++;
+#endif
/* Right-justify. */
argn += ALIGN(arg_types[i]->size, FFI_SIZEOF_ARG) / FFI_SIZEOF_ARG;