summaryrefslogtreecommitdiff
path: root/libffi
diff options
context:
space:
mode:
authorschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-23 20:00:44 +0000
committerschwab <schwab@138bc75d-0d04-0410-961f-82ee72b054a4>2012-01-23 20:00:44 +0000
commit401c35ebc10c46b1f7e32ba0047c77c1818dfc31 (patch)
treec60afb07c78af98674c9cc35603b723a1b223aac /libffi
parentc96c9817a1abb22eb4dea7883d6a48dcff59f2a7 (diff)
downloadgcc-401c35ebc10c46b1f7e32ba0047c77c1818dfc31.tar.gz
* src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
mc68000. Test for __HAVE_68881__ in addition to __MC68881__. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183451 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libffi')
-rw-r--r--libffi/ChangeLog5
-rw-r--r--libffi/src/m68k/sysv.S16
2 files changed, 13 insertions, 8 deletions
diff --git a/libffi/ChangeLog b/libffi/ChangeLog
index 75ce3bf230f..867b571b9d7 100644
--- a/libffi/ChangeLog
+++ b/libffi/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-23 Andreas Schwab <schwab@linux-m68k.org>
+
+ * src/m68k/sysv.S (ffi_call_SYSV): Properly test for plain
+ mc68000. Test for __HAVE_68881__ in addition to __MC68881__.
+
2012-01-19 Jakub Jelinek <jakub@redhat.com>
PR rtl-optimization/48496
diff --git a/libffi/src/m68k/sysv.S b/libffi/src/m68k/sysv.S
index c782f5192c9..dfdd8644384 100644
--- a/libffi/src/m68k/sysv.S
+++ b/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
jbeq retdouble
-#if defined(__MC68881__)
+#if defined(__MC68881__) || defined(__HAVE_68881__)
fmove.s %fp0,(%a1)
#else
move.l %d0,(%a1)
@@ -119,7 +119,7 @@ retfloat:
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 @@ retdouble:
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 @@ ffi_closure_SYSV:
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 @@ ffi_closure_SYSV:
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 @@ ffi_closure_SYSV:
#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