Rebase from GCC
authorAnthony Green <green@moxielogic.com>
Tue, 8 Feb 2011 19:28:59 +0000 (14:28 -0500)
committerAnthony Green <green@moxielogic.com>
Tue, 8 Feb 2011 19:28:59 +0000 (14:28 -0500)
41 files changed:
.pc/aix-ibm-xlc/ChangeLog
.pc/debug-build/ChangeLog
.pc/debug-build/configure
.pc/debug-build/configure.ac
.pc/ffi_last_abi/ChangeLog
.pc/ffi_last_abi/src/mips/ffitarget.h
.pc/fix-grammar/ChangeLog
.pc/hpux-mallinfo/ChangeLog
.pc/ml64-safeseh/ChangeLog
.pc/msvcc-warning/ChangeLog
.pc/sparc-v8-aggregate-returns/ChangeLog
.pc/stand-alone/configure
.pc/stand-alone/configure.ac
.pc/stdcall-x86-closure-fix/ChangeLog
.pc/win64-struct-args/ChangeLog
.pc/win64-underscore/ChangeLog
.pc/win64-underscore/configure
.pc/win64-underscore/configure.ac
.pc/x86_pcrel_test/ChangeLog
.pc/x86_pcrel_test/configure
.pc/x86_pcrel_test/configure.ac
ChangeLog
Makefile.in
compile [changed mode: 0644->0755]
configure
configure.ac
fficonfig.h.in
include/Makefile.in
man/Makefile.in
patches/debug-build
patches/ffi_last_abi
patches/ml64-safeseh
patches/msvcc-warning
patches/stdcall-x86-closure-fix
patches/win64-struct-args
patches/win64-underscore
patches/x86_pcrel_test
src/m68k/ffi.c
src/m68k/sysv.S
src/mips/ffitarget.h
testsuite/Makefile.in

index 41523ab..5c0ed7f 100644 (file)
@@ -3,6 +3,20 @@
        * configure.ac: Fix x86 test for pc related relocs.
        * confifure: Rebuilt.
 
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index e924b83..c8f5859 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index a308cf6..1c5aafe 100755 (executable)
@@ -12224,7 +12224,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 82d67e3..0764460 100644 (file)
@@ -118,7 +118,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 25e4f60..109b58d 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index c5f4e05..d0fc983 100644 (file)
 
 #ifdef linux
 # include <asm/sgidefs.h>
+#elif defined(__rtems__)
+/*
+ * Subprogram calling convention - copied from sgidefs.h
+ */
+#define _MIPS_SIM_ABI32                1
+#define _MIPS_SIM_NABI32       2
+#define _MIPS_SIM_ABI64                3
 #else
 # include <sgidefs.h>
 #endif
+
 #  ifndef _ABIN32
 #    define _ABIN32 _MIPS_SIM_NABI32
 #  endif
index 1b6af52..06f43b4 100644 (file)
@@ -7,6 +7,20 @@
        * configure.ac: Fix x86 test for pc related relocs.
        * confifure: Rebuilt.
 
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index d271376..abb3be9 100644 (file)
        * configure.ac: Fix x86 test for pc related relocs.
        * confifure: Rebuilt.
 
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index 891033e..f88a995 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index 53990f4..2516c17 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index 8e21aea..801315f 100644 (file)
        * configure.ac: Fix x86 test for pc related relocs.
        * confifure: Rebuilt.
 
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index a4a4a19..b115511 100755 (executable)
@@ -11391,7 +11391,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index a7e97d5..d16155a 100644 (file)
@@ -114,7 +114,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 80e5418..42d7e16 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index 7839a36..b5e3334 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index bb9d920..20cb637 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index 93c0f9c..935a0c9 100755 (executable)
@@ -12230,7 +12230,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 7f0b98d..d835500 100644 (file)
@@ -122,7 +122,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 2ea6891..42c1f41 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index 7a082c8..6752b2b 100755 (executable)
@@ -12231,7 +12231,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 3535542..63f0b53 100644 (file)
@@ -122,7 +122,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 7fd0193..46b65aa 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        * configure.ac: Fix x86 test for pc related relocs.
        * confifure: Rebuilt.
 
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
+       Handle case when CPU variant does not have long double support.
+       * libffi/src/m68k/sysv.S: Add support for mc68000, Coldfire,
+       and cores with soft floating point.
+
+2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
+
+       * configure.ac: Add mips*-*-rtems* support.
+       * configure: Regenerate.
+       * src/mips/ffitarget.h: Ensure needed constants are available
+       for targets which do not have sgidefs.h.
+
 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
 
        PR target/40125
index ca3c0b9..d6ec834 100644 (file)
@@ -383,7 +383,6 @@ psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
-sys_symbol_underscore = @sys_symbol_underscore@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
diff --git a/compile b/compile
old mode 100644 (file)
new mode 100755 (executable)
index 6c8c102..b4be879 100755 (executable)
--- a/configure
+++ b/configure
@@ -12231,7 +12231,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 59bacd9..c59d6c6 100644 (file)
@@ -122,7 +122,7 @@ case "$host" in
        TARGET=M68K; TARGETDIR=m68k
        ;;
 
-  mips-sgi-irix5.* | mips-sgi-irix6.*)
+  mips-sgi-irix5.* | mips-sgi-irix6.* | mips*-*-rtems*)
        TARGET=MIPS; TARGETDIR=mips
        ;;
   mips*-*-linux*)
index 2d6058f..e6a51b3 100644 (file)
 /* Define to 1 if you have the ANSI C header files. */
 #undef STDC_HEADERS
 
-/* Define if symbols are underscored. */
-#undef SYMBOL_UNDERSCORE
-
 /* Define this if you are using Purify and want to suppress spurious messages.
    */
 #undef USING_PURIFY
index 264fd13..a0dc177 100644 (file)
@@ -192,7 +192,6 @@ psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
-sys_symbol_underscore = @sys_symbol_underscore@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
index b05b609..8ddba1f 100644 (file)
@@ -190,7 +190,6 @@ psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
-sys_symbol_underscore = @sys_symbol_underscore@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@
index b88c9b4..e98da60 100644 (file)
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -109,6 +109,13 @@
+@@ -123,6 +123,13 @@
        * testsuite/libffi.call/cls_longdouble.c: Likewise.
        * testsuite/libffi.call/huge_struct.c: Likewise.
  
index df1d80d..e637f44 100644 (file)
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -109,6 +109,12 @@
+@@ -123,6 +123,12 @@
        * testsuite/libffi.call/cls_longdouble.c: Likewise.
        * testsuite/libffi.call/huge_struct.c: Likewise.
  
@@ -127,7 +127,7 @@ Index: libffi/src/mips/ffitarget.h
 ===================================================================
 --- libffi.orig/src/mips/ffitarget.h
 +++ libffi/src/mips/ffitarget.h
-@@ -186,30 +186,29 @@ typedef enum ffi_abi {
+@@ -194,30 +194,29 @@ typedef enum ffi_abi {
    FFI_O32_SOFT_FLOAT,
    FFI_N32_SOFT_FLOAT,
    FFI_N64_SOFT_FLOAT,
index 4e0a83c..eeb8f19 100644 (file)
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -117,6 +117,10 @@
+@@ -131,6 +131,10 @@
        * src/prep_cif.c: Push stack space computation into src/x86/ffi.c
        for X86_ANY so return value space doesn't get added twice.
  
index 56cd929..f0c66b1 100644 (file)
@@ -76,7 +76,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -175,6 +175,11 @@
+@@ -189,6 +189,11 @@
        * man/Makefile.in: Regenerate.
        * testsuite/Makefile.in: Regenerate.
  
index 36026e2..ef17356 100644 (file)
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -109,6 +109,14 @@
+@@ -123,6 +123,14 @@
        * testsuite/libffi.call/cls_longdouble.c: Likewise.
        * testsuite/libffi.call/huge_struct.c: Likewise.
  
index 4bdb9b9..e4673f4 100644 (file)
@@ -51,7 +51,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -146,6 +146,14 @@
+@@ -160,6 +160,14 @@
        * fficonfig.h.in: Regenerate.
        * src/x86/sysv.S (.eh_frame): Use .ascii, .string or error.
  
index 5699fcb..ebdcca4 100644 (file)
@@ -2,7 +2,7 @@ Index: libffi/ChangeLog
 ===================================================================
 --- libffi.orig/ChangeLog
 +++ libffi/ChangeLog
-@@ -42,6 +42,13 @@
+@@ -56,6 +56,13 @@
        (.eh_frame): Use FDE_ENCODING.
        (.LASFDE1, .LASFDE2, LASFDE3): Simplify with FDE_ENCODE.
  
index a8fd8c4..6fb03af 100644 (file)
@@ -8,9 +8,9 @@ Index: libffi/ChangeLog
 +      * configure.ac: Fix x86 test for pc related relocs.
 +      * confifure: Rebuilt.
 +
- 2011-01-26  Dave Korn  <dave.korn.cygwin@gmail.com>
+ 2011-02-07  Joel Sherrill <joel.sherrill@oarcorp.com>
  
-       PR target/40125
+       * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing.
 Index: libffi/configure
 ===================================================================
 --- libffi.orig/configure
index 600cf20..0d4df1e 100644 (file)
@@ -9,8 +9,12 @@
 
 #include <stdlib.h>
 #include <unistd.h>
+#ifdef __rtems__
+void rtems_cache_flush_multiple_data_lines( const void *, size_t );
+#else
 #include <sys/syscall.h>
 #include <asm/cachectl.h>
+#endif
 
 void ffi_call_SYSV (extended_cif *,
                    unsigned, unsigned,
@@ -144,9 +148,11 @@ ffi_prep_cif_machdep (ffi_cif *cif)
       cif->flags = CIF_FLAGS_DOUBLE;
       break;
 
+#if (FFI_TYPE_LONGDOUBLE != FFI_TYPE_DOUBLE)
     case FFI_TYPE_LONGDOUBLE:
       cif->flags = CIF_FLAGS_LDOUBLE;
       break;
+#endif
 
     case FFI_TYPE_POINTER:
       cif->flags = CIF_FLAGS_POINTER;
@@ -266,8 +272,12 @@ ffi_prep_closure_loc (ffi_closure* closure,
   else
     *(void **)(closure->tramp + 8) = ffi_closure_SYSV;
 
+#ifdef __rtems__
+  rtems_cache_flush_multiple_data_lines( codeloc, FFI_TRAMPOLINE_SIZE );
+#else
   syscall(SYS_cacheflush, codeloc, FLUSH_SCOPE_LINE,
          FLUSH_CACHE_BOTH, FFI_TRAMPOLINE_SIZE);
+#endif
 
   closure->cif  = cif;
   closure->user_data = user_data;
index 58822e0..c782f51 100644 (file)
@@ -1,4 +1,5 @@
 /* -----------------------------------------------------------------------
+       
    sysv.S - Copyright (c) 1998 Andreas Schwab
            Copyright (c) 2008 Red Hat, Inc. 
    
@@ -85,7 +86,12 @@ ffi_call_SYSV:
        move.l  16(%fp),%d2
 
        | 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__)
+       cmp.w   #0, %a1
+#else
        tst.l   %a1
+#endif
        jbeq    noretval
 
        btst    #0,%d2
@@ -103,19 +109,34 @@ retlongint:
 retfloat:
        btst    #2,%d2
        jbeq    retdouble
+#if defined(__MC68881__)
        fmove.s %fp0,(%a1)
+#else
+       move.l  %d0,(%a1)
+#endif
        jbra    epilogue
 
 retdouble:
        btst    #3,%d2
        jbeq    retlongdouble
+#if defined(__MC68881__)
        fmove.d %fp0,(%a1)
+#else
+       move.l  %d0,(%a1)+
+       move.l  %d1,(%a1)
+#endif
        jbra    epilogue
 
 retlongdouble:
        btst    #4,%d2
        jbeq    retpointer
+#if defined(__MC68881__)
        fmove.x %fp0,(%a1)
+#else
+       move.l  %d0,(%a1)+
+       move.l  %d1,(%a1)+
+       move.l  %d2,(%a1)
+#endif
        jbra    epilogue
 
 retpointer:
@@ -178,16 +199,31 @@ ffi_closure_SYSV:
        move.l  (%a0),%d1
        jra     .Lcls_epilogue
 .Lcls_ret_float:
+#if defined(__MC68881__)
        fmove.s (%a0),%fp0
+#else
+       move.l  (%a0),%d0
+#endif
        jra     .Lcls_epilogue
 1:
        lsr.l   #2,%d0
        jne     1f
        jcs     .Lcls_ret_ldouble
+#if defined(__MC68881__)
        fmove.d (%a0),%fp0
+#else
+       move.l  (%a0)+,%d0
+       move.l  (%a0),%d1
+#endif
        jra     .Lcls_epilogue
 .Lcls_ret_ldouble:
+#if defined(__MC68881__)
        fmove.x (%a0),%fp0
+#else
+       move.l  (%a0)+,%d0
+       move.l  (%a0)+,%d1
+       move.l  (%a0),%d2
+#endif
        jra     .Lcls_epilogue
 1:
        lsr.l   #2,%d0
index d70197c..4c247b8 100644 (file)
 
 #ifdef linux
 # include <asm/sgidefs.h>
+#elif defined(__rtems__)
+/*
+ * Subprogram calling convention - copied from sgidefs.h
+ */
+#define _MIPS_SIM_ABI32                1
+#define _MIPS_SIM_NABI32       2
+#define _MIPS_SIM_ABI64                3
 #else
 # include <sgidefs.h>
 #endif
+
 #  ifndef _ABIN32
 #    define _ABIN32 _MIPS_SIM_NABI32
 #  endif
index 14f6951..5b4eccf 100644 (file)
@@ -167,7 +167,6 @@ psdir = @psdir@
 sbindir = @sbindir@
 sharedstatedir = @sharedstatedir@
 srcdir = @srcdir@
-sys_symbol_underscore = @sys_symbol_underscore@
 sysconfdir = @sysconfdir@
 target = @target@
 target_alias = @target_alias@