aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorOlivier Hainque <hainque@act-europe.fr>2003-05-09 21:06:56 +0200
committerRichard Kenner <kenner@gcc.gnu.org>2003-05-09 15:06:56 -0400
commitb3dd7e32bf9c4019eea63b10ff2c833f4108a5d4 (patch)
treeb2cbc5e6e1ff4d65172ce04c1476598c0af4fce0 /gcc
parentf8a30250165a6dc9ac3e323cdf0859f13b4b69d8 (diff)
downloadgcc-b3dd7e32bf9c4019eea63b10ff2c833f4108a5d4.zip
gcc-b3dd7e32bf9c4019eea63b10ff2c833f4108a5d4.tar.gz
gcc-b3dd7e32bf9c4019eea63b10ff2c833f4108a5d4.tar.bz2
vxxscale.h, [...]: New files.
* config/arm/vxxscale.h, config/arm/vxxscale-coff.h: New files. * config/arm/vxxscale-elf.h, config/arm/t-vxxscale-elf: Likewise. * config.gcc (xscale-coff-vxworks, xscale-wrs-vxworks): New new cases. * fixinc/fixinc.copy: New file. * fixinc/mkfixinc.sh (*-vxworks*): New case, using above. From-SVN: r66639
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config.gcc13
-rw-r--r--gcc/config/arm/t-vxxscale-elf56
-rw-r--r--gcc/config/arm/vxxscale-coff.h27
-rw-r--r--gcc/config/arm/vxxscale-elf.h33
-rw-r--r--gcc/config/arm/vxxscale.h80
-rw-r--r--gcc/fixinc/fixinc.copy2
-rwxr-xr-xgcc/fixinc/mkfixinc.sh4
8 files changed, 223 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index d7ac8d8..52c6485 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2003-05-09 Olivier Hainque <hainque@act-europe.fr>
+
+ * config/arm/vxxscale.h, config/arm/vxxscale-coff.h: New files.
+ * config/arm/vxxscale-elf.h, config/arm/t-vxxscale-elf: Likewise.
+ * config.gcc (xscale-coff-vxworks, xscale-wrs-vxworks): New new cases.
+ * fixinc/fixinc.copy: New file.
+ * fixinc/mkfixinc.sh (*-vxworks*): New case, using above.
+
2003-05-09 Alexandre Oliva <aoliva@redhat.com>
* reload1.c (reload_cse_move2add): Don't turn an implicit
diff --git a/gcc/config.gcc b/gcc/config.gcc
index b168c7c..2b3b434 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2622,6 +2622,19 @@ xscale-*-coff)
md_file=arm/arm.md
extra_modes=arm/arm-modes.def
;;
+xscale-coff-vxworks)
+ tm_file="arm/semi.h arm/aout.h arm/coff.h arm/arm.h"
+ tm_file="${tm_file} arm/vxxscale.h arm/vxxscale-coff.h"
+ tmake_file=arm/t-xscale-coff
+ thread_file='vxworks'
+ use_collect2=no
+ ;;
+xscale-wrs-vxworks)
+ tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h"
+ tm_file="${tm_file} arm/arm.h arm/vxxscale.h arm/vxxscale-elf.h"
+ tmake_file=arm/t-vxxscale-elf
+ thread_file='vxworks'
+ ;;
xstormy16-*-elf)
# For historical reasons, the target files omit the 'x'.
tm_file="dbxelf.h elfos.h svr4.h stormy16/stormy16.h"
diff --git a/gcc/config/arm/t-vxxscale-elf b/gcc/config/arm/t-vxxscale-elf
new file mode 100644
index 0000000..c8ab34c
--- /dev/null
+++ b/gcc/config/arm/t-vxxscale-elf
@@ -0,0 +1,56 @@
+LIB1ASMSRC = arm/lib1funcs.asm
+LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _bb_init_func _call_via_rX _interwork_call_via_rX
+
+# 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
+
+fp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#define FLOAT' > fp-bit.c
+ echo '#ifndef __ARMEB__' >> 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
+
+dp-bit.c: $(srcdir)/config/fp-bit.c
+ echo '#ifndef __ARMEB__' > 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
+
+MULTILIB_OPTIONS = mlittle-endian/mbig-endian
+MULTILIB_DIRNAMES = le be
+MULTILIB_EXCEPTIONS =
+MULTILIB_MATCHES = mbig-endian=mbe mlittle-endian=mle
+
+# Note XScale does not support 26 bit APCS.
+# Note XScale does not support hard FP
+
+MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
+MULTILIB_DIRNAMES += normal interwork
+
+MULTILIB_OPTIONS += marm/mthumb
+MULTILIB_DIRNAMES += arm thumb
+MULTILIB_EXCEPTIONS += *mhard-float/*mthumb*
+
+MULTILIB_REDUNDANT_DIRS = interwork/thumb=thumb
+
+EXTRA_MULTILIB_PARTS = crtbegin.o crtend.o crti.o crtn.o
+
+LIBGCC = stmp-multilib
+INSTALL_LIBGCC = install-multilib
+
+# Currently there is a bug somewhere in GCC's alias analysis
+# or scheduling code that is breaking _fpmul_parts in fp-bit.c.
+# Disabling function inlining is a workaround for this problem.
+TARGET_LIBGCC2_CFLAGS = -Dinhibit_libc -fno-inline
+
+# Assemble startup files.
+$(T)crti.o: $(srcdir)/config/arm/crti.asm $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
+ -c -o $(T)crti.o -x assembler-with-cpp $(srcdir)/config/arm/crti.asm
+
+$(T)crtn.o: $(srcdir)/config/arm/crtn.asm $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(GCC_CFLAGS) $(MULTILIB_CFLAGS) $(INCLUDES) \
+ -c -o $(T)crtn.o -x assembler-with-cpp $(srcdir)/config/arm/crtn.asm
diff --git a/gcc/config/arm/vxxscale-coff.h b/gcc/config/arm/vxxscale-coff.h
new file mode 100644
index 0000000..f66797f
--- /dev/null
+++ b/gcc/config/arm/vxxscale-coff.h
@@ -0,0 +1,27 @@
+/* Definitions of target machine for GNU compiler,
+ targetting the XSCALE/VxWorks/COFF run time environment.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (XScale/COFF VxWorks)", stderr);
+
+#undef SUBTARGET_EXTRA_ASM_SPEC
+#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mcpu=xscale}"
diff --git a/gcc/config/arm/vxxscale-elf.h b/gcc/config/arm/vxxscale-elf.h
new file mode 100644
index 0000000..ff65708
--- /dev/null
+++ b/gcc/config/arm/vxxscale-elf.h
@@ -0,0 +1,33 @@
+/* Definitions of target machine for GNU compiler,
+ targetting the XSCALE/VxWorks/ELF run time environment.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fputs (" (XScale/ELF VxWorks)", stderr);
+
+#define SUBTARGET_EXTRA_ASM_SPEC "%{!mcpu=*:-mxscale} %{!mhard-float:-mno-fpu}"
+
+#ifndef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS \
+ { "mlittle-endian", "mno-thumb-interwork", "marm", "msoft-float" }
+#endif
+
+#undef FLOAT_WORDS_BIG_ENDIAN
+#define FLOAT_WORDS_BIG_ENDIAN (TARGET_BIG_END != 0)
diff --git a/gcc/config/arm/vxxscale.h b/gcc/config/arm/vxxscale.h
new file mode 100644
index 0000000..16174a1
--- /dev/null
+++ b/gcc/config/arm/vxxscale.h
@@ -0,0 +1,80 @@
+/* Definitions of target machine for GNU compiler,
+ targetting the XSCALE/VxWorks run time environments.
+ Common definitions for both the COFF (VxWorks5.4/T2.1)
+ and ELF (VxWorks5.5/T2.2) targets.
+ Copyright (C) 2003 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define SUBTARGET_CPU_DEFAULT TARGET_CPU_xscale
+
+#undef CPP_PREDEFINES
+#define CPP_PREDEFINES "-DCPU=XSCALE -D__vxworks -Acpu=xscale -Amachine=xscale"
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32)
+
+#undef ASM_FILE_START
+#define ASM_FILE_START(STREAM) \
+ do \
+ { \
+ fprintf (STREAM, "%s Generated by gcc %s for Xscale/VxWorks\n", \
+ ASM_COMMENT_START, version_string); \
+ } \
+ while (0)
+
+/* Set up a trampoline, without forgetting to flush the Icache. */
+#undef INITIALIZE_TRAMPOLINE
+#define INITIALIZE_TRAMPOLINE(TRAMP, FNADDR, CXT) \
+{ \
+ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 8)), \
+ (CXT)); \
+ emit_move_insn (gen_rtx (MEM, SImode, plus_constant ((TRAMP), 12)), \
+ (FNADDR)); \
+ emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__clear_cache"), \
+ 0, VOIDmode, 2, TRAMP, Pmode, \
+ plus_constant (TRAMP, TRAMPOLINE_SIZE), Pmode); \
+}
+
+/* Clear the instruction cache from `BEG' to `END', resorting to the
+ appropriate VxWorks service. */
+#define CLEAR_INSN_CACHE(BEG, END) \
+{ \
+ extern int cacheTextUpdate (void *, size_t); \
+ cacheTextUpdate ((void *) (BEG), (size_t) ((END) - (BEG))); \
+}
+
+/* VxWorks does all the library stuff itself. */
+#undef LIB_SPEC
+#define LIB_SPEC ""
+
+/* VxWorks uses object files, not loadable images. make linker just
+ combine objects. */
+#undef LINK_SPEC
+#define LINK_SPEC "-r"
+
+/* VxWorks provides the functionality of crt0.o and friends itself. */
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC ""
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC ""
+
+#define EH_FRAME_IN_DATA_SECTION
+/* ??? To be investigated, in order to avoid link time errors against
+ __EH_FRAME_BEGIN__, only defined through the use of crtstuff. */
diff --git a/gcc/fixinc/fixinc.copy b/gcc/fixinc/fixinc.copy
new file mode 100644
index 0000000..8d70b28
--- /dev/null
+++ b/gcc/fixinc/fixinc.copy
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp -R $2/* $1
diff --git a/gcc/fixinc/mkfixinc.sh b/gcc/fixinc/mkfixinc.sh
index 042ed82..e8d176f 100755
--- a/gcc/fixinc/mkfixinc.sh
+++ b/gcc/fixinc/mkfixinc.sh
@@ -60,6 +60,10 @@ case $machine in
fixincludes=fixinc.ptx
;;
+ *-vxworks*)
+ fixincludes=fixinc.copy
+ ;;
+
alpha*-dec-*vms* | \
arm-semi-aout | \
armel-semi-aout | \