Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist Merge OR1K support from OR1K GCC 4.9 ...



details:   https://anonhg.NetBSD.org/src/rev/e8fb3a6352e5
branches:  trunk
changeset: 802117:e8fb3a6352e5
user:      matt <matt%NetBSD.org@localhost>
date:      Wed Sep 03 19:02:53 2014 +0000

description:
Merge OR1K support from OR1K GCC 4.9 git tree and extend it to support NetBSD.

diffstat:

 external/gpl3/gcc/dist/config.sub                           |    13 +-
 external/gpl3/gcc/dist/gcc/common/config/or1k/or1k-common.c |    30 +
 external/gpl3/gcc/dist/gcc/config.gcc                       |    40 +
 external/gpl3/gcc/dist/gcc/config/or1k/constraints.md       |    59 +
 external/gpl3/gcc/dist/gcc/config/or1k/elf.h                |    31 +
 external/gpl3/gcc/dist/gcc/config/or1k/linux-elf.h          |    98 +
 external/gpl3/gcc/dist/gcc/config/or1k/linux-gas.h          |    37 +
 external/gpl3/gcc/dist/gcc/config/or1k/netbsd.h             |   107 +
 external/gpl3/gcc/dist/gcc/config/or1k/or1k-modes.def       |    38 +
 external/gpl3/gcc/dist/gcc/config/or1k/or1k-opts.h          |    14 +
 external/gpl3/gcc/dist/gcc/config/or1k/or1k-protos.h        |    67 +
 external/gpl3/gcc/dist/gcc/config/or1k/or1k.c               |  2479 +++++++++++
 external/gpl3/gcc/dist/gcc/config/or1k/or1k.h               |  1202 +++++
 external/gpl3/gcc/dist/gcc/config/or1k/or1k.md              |  1599 +++++++
 external/gpl3/gcc/dist/gcc/config/or1k/or1k.opt             |    96 +
 external/gpl3/gcc/dist/gcc/config/or1k/predicates.md        |   121 +
 external/gpl3/gcc/dist/gcc/config/or1k/t-linux              |    12 +
 external/gpl3/gcc/dist/gcc/config/or1k/t-or1k               |    28 +
 external/gpl3/gcc/dist/gcc/config/or1k/t-or1knd             |    28 +
 external/gpl3/gcc/dist/libgcc/config.host                   |    14 +
 external/gpl3/gcc/dist/libgcc/config/or1k/crti.S            |    36 +
 external/gpl3/gcc/dist/libgcc/config/or1k/crtn.S            |    37 +
 external/gpl3/gcc/dist/libgcc/config/or1k/linux-unwind.h    |    77 +
 external/gpl3/gcc/dist/libgcc/config/or1k/or1k-asm.h        |    20 +
 external/gpl3/gcc/dist/libgcc/config/or1k/or1k.S            |   237 +
 external/gpl3/gcc/dist/libgcc/config/or1k/sfp-machine.h     |    54 +
 external/gpl3/gcc/dist/libgcc/config/or1k/t-crtstuff        |     4 +
 external/gpl3/gcc/dist/libgcc/config/or1k/t-linux           |     2 +
 external/gpl3/gcc/dist/libgcc/config/or1k/t-or1k            |    23 +
 29 files changed, 6598 insertions(+), 5 deletions(-)

diffs (truncated from 6765 to 300 lines):

diff -r a601adee5efb -r e8fb3a6352e5 external/gpl3/gcc/dist/config.sub
--- a/external/gpl3/gcc/dist/config.sub Wed Sep 03 19:01:15 2014 +0000
+++ b/external/gpl3/gcc/dist/config.sub Wed Sep 03 19:02:53 2014 +0000
@@ -297,7 +297,7 @@
        | nios | nios2 | nios2eb | nios2el \
        | ns16k | ns32k \
        | open8 \
-       | or1k | or32 \
+       | or1k | or1knd \
        | pdp10 | pdp11 | pj | pjl \
        | powerpc | powerpc64 | powerpc64le | powerpcle \
        | pyramid \
@@ -922,8 +922,11 @@
                basic_machine=hppa1.1-oki
                os=-proelf
                ;;
-       openrisc | openrisc-*)
-               basic_machine=or32-unknown
+       or1k | or1k-*)
+               basic_machine=or1k-unknown
+               ;;
+       or1knd | or1knd-*)
+               basic_machine=or1knd-unknown
                ;;
        os400)
                basic_machine=powerpc-ibm
@@ -1599,8 +1602,8 @@
        or1k-*)
                os=-elf
                ;;
-       or32-*)
-               os=-coff
+       or1knd-*)
+               os=-elf
                ;;
        *-tti)  # must be before sparc entry or we get the wrong os.
                os=-sysv3
diff -r a601adee5efb -r e8fb3a6352e5 external/gpl3/gcc/dist/gcc/common/config/or1k/or1k-common.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/common/config/or1k/or1k-common.c       Wed Sep 03 19:02:53 2014 +0000
@@ -0,0 +1,30 @@
+/* Common hooks for VAX.
+   Copyright (C) 1987-2013 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 3, 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 COPYING3.  If not see
+<http://www.gnu.org/licenses/>.  */
+
+#include "config.h"
+#include "system.h"
+#include "coretypes.h"
+#include "tm.h"
+#include "common/common-target.h"
+#include "common/common-target-def.h"
+
+#undef TARGET_DEFAULT_TARGET_FLAGS
+#define TARGET_DEFAULT_TARGET_FLAGS TARGET_DEFAULT
+
+struct gcc_targetm_common targetm_common = TARGETM_COMMON_INITIALIZER;
diff -r a601adee5efb -r e8fb3a6352e5 external/gpl3/gcc/dist/gcc/config.gcc
--- a/external/gpl3/gcc/dist/gcc/config.gcc     Wed Sep 03 19:01:15 2014 +0000
+++ b/external/gpl3/gcc/dist/gcc/config.gcc     Wed Sep 03 19:02:53 2014 +0000
@@ -426,6 +426,12 @@
        extra_headers="loongson.h"
        extra_options="${extra_options} g.opt mips/mips-tables.opt"
        ;;
+or1k-*-*)
+        cpu_type=or1k
+        ;;
+or1knd-*-*)
+        cpu_type=or1k
+        ;;
 picochip-*-*)
         cpu_type=picochip
         ;;
@@ -2065,6 +2071,40 @@
        use_collect2=no
        use_gcc_stdint=wrap
        ;;
+or1k-*-elf*)
+       tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ${cpu_type}/elf.h"
+       extra_parts="crti.o crtbegin.o crtend.o crtn.o"
+       tmake_file=or1k/t-or1k
+       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
+       ;;
+or1k-*-linux-*)
+       tm_file="${tm_file} dbxelf.h elfos.h or1k/elf.h gnu-user.h linux.h or1k/linux-gas.h or1k/linux-elf.h uclibc-stdint.h"
+       tmake_file="or1k/t-or1k or1k/t-linux ${tmake_file}"
+       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
+       ;;
+or1k-*-netbsd*)
+       tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h netbsd-stdint.h or1k/netbsd.h"
+       #tmake_file="or1k/t-or1k ${tmake_file}"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_ON"
+       ;;
+or1knd-*-elf*)
+       tm_file="${tm_file} dbxelf.h elfos.h newlib-stdint.h ${cpu_type}/elf.h"
+       extra_parts="crti.o crtbegin.o crtend.o crtn.o"
+       tmake_file=or1k/t-or1knd
+       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
+       ;;
+or1knd-*-linux-*)
+       tm_file="${tm_file} dbxelf.h elfos.h or1k/elf.h linux.h or1k/linux-gas.h or1k/linux-elf.h uclibc-stdint.h"
+       tmake_file="or1k/t-or1knd or1k/t-linux ${tmake_file}"
+       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
+       ;;
+or1knd-*-netbsd*)
+       tm_file="${tm_file} dbxelf.h elfos.h netbsd.h netbsd-elf.h netbsd-stdint.h or1k/netbsd.h"
+       #tmake_file="or1k/t-or1k ${tmake_file}"
+       extra_options="${extra_options} netbsd.opt netbsd-elf.opt"
+       tm_defines="${tm_defines} OR1K_DELAY_DEFAULT=OR1K_DELAY_OFF"
+       ;;
 pdp11-*-*)
        tm_file="${tm_file} newlib-stdint.h"
        use_gcc_stdint=wrap
diff -r a601adee5efb -r e8fb3a6352e5 external/gpl3/gcc/dist/gcc/config/or1k/constraints.md
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/or1k/constraints.md     Wed Sep 03 19:02:53 2014 +0000
@@ -0,0 +1,59 @@
+;; Copyright (C) 2010 Embecosm Limited
+;;
+;; Contributed by Joern Rennecke <joern.rennecke%embecosm.com@localhost> in 2010
+;;
+;; 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 3, 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 COPYING3.  If not see
+;; <http://www.gnu.org/licenses/>.
+
+(define_constraint "I"
+  ""
+  (and (match_code "const_int")
+       (match_test "ival >= -32768 && ival <= 32767")))
+
+(define_constraint "J"
+  ""
+  (and (match_code "const_int")
+       (match_test "ival == 0")))
+
+(define_constraint "K"
+  ""
+  (and (match_code "const_int")
+       (match_test "ival >= 0 && ival <= 65535")))
+
+(define_constraint "L"
+  ""
+  (and (match_code "const_int")
+       (match_test "ival >= 0 && ival <= 31")))
+
+(define_constraint "M"
+  ""
+  (and (match_code "const_int")
+       (match_test "(ival & 0xffff) == 0")))
+
+(define_constraint "N"
+  ""
+  (and (match_code "const_int")
+       (match_test "ival >= -33554432 && ival <= 33554431")))
+
+(define_constraint "O"
+  ""
+  (and (match_code "const_int")
+       (match_test "ival == 0")))
+
+(define_constraint "C"
+  ""
+  (match_code "const_double"))
+
diff -r a601adee5efb -r e8fb3a6352e5 external/gpl3/gcc/dist/gcc/config/or1k/elf.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/or1k/elf.h      Wed Sep 03 19:02:53 2014 +0000
@@ -0,0 +1,31 @@
+/* Definitions for rtems targeting an OpenRisc OR1K using COFF
+   ??? this is for OR1K, but the rest of the above seems bogus.
+   Copyright (C) 1996, 1997, 2005 Free Software Foundation, Inc.
+   Contributed by Joel Sherrill (joel%OARcorp.com@localhost).
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* Use ELF */
+#undef  OBJECT_FORMAT_ELF
+#define OBJECT_FORMAT_ELF
+
+/* or1k debug info support is controlled by tm.h header files we include:
+   dbxelf.h enables optional stabs debug info.
+   elfos.h sets PREFERRED_DEBUGGING_TYPE to DWARF2_DEBUG .  */
+
+#define DRIVER_SELF_SPECS "%{!mno-newlib:-mnewlib}"
diff -r a601adee5efb -r e8fb3a6352e5 external/gpl3/gcc/dist/gcc/config/or1k/linux-elf.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/external/gpl3/gcc/dist/gcc/config/or1k/linux-elf.h        Wed Sep 03 19:02:53 2014 +0000
@@ -0,0 +1,98 @@
+/* Definitions for or1k running Linux-based GNU systems using ELF
+   Copyright (C) 2002, 2005
+   Free Software Foundation, Inc.
+   Contributed by Marko Mlinar <markom%opencores.org@localhost>
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 this program; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+/* elfos.h should have already been included.  Now just override
+   any conflicting definitions and add any extras.  */
+
+/* Do not assume anything about header files.  */
+#define NO_IMPLICIT_EXTERN_C
+
+/* This is how we tell the assembler that two symbols have the same value.  */
+#define ASM_OUTPUT_DEF(FILE, NAME1, NAME2) \
+  do                                       \
+    {                                      \
+      assemble_name (FILE, NAME1);         \
+      fputs (" = ", FILE);                 \
+      assemble_name (FILE, NAME2);         \
+      fputc ('\n', FILE);                  \
+    }                                      \
+    while (0)
+
+
+#if 0
+/* Node: Label Output */
+
+#define SET_ASM_OP      "\t.set\t"
+
+#define ASM_OUTPUT_EXTERNAL_LIBCALL(FILE, FUN)  \
+  (*targetm.asm_out.globalize_label) (FILE, XSTR (FUN, 0))
+
+#define ASM_WEAKEN_LABEL(FILE, NAME)    \
+  do                                    \
+    {                                   \
+      fputs ("\t.weak\t", (FILE));      \
+      assemble_name ((FILE), (NAME));   \
+      fputc ('\n', (FILE));             \
+    }                                   \
+  while (0)
+
+#endif
+
+/* The GNU C++ standard library requires that these macros be defined.  */
+#undef CPLUSPLUS_CPP_SPEC
+#define CPLUSPLUS_CPP_SPEC "-D_GNU_SOURCE %(cpp)"
+
+#undef DRIVER_SELF_SPECS
+#define DRIVER_SELF_SPECS ""
+
+#define GLIBC_DYNAMIC_LINKER "/lib/ld.so.1"
+
+/* Define a set of Linux builtins. This is copied from linux.h. We can't
+   include the whole file for now, because that causes configure to require ld



Home | Main Index | Thread Index | Old Index