diff options
author | Joel Sherrill <joel@OARcorp.com> | 2002-02-13 22:49:03 +0000 |
---|---|---|
committer | Joel Sherrill <joel@gcc.gnu.org> | 2002-02-13 22:49:03 +0000 |
commit | f22b4bc43d0fb8af1928d6a702dae4121cf138c2 (patch) | |
tree | db76c89c06b96d7cdc2ea6c1b734a02afec534fa /gcc/config/i386 | |
parent | 8686336f51b1197f22304f92b63780169be7c54b (diff) | |
download | gcc-f22b4bc43d0fb8af1928d6a702dae4121cf138c2.zip gcc-f22b4bc43d0fb8af1928d6a702dae4121cf138c2.tar.gz gcc-f22b4bc43d0fb8af1928d6a702dae4121cf138c2.tar.bz2 |
config.gcc (a29k-*-rtems): General cleanup across all RTEMS targets...
2002-02-13 Joel Sherrill <joel@OARcorp.com>
* config.gcc (a29k-*-rtems), config/a29k/rtems.h: General cleanup across
all RTEMS targets including removal of #includes from config/*/rtems*.h
file and adding them to tm_file setting. Added xm_defines=POSIX to
many targets.
* config.gcc (c4x-*-rtems), config/c4x/rtems.h: Ditto.
* config.gcc (h8300-*-rtems), config/h8300/rtems.h: Ditto.
* config.gcc (hppa1.1-*-rtems), config/pa/rtems.h: Ditto.
* config.gcc (i960-*-rtems), config/i960/rtems.h: Ditto.
* config.gcc (m68k-*-rtems*), config/m68k/rtems.h,
config/m68k/rtemself.h: Ditto.
* config.gcc (mips*-*-rtems*), config/mips/rtems.h,
config/mips/rtems64.h: Ditto.
* config.gcc (powerpc-*-rtems*), config/rs6000/rtems.h: Ditto.
* config.gcc (sh-*-rtems*), config/sh/rtems.h, config/sh/rtemself.h:
Ditto.
* config.gcc (sparc-*-rtems*), config/sparc/rtems.h,
config/sparc/rtemself.h: Ditto.
* config.gcc (v850-*-rtems*), config/v850/rtems.h: Ditto.
* config.gcc (arm-rtems), config/arm/rtems-elf.h: Ditto plus moved
arm-rtems stanza closer to other arm-elf targets and made arm-rtems
more like arm-elf.
* config.gcc (i[34567]86-*-rtems*), config/i386/djgpp-rtems.h,
config/i386/rtems.h, config/i386/rtemself.h: Ditto plus i386-rtemself
target made more similar to i386-elf.
* config/i386/t-rtems-i386: Added soft float support and multilibs.
* config/m68k/t-m68kbare: Add 68040 and 68060 as multilib alternatives to
be similar to config/m68k/t-m68kelf.
* gthr-rtems.h: Encapsulate with extern "C" for C++.
From-SVN: r49749
Diffstat (limited to 'gcc/config/i386')
-rw-r--r-- | gcc/config/i386/djgpp-rtems.h | 9 | ||||
-rw-r--r-- | gcc/config/i386/rtems.h | 11 | ||||
-rw-r--r-- | gcc/config/i386/rtemself.h | 69 | ||||
-rw-r--r-- | gcc/config/i386/t-rtems-i386 | 40 |
4 files changed, 56 insertions, 73 deletions
diff --git a/gcc/config/i386/djgpp-rtems.h b/gcc/config/i386/djgpp-rtems.h index b8f4908..551b666 100644 --- a/gcc/config/i386/djgpp-rtems.h +++ b/gcc/config/i386/djgpp-rtems.h @@ -1,7 +1,7 @@ /* Configuration for an i386 running RTEMS on top of MS-DOS with DJGPP v2.x. - Copyright (C) 1996,1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1999, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -21,20 +21,15 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "i386/djgpp.h" - /* Specify predefined symbols in preprocessor. */ #ifdef CPP_PREDEFINES #undef CPP_PREDEFINES #endif -#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS \ +#define CPP_PREDEFINES "-Dunix -DGO32 -DDJGPP=2 -DMSDOS -D__rtems__ \ -Asystem=unix -Asystem=msdos -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* end of i386/djgpp-rtems.h */ - diff --git a/gcc/config/i386/rtems.h b/gcc/config/i386/rtems.h index 9101332..c2381c7 100644 --- a/gcc/config/i386/rtems.h +++ b/gcc/config/i386/rtems.h @@ -1,5 +1,5 @@ /* Definitions for rtems targeting an Intel i386 using coff. - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc. Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -19,19 +19,12 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#include "i386/i386-coff.h" - /* Specify predefined symbols in preprocessor. */ #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Drtems -D__rtems__ -Asystem=rtems" +#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems" /* Generate calls to memcpy, memcmp and memset. */ #ifndef TARGET_MEM_FUNCTIONS #define TARGET_MEM_FUNCTIONS #endif - -/* Get machine-independent configuration parameters for RTEMS. */ -#include <rtems.h> - -/* end of i386/rtems.h */ diff --git a/gcc/config/i386/rtemself.h b/gcc/config/i386/rtemself.h index 6e31f56..2ebc517 100644 --- a/gcc/config/i386/rtemself.h +++ b/gcc/config/i386/rtemself.h @@ -1,8 +1,6 @@ -/* Definitions for Intel 386 running Linux-based GNU systems with ELF format. - Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000 - Free Software Foundation, Inc. - Contributed by Eric Youngdale. - Modified for stabs-in-ELF by H.J. Lu. +/* Definitions for rtems targeting a ix86 using ELF. + Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc. + Contributed by Joel Sherrill (joel@OARcorp.com). This file is part of GNU CC. @@ -21,60 +19,14 @@ along with GNU CC; see the file COPYING. If not, write to the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#define LINUX_DEFAULT_ELF +/* Specify predefined symbols in preprocessor. */ -#undef TARGET_VERSION -#define TARGET_VERSION fprintf (stderr, " (i386 RTEMS with ELF)"); - -/* The svr4 ABI for the i386 says that records and unions are returned - in memory. */ -#undef DEFAULT_PCC_STRUCT_RETURN -#define DEFAULT_PCC_STRUCT_RETURN 1 - -#undef DBX_REGISTER_NUMBER -#define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n] - -/* Output assembler code to FILE to increment profiler label # LABELNO - for profiling a function entry. */ - -#undef FUNCTION_PROFILER -#define FUNCTION_PROFILER(FILE, LABELNO) \ -{ \ - if (flag_pic) \ - { \ - fprintf (FILE, "\tleal %sP%d@GOTOFF(%%ebx),%%edx\n", \ - LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall *mcount@GOT(%%ebx)\n"); \ - } \ - else \ - { \ - fprintf (FILE, "\tmovl $%sP%d,%%edx\n", LPREFIX, (LABELNO)); \ - fprintf (FILE, "\tcall mcount\n"); \ - } \ -} - -#undef SIZE_TYPE -#define SIZE_TYPE "unsigned int" - -#undef PTRDIFF_TYPE -#define PTRDIFF_TYPE "int" - -#undef WCHAR_TYPE -#define WCHAR_TYPE "long int" - -#undef WCHAR_TYPE_SIZE -#define WCHAR_TYPE_SIZE BITS_PER_WORD - #undef CPP_PREDEFINES -#define CPP_PREDEFINES "-Drtems -D__rtems__ -Asystem=rtems" - -/* A C statement (sans semicolon) to output to the stdio stream - FILE the assembler definition of uninitialized global DECL named - NAME whose size is SIZE bytes and alignment is ALIGN bytes. - Try to use asm_output_aligned_bss to implement this macro. */ +#define CPP_PREDEFINES "-D__rtems__ -Asystem=rtems \ + -D__ELF__ -D__i386__ -D__USE_INIT_FINI__" -#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN) \ - asm_output_aligned_bss (FILE, DECL, NAME, SIZE, ALIGN) +#undef CPP_SPEC +#define CPP_SPEC "%(cpp_cpu) %{msoft-float:-D_SOFT_FLOAT}" #undef STARTFILE_SPEC #define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s" @@ -82,4 +34,7 @@ Boston, MA 02111-1307, USA. */ #undef ENDFILE_SPEC #define ENDFILE_SPEC "crtend.o%s crtn.o%s" -/* end of i386/rtemself.h */ +/* Generate calls to memcpy, memcmp and memset. */ +#ifndef TARGET_MEM_FUNCTIONS +#define TARGET_MEM_FUNCTIONS +#endif diff --git a/gcc/config/i386/t-rtems-i386 b/gcc/config/i386/t-rtems-i386 index d301ed9..b57f4fd 100644 --- a/gcc/config/i386/t-rtems-i386 +++ b/gcc/config/i386/t-rtems-i386 @@ -12,3 +12,43 @@ crtn.o: $(srcdir)/config/i386/sol2-cn.asm $(GCC_PASSES) sed -e '/^!/d' <$(srcdir)/config/i386/sol2-cn.asm >crtn.s $(GCC_FOR_TARGET) -c -o crtn.o crtn.s +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +LIB2FUNCS_EXTRA = xp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + echo '#ifdef __LITTLE_ENDIAN__' > dp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>dp-bit.c + echo '#endif' >> dp-bit.c + cat $(srcdir)/config/fp-bit.c >> dp-bit.c + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + echo '#ifdef __LITTLE_ENDIAN__' >> fp-bit.c + echo '#define FLOAT_BIT_ORDER_MISMATCH' >>fp-bit.c + echo '#endif' >> fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + +xp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define EXTENDED_FLOAT_STUBS' > xp-bit.c + cat $(srcdir)/config/fp-bit.c >> xp-bit.c + +MULTILIB_OPTIONS = mcpu=i486/mcpu=pentium/mcpu=pentiumpro/mcpu=k6/mcpu=athlon \ +msoft-float mno-fp-ret-in-387 +MULTILIB_DIRNAMES= m486 mpentium mpentiumpro k6 athlon soft-float nofp +MULTILIB_MATCHES = msoft-float=mno-m80387 +MULTILIB_EXCEPTIONS = \ +mno-fp-ret-in-387 \ +mcpu=i486/*mno-fp-ret-in-387* \ +mcpu=pentium/*msoft-float* mcpu=pentium/*mno-fp-ret-in-387* \ +mcpu=pentiumpro/*msoft-float* mcpu=pentiumpro/*mno-fp-ret-in-387* \ +mcpu=k6/*msoft-float* mcpu=k6/*mno-fp-ret-in-387* \ +mcpu=athlon/*msoft-float* mcpu=athlon/*mno-fp-ret-in-387* + +EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o + +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib |