From cd2277cc796b96b149cd284ae85326529fe7fb9c Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Mon, 23 Jan 2012 13:43:38 -0500 Subject: [PATCH] mend --- ChangeLog | 6 +++++- configure.ac | 2 +- patches/m68k-patches | 17 +++++++++++++++++ src/m68k/sysv.S | 4 ++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 64d5b20b..7e2b4d75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,7 +1,11 @@ +2012-01-23 Andreas Schwab + + * src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain + mc68000. Test for __HAVE_68881__ in addition to __MC68881__. + 2012-01-23 Alan Hourihane * src/m68k/ffi.c (ffi_prep_closure_loc): Fix ABI check. - * src/m68k/sysv.S: Support 68881. * testsuite/libffi.call/return_sc.c (main): Fix test check. 2012-01-19 Jakub Jelinek diff --git a/configure.ac b/configure.ac index b4a60c85..f56c7f02 100644 --- a/configure.ac +++ b/configure.ac @@ -339,7 +339,7 @@ case "$target" in [Cannot use PROT_EXEC on this target, so, we revert to alternative means]) ;; - *-apple-darwin1[[10]]* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) + *-apple-darwin1* | *-*-freebsd* | *-*-kfreebsd* | *-*-openbsd* | *-pc-solaris*) AC_DEFINE(FFI_MMAP_EXEC_WRIT, 1, [Cannot use malloc on this target, so, we revert to alternative means]) diff --git a/patches/m68k-patches b/patches/m68k-patches index f756261d..07642e26 100644 --- a/patches/m68k-patches +++ b/patches/m68k-patches @@ -16,6 +16,23 @@ Index: libffi/src/m68k/sysv.S =================================================================== --- libffi.orig/src/m68k/sysv.S +++ libffi/src/m68k/sysv.S +@@ -1,6 +1,6 @@ + /* ----------------------------------------------------------------------- + +- sysv.S - Copyright (c) 1998 Andreas Schwab ++ sysv.S - Copyright (c) 1998, 2012 Andreas Schwab + Copyright (c) 2008 Red Hat, Inc. + + m68k Foreign Function Interface +@@ -87,7 +87,7 @@ ffi_call_SYSV: + + | If the return value pointer is NULL, assume no return value. + | NOTE: On the mc68000, tst on an address register is not supported. +-#if defined(__mc68000__) && !defined(__mcoldfire__) ++#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcoldfire__) + cmp.w #0, %a1 + #else + tst.l %a1 @@ -109,7 +109,7 @@ retlongint: retfloat: btst #2,%d2 diff --git a/src/m68k/sysv.S b/src/m68k/sysv.S index 6f178010..dfdd8644 100644 --- a/src/m68k/sysv.S +++ b/src/m68k/sysv.S @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------- - sysv.S - Copyright (c) 1998 Andreas Schwab + sysv.S - Copyright (c) 1998, 2012 Andreas Schwab Copyright (c) 2008 Red Hat, Inc. m68k Foreign Function Interface @@ -87,7 +87,7 @@ ffi_call_SYSV: | If the return value pointer is NULL, assume no return value. | NOTE: On the mc68000, tst on an address register is not supported. -#if defined(__mc68000__) && !defined(__mcoldfire__) +#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcoldfire__) cmp.w #0, %a1 #else tst.l %a1