From 3b836249feae6d08d3e6887486e4b9961ddafa09 Mon Sep 17 00:00:00 2001 From: Anthony Green Date: Tue, 8 Feb 2011 14:28:59 -0500 Subject: [PATCH] Rebase from GCC --- .pc/aix-ibm-xlc/ChangeLog | 14 +++++++++ .pc/debug-build/ChangeLog | 14 +++++++++ .pc/debug-build/configure | 2 +- .pc/debug-build/configure.ac | 2 +- .pc/ffi_last_abi/ChangeLog | 14 +++++++++ .pc/ffi_last_abi/src/mips/ffitarget.h | 8 ++++++ .pc/fix-grammar/ChangeLog | 14 +++++++++ .pc/hpux-mallinfo/ChangeLog | 14 +++++++++ .pc/ml64-safeseh/ChangeLog | 14 +++++++++ .pc/msvcc-warning/ChangeLog | 14 +++++++++ .pc/sparc-v8-aggregate-returns/ChangeLog | 14 +++++++++ .pc/stand-alone/configure | 2 +- .pc/stand-alone/configure.ac | 2 +- .pc/stdcall-x86-closure-fix/ChangeLog | 14 +++++++++ .pc/win64-struct-args/ChangeLog | 14 +++++++++ .pc/win64-underscore/ChangeLog | 14 +++++++++ .pc/win64-underscore/configure | 2 +- .pc/win64-underscore/configure.ac | 2 +- .pc/x86_pcrel_test/ChangeLog | 14 +++++++++ .pc/x86_pcrel_test/configure | 2 +- .pc/x86_pcrel_test/configure.ac | 2 +- ChangeLog | 14 +++++++++ Makefile.in | 1 - compile | 0 configure | 2 +- configure.ac | 2 +- fficonfig.h.in | 3 -- include/Makefile.in | 1 - man/Makefile.in | 1 - patches/debug-build | 2 +- patches/ffi_last_abi | 4 +-- patches/ml64-safeseh | 2 +- patches/msvcc-warning | 2 +- patches/stdcall-x86-closure-fix | 2 +- patches/win64-struct-args | 2 +- patches/win64-underscore | 2 +- patches/x86_pcrel_test | 4 +-- src/m68k/ffi.c | 10 +++++++ src/m68k/sysv.S | 36 ++++++++++++++++++++++++ src/mips/ffitarget.h | 8 ++++++ testsuite/Makefile.in | 1 - 41 files changed, 264 insertions(+), 27 deletions(-) mode change 100644 => 100755 compile diff --git a/.pc/aix-ibm-xlc/ChangeLog b/.pc/aix-ibm-xlc/ChangeLog index 41523abb..5c0ed7fb 100644 --- a/.pc/aix-ibm-xlc/ChangeLog +++ b/.pc/aix-ibm-xlc/ChangeLog @@ -3,6 +3,20 @@ * configure.ac: Fix x86 test for pc related relocs. * confifure: Rebuilt. +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/debug-build/ChangeLog b/.pc/debug-build/ChangeLog index e924b83f..c8f58591 100644 --- a/.pc/debug-build/ChangeLog +++ b/.pc/debug-build/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/debug-build/configure b/.pc/debug-build/configure index a308cf66..1c5aafe4 100755 --- a/.pc/debug-build/configure +++ b/.pc/debug-build/configure @@ -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*) diff --git a/.pc/debug-build/configure.ac b/.pc/debug-build/configure.ac index 82d67e36..07644609 100644 --- a/.pc/debug-build/configure.ac +++ b/.pc/debug-build/configure.ac @@ -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*) diff --git a/.pc/ffi_last_abi/ChangeLog b/.pc/ffi_last_abi/ChangeLog index 25e4f60a..109b58de 100644 --- a/.pc/ffi_last_abi/ChangeLog +++ b/.pc/ffi_last_abi/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/ffi_last_abi/src/mips/ffitarget.h b/.pc/ffi_last_abi/src/mips/ffitarget.h index c5f4e056..d0fc983a 100644 --- a/.pc/ffi_last_abi/src/mips/ffitarget.h +++ b/.pc/ffi_last_abi/src/mips/ffitarget.h @@ -29,9 +29,17 @@ #ifdef linux # include +#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 #endif + # ifndef _ABIN32 # define _ABIN32 _MIPS_SIM_NABI32 # endif diff --git a/.pc/fix-grammar/ChangeLog b/.pc/fix-grammar/ChangeLog index 1b6af528..06f43b4f 100644 --- a/.pc/fix-grammar/ChangeLog +++ b/.pc/fix-grammar/ChangeLog @@ -7,6 +7,20 @@ * configure.ac: Fix x86 test for pc related relocs. * confifure: Rebuilt. +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/hpux-mallinfo/ChangeLog b/.pc/hpux-mallinfo/ChangeLog index d271376d..abb3be93 100644 --- a/.pc/hpux-mallinfo/ChangeLog +++ b/.pc/hpux-mallinfo/ChangeLog @@ -16,6 +16,20 @@ * configure.ac: Fix x86 test for pc related relocs. * confifure: Rebuilt. +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/ml64-safeseh/ChangeLog b/.pc/ml64-safeseh/ChangeLog index 891033eb..f88a995a 100644 --- a/.pc/ml64-safeseh/ChangeLog +++ b/.pc/ml64-safeseh/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/msvcc-warning/ChangeLog b/.pc/msvcc-warning/ChangeLog index 53990f48..2516c17c 100644 --- a/.pc/msvcc-warning/ChangeLog +++ b/.pc/msvcc-warning/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/sparc-v8-aggregate-returns/ChangeLog b/.pc/sparc-v8-aggregate-returns/ChangeLog index 8e21aea6..801315f4 100644 --- a/.pc/sparc-v8-aggregate-returns/ChangeLog +++ b/.pc/sparc-v8-aggregate-returns/ChangeLog @@ -11,6 +11,20 @@ * configure.ac: Fix x86 test for pc related relocs. * confifure: Rebuilt. +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/stand-alone/configure b/.pc/stand-alone/configure index a4a4a193..b115511d 100755 --- a/.pc/stand-alone/configure +++ b/.pc/stand-alone/configure @@ -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*) diff --git a/.pc/stand-alone/configure.ac b/.pc/stand-alone/configure.ac index a7e97d5e..d16155a4 100644 --- a/.pc/stand-alone/configure.ac +++ b/.pc/stand-alone/configure.ac @@ -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*) diff --git a/.pc/stdcall-x86-closure-fix/ChangeLog b/.pc/stdcall-x86-closure-fix/ChangeLog index 80e54189..42d7e163 100644 --- a/.pc/stdcall-x86-closure-fix/ChangeLog +++ b/.pc/stdcall-x86-closure-fix/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/win64-struct-args/ChangeLog b/.pc/win64-struct-args/ChangeLog index 7839a365..b5e33348 100644 --- a/.pc/win64-struct-args/ChangeLog +++ b/.pc/win64-struct-args/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/win64-underscore/ChangeLog b/.pc/win64-underscore/ChangeLog index bb9d9202..20cb6377 100644 --- a/.pc/win64-underscore/ChangeLog +++ b/.pc/win64-underscore/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/win64-underscore/configure b/.pc/win64-underscore/configure index 93c0f9cf..935a0c92 100755 --- a/.pc/win64-underscore/configure +++ b/.pc/win64-underscore/configure @@ -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*) diff --git a/.pc/win64-underscore/configure.ac b/.pc/win64-underscore/configure.ac index 7f0b98df..d8355008 100644 --- a/.pc/win64-underscore/configure.ac +++ b/.pc/win64-underscore/configure.ac @@ -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*) diff --git a/.pc/x86_pcrel_test/ChangeLog b/.pc/x86_pcrel_test/ChangeLog index 2ea68910..42c1f41c 100644 --- a/.pc/x86_pcrel_test/ChangeLog +++ b/.pc/x86_pcrel_test/ChangeLog @@ -1,3 +1,17 @@ +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/.pc/x86_pcrel_test/configure b/.pc/x86_pcrel_test/configure index 7a082c87..6752b2b5 100755 --- a/.pc/x86_pcrel_test/configure +++ b/.pc/x86_pcrel_test/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*) diff --git a/.pc/x86_pcrel_test/configure.ac b/.pc/x86_pcrel_test/configure.ac index 3535542e..63f0b53a 100644 --- a/.pc/x86_pcrel_test/configure.ac +++ b/.pc/x86_pcrel_test/configure.ac @@ -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*) diff --git a/ChangeLog b/ChangeLog index 7fd01934..46b65aab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,20 @@ * configure.ac: Fix x86 test for pc related relocs. * confifure: Rebuilt. +2011-02-07 Joel Sherrill + + * 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 + + * 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 PR target/40125 diff --git a/Makefile.in b/Makefile.in index ca3c0b92..d6ec8344 100644 --- a/Makefile.in +++ b/Makefile.in @@ -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 new mode 100755 diff --git a/configure b/configure index 6c8c1020..b4be8792 100755 --- 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*) diff --git a/configure.ac b/configure.ac index 59bacd96..c59d6c67 100644 --- a/configure.ac +++ b/configure.ac @@ -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*) diff --git a/fficonfig.h.in b/fficonfig.h.in index 2d6058ff..e6a51b3d 100644 --- a/fficonfig.h.in +++ b/fficonfig.h.in @@ -154,9 +154,6 @@ /* 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 diff --git a/include/Makefile.in b/include/Makefile.in index 264fd136..a0dc1775 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -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@ diff --git a/man/Makefile.in b/man/Makefile.in index b05b609a..8ddba1f1 100644 --- a/man/Makefile.in +++ b/man/Makefile.in @@ -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@ diff --git a/patches/debug-build b/patches/debug-build index b88c9b4a..e98da60d 100644 --- a/patches/debug-build +++ b/patches/debug-build @@ -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. diff --git a/patches/ffi_last_abi b/patches/ffi_last_abi index df1d80d1..e637f44c 100644 --- a/patches/ffi_last_abi +++ b/patches/ffi_last_abi @@ -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, diff --git a/patches/ml64-safeseh b/patches/ml64-safeseh index 4e0a83ca..eeb8f19a 100644 --- a/patches/ml64-safeseh +++ b/patches/ml64-safeseh @@ -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. diff --git a/patches/msvcc-warning b/patches/msvcc-warning index 56cd9297..f0c66b1a 100644 --- a/patches/msvcc-warning +++ b/patches/msvcc-warning @@ -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. diff --git a/patches/stdcall-x86-closure-fix b/patches/stdcall-x86-closure-fix index 36026e2d..ef17356d 100644 --- a/patches/stdcall-x86-closure-fix +++ b/patches/stdcall-x86-closure-fix @@ -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. diff --git a/patches/win64-struct-args b/patches/win64-struct-args index 4bdb9b91..e4673f4d 100644 --- a/patches/win64-struct-args +++ b/patches/win64-struct-args @@ -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. diff --git a/patches/win64-underscore b/patches/win64-underscore index 5699fcb1..ebdcca4d 100644 --- a/patches/win64-underscore +++ b/patches/win64-underscore @@ -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. diff --git a/patches/x86_pcrel_test b/patches/x86_pcrel_test index a8fd8c4c..6fb03afe 100644 --- a/patches/x86_pcrel_test +++ b/patches/x86_pcrel_test @@ -8,9 +8,9 @@ Index: libffi/ChangeLog + * configure.ac: Fix x86 test for pc related relocs. + * confifure: Rebuilt. + - 2011-01-26 Dave Korn + 2011-02-07 Joel Sherrill - PR target/40125 + * libffi/src/m68k/ffi.c: Add RTEMS support for cache flushing. Index: libffi/configure =================================================================== --- libffi.orig/configure diff --git a/src/m68k/ffi.c b/src/m68k/ffi.c index 600cf205..0d4df1e2 100644 --- a/src/m68k/ffi.c +++ b/src/m68k/ffi.c @@ -9,8 +9,12 @@ #include #include +#ifdef __rtems__ +void rtems_cache_flush_multiple_data_lines( const void *, size_t ); +#else #include #include +#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; diff --git a/src/m68k/sysv.S b/src/m68k/sysv.S index 58822e0a..c782f519 100644 --- a/src/m68k/sysv.S +++ b/src/m68k/sysv.S @@ -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 diff --git a/src/mips/ffitarget.h b/src/mips/ffitarget.h index d70197c7..4c247b81 100644 --- a/src/mips/ffitarget.h +++ b/src/mips/ffitarget.h @@ -29,9 +29,17 @@ #ifdef linux # include +#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 #endif + # ifndef _ABIN32 # define _ABIN32 _MIPS_SIM_NABI32 # endif diff --git a/testsuite/Makefile.in b/testsuite/Makefile.in index 14f69511..5b4eccf0 100644 --- a/testsuite/Makefile.in +++ b/testsuite/Makefile.in @@ -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@