summaryrefslogtreecommitdiff
path: root/src/m68k
diff options
context:
space:
mode:
authorAnthony Green <green@moxielogic.com>2013-03-16 08:01:19 -0400
committerAnthony Green <green@moxielogic.com>2013-03-16 08:12:19 -0400
commit8a286f570ccd41db81f74ea7f248da62241d898a (patch)
tree88e4ea01bccd2dafe2a80ba1fc9d8e5f230a336a /src/m68k
parent215763d012a944d95406b394d6013b80d220e870 (diff)
downloadlibffi-8a286f570ccd41db81f74ea7f248da62241d898a.tar.gz
Fix for m68000 systems
Diffstat (limited to 'src/m68k')
-rw-r--r--src/m68k/sysv.S12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/m68k/sysv.S b/src/m68k/sysv.S
index 9504c6a..ec2b14f 100644
--- a/src/m68k/sysv.S
+++ b/src/m68k/sysv.S
@@ -176,7 +176,13 @@ retstruct2:
retsint8:
btst #8,%d2
jbeq retsint16
+ | NOTE: On the mc68000, extb is not supported. 8->16, then 16->32.
+#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcoldfire__)
+ ext.w %d0
+ ext.l %d0
+#else
extb.l %d0
+#endif
move.l %d0,(%a1)
jbra epilogue
@@ -279,7 +285,13 @@ CALLFUNC(ffi_closure_SYSV):
jra .Lcls_epilogue
.Lcls_ret_sint8:
move.l (%a0),%d0
+ | NOTE: On the mc68000, extb is not supported. 8->16, then 16->32.
+#if !defined(__mc68020__) && !defined(__mc68030__) && !defined(__mc68040__) && !defined(__mc68060__) && !defined(__mcoldfire__)
+ ext.w %d0
+ ext.l %d0
+#else
extb.l %d0
+#endif
jra .Lcls_epilogue
1:
| CIF_FLAGS_SINT16