[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#660525: libffi on m68k failures



Source: libffi
Version: 3.0.10-3
Tags: patch

Hi,

please add this collection of patches to your next upload,
as it fixes some problems on m68k.

Thanks,
//mirabilos
-- 
> emacs als auch vi zum Kotzen finde (joe rules) und pine für den einzig
> bedienbaren textmode-mailclient halte (und ich hab sie alle ausprobiert). ;)
Hallooooo, ich bin der Holger ("Hallo Holger!"), und ich bin ebenfalls
... pine-User, und das auch noch gewohnheitsmäßig ("Oooooooohhh").  [aus dasr]
diff -u libffi-3.0.10/debian/changelog libffi-3.0.10/debian/changelog
--- libffi-3.0.10/debian/changelog
+++ libffi-3.0.10/debian/changelog
@@ -1,3 +1,15 @@
+libffi (3.0.10-3+m68k.2) unreleased; urgency=low
+
+  * Apply patch from Alan Hourihane to fix err_bad_abi testcase on m68k.
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Mon, 16 Jan 2012 17:23:35 +0000
+
+libffi (3.0.10-3+m68k.1) unreleased; urgency=low
+
+  * Apply patch from Andreas Schwab to fix floats on m68k.
+
+ -- Thorsten Glaser <tg@mirbsd.de>  Sat, 14 Jan 2012 17:45:01 +0000
+
 libffi (3.0.10-3) unstable; urgency=low
 
   * Fix powerpc and ppc64 builds (Kyle Moffett).
only in patch2:
unchanged:
--- libffi-3.0.10.orig/src/m68k/sysv.S
+++ libffi-3.0.10/src/m68k/sysv.S
@@ -109,7 +109,7 @@
 retfloat:
 	btst	#2,%d2
 	jbeq	retdouble
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
 	fmove.s	%fp0,(%a1)
 #else
 	move.l	%d0,(%a1)
@@ -119,7 +119,7 @@
 retdouble:
 	btst	#3,%d2
 	jbeq	retlongdouble
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
 	fmove.d	%fp0,(%a1)
 #else
 	move.l	%d0,(%a1)+
@@ -130,7 +130,7 @@
 retlongdouble:
 	btst	#4,%d2
 	jbeq	retpointer
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
 	fmove.x	%fp0,(%a1)
 #else
 	move.l	%d0,(%a1)+
@@ -199,7 +199,7 @@
 	move.l	(%a0),%d1
 	jra	.Lcls_epilogue
 .Lcls_ret_float:
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
 	fmove.s	(%a0),%fp0
 #else
 	move.l	(%a0),%d0
@@ -209,7 +209,7 @@
 	lsr.l	#2,%d0
 	jne	1f
 	jcs	.Lcls_ret_ldouble
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
 	fmove.d	(%a0),%fp0
 #else
 	move.l	(%a0)+,%d0
@@ -217,7 +217,7 @@
 #endif
 	jra	.Lcls_epilogue
 .Lcls_ret_ldouble:
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
 	fmove.x	(%a0),%fp0
 #else
 	move.l	(%a0)+,%d0
only in patch2:
unchanged:
--- libffi-3.0.10.orig/src/m68k/ffi.c
+++ libffi-3.0.10/src/m68k/ffi.c
@@ -261,7 +261,8 @@
 		      void *user_data,
 		      void *codeloc)
 {
-  FFI_ASSERT (cif->abi == FFI_SYSV);
+  if (cif->abi != FFI_SYSV)
+    return FFI_BAD_ABI;
 
   *(unsigned short *)closure->tramp = 0x207c;
   *(void **)(closure->tramp + 2) = codeloc;

Reply to: