Add Andreas Schwab's powerpc fix
This commit is contained in:
51
patches/powerpc-fixes
Normal file
51
patches/powerpc-fixes
Normal file
@@ -0,0 +1,51 @@
|
||||
Index: libffi/src/powerpc/ffi.c
|
||||
===================================================================
|
||||
--- libffi.orig/src/powerpc/ffi.c
|
||||
+++ libffi/src/powerpc/ffi.c
|
||||
@@ -2,6 +2,7 @@
|
||||
ffi.c - Copyright (c) 1998 Geoffrey Keating
|
||||
Copyright (C) 2007, 2008 Free Software Foundation, Inc
|
||||
Copyright (C) 2008 Red Hat, Inc
|
||||
+ Copyright (C) 2009 Andreas Schwab
|
||||
|
||||
PowerPC Foreign Function Interface
|
||||
|
||||
@@ -185,6 +186,7 @@ ffi_prep_args_SYSV (extended_cif *ecif,
|
||||
{
|
||||
*next_arg.f = (float) double_tmp;
|
||||
next_arg.u += 1;
|
||||
+ intarg_count++;
|
||||
}
|
||||
else
|
||||
*fpr_base.d++ = double_tmp;
|
||||
@@ -1149,6 +1151,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
|
||||
pst++;
|
||||
avalue[i] = pst;
|
||||
pst += 2;
|
||||
+ ng = 8;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1222,6 +1225,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
|
||||
{
|
||||
avalue[i] = pst;
|
||||
pst += 4;
|
||||
+ ng = 8;
|
||||
}
|
||||
break;
|
||||
}
|
||||
Index: libffi/ChangeLog.libffi
|
||||
===================================================================
|
||||
--- libffi.orig/ChangeLog.libffi
|
||||
+++ libffi/ChangeLog.libffi
|
||||
@@ -1,3 +1,10 @@
|
||||
+2009-12-26 Andreas Schwab <schwab@linux-m68k.org>
|
||||
+
|
||||
+ * src/powerpc/ffi.c (ffi_prep_args_SYSV): Advance intarg_count
|
||||
+ when a float argument is passed in memory.
|
||||
+ (ffi_closure_helper_SYSV): Mark general registers as used up when
|
||||
+ a 64bit or soft-float long double argument is passed in memory.
|
||||
+
|
||||
2009-12-25 Samuli Suominen <ssuominen@gentoo.org>
|
||||
|
||||
* configure.ac: Undefine _AC_ARG_VAR_PRECIOUS for autoconf 2.64.
|
||||
@@ -6,3 +6,4 @@ fix-docs
|
||||
fix-huge_struct-test
|
||||
windows
|
||||
undefine_AC_ARG_VAR_PRECIOUS
|
||||
powerpc-fixes
|
||||
|
||||
Reference in New Issue
Block a user