This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix huge_struct test failure on PowerPC


2009-11-08  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.

--- src/powerpc/ffi.c.~1.9.~	2009-06-16 20:00:47.000000000 +0200
+++ src/powerpc/ffi.c	2009-11-08 12:46:21.000000000 +0100
@@ -185,6 +185,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 +1150,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
 		pst++;
 	      avalue[i] = pst;
 	      pst += 2;
+	      ng = 8;
 	    }
 	  break;
 
@@ -1222,6 +1224,7 @@ ffi_closure_helper_SYSV (ffi_closure *cl
 		{
 		  avalue[i] = pst;
 		  pst += 4;
+		  ng = 8;
 		}
 	      break;
 	    }

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]