1 From 733bb188b898385cfb5ad28cc0e3ecaf38237350 Mon Sep 17 00:00:00 2001
2 From: Waldemar Brodkorb <wbx@openadk.org>
3 Date: Sat, 20 Aug 2016 00:52:19 +0200
4 Subject: [PATCH] m68k: support ISA-A Coldfire CPUs
6 Fix compilation for m68k/coldfire CPUs like mcf5208.
8 Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
9 Signed-off-by: Thorsten Glaser <tg@mirbsd.de>
11 src/m68k/sysv.S | 29 ++++++++++++++++++++++++++++-
12 1 file changed, 28 insertions(+), 1 deletion(-)
14 diff --git a/src/m68k/sysv.S b/src/m68k/sysv.S
15 index ec2b14f..ea40f11 100644
19 sysv.S - Copyright (c) 2012 Alan Hourihane
20 Copyright (c) 1998, 2012 Andreas Schwab
21 Copyright (c) 2008 Red Hat, Inc.
22 - Copyright (c) 2012 Thorsten Glaser
23 + Copyright (c) 2012, 2016 Thorsten Glaser
25 m68k Foreign Function Interface
27 @@ -72,6 +72,15 @@ CALLFUNC(ffi_call_SYSV):
30 jsr CALLFUNC(ffi_prep_args)
31 +#elif defined(__uClinux__) && defined(__ID_SHARED_LIBRARY__)
32 + move.l _current_shared_library_a5_offset_(%a5),%a0
33 + move.l CALLFUNC(ffi_prep_args@GOT)(%a0),%a0
35 +#elif defined(__mcoldfire__) && !defined(__mcfisab__) && !defined(__mcfisac__)
36 + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC,%a0
37 + lea (-6,%pc,%a0),%a0
38 + move.l CALLFUNC(ffi_prep_args@GOT)(%a0),%a0
41 bsr.l CALLFUNC(ffi_prep_args@PLTPC)
43 @@ -215,6 +224,15 @@ CALLFUNC(ffi_closure_SYSV):
46 jsr CALLFUNC(ffi_closure_SYSV_inner)
47 +#elif defined(__uClinux__) && defined(__ID_SHARED_LIBRARY__)
48 + move.l _current_shared_library_a5_offset_(%a5),%a0
49 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
51 +#elif defined(__mcoldfire__) && !defined(__mcfisab__) && !defined(__mcfisac__)
52 + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC,%a0
53 + lea (-6,%pc,%a0),%a0
54 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
57 bsr.l CALLFUNC(ffi_closure_SYSV_inner@PLTPC)
59 @@ -317,6 +335,15 @@ CALLFUNC(ffi_closure_struct_SYSV):
62 jsr CALLFUNC(ffi_closure_SYSV_inner)
63 +#elif defined(__uClinux__) && defined(__ID_SHARED_LIBRARY__)
64 + move.l _current_shared_library_a5_offset_(%a5),%a0
65 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
67 +#elif defined(__mcoldfire__) && !defined(__mcfisab__) && !defined(__mcfisac__)
68 + move.l #_GLOBAL_OFFSET_TABLE_@GOTPC,%a0
69 + lea (-6,%pc,%a0),%a0
70 + move.l CALLFUNC(ffi_closure_SYSV_inner@GOT)(%a0),%a0
73 bsr.l CALLFUNC(ffi_closure_SYSV_inner@PLTPC)