aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorChung-Ju Wu <jasonwucj@gmail.com>2013-10-31 17:08:16 +0000
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>2013-10-31 17:08:16 +0000
commit9304f876116aae3d297ab5bf7341749f09406a50 (patch)
tree5479731a485c268d194925363d10034093696843 /gcc/config.gcc
parent7214306b3e376bff94b20e468018fb356264b33a (diff)
downloadgcc-9304f876116aae3d297ab5bf7341749f09406a50.zip
gcc-9304f876116aae3d297ab5bf7341749f09406a50.tar.gz
gcc-9304f876116aae3d297ab5bf7341749f09406a50.tar.bz2
Add new nds32 port, including machine description, libgcc, and documentation.
[gcc/ChangeLog] * config.gcc (nds32*-*-*): Add nds32 target. * config/nds32/nds32.c: New file. * config/nds32/nds32.h: New file. * config/nds32/nds32.md: New file. * config/nds32/constants.md: New file. * config/nds32/constraints.md: New file. * config/nds32/iterators.md: New file. * config/nds32/nds32-doubleword.md: New file. * config/nds32/nds32-intrinsic.md: New file. * config/nds32/nds32_intrinsic.h: New file. * config/nds32/nds32-modes.def: New file. * config/nds32/nds32-multiple.md: New file. * config/nds32/nds32.opt: New file. * config/nds32/nds32-opts.h: New file. * config/nds32/nds32-protos.h: New file. * config/nds32/nds32-peephole2.md: New file. * config/nds32/pipelines.md: New file. * config/nds32/predicates.md: New file. * config/nds32/t-mlibs: New file. * common/config/nds32: New directory and files. * doc/invoke.texi (NDS32 options): Document nds32 specific options. * doc/md.texi (NDS32 family): Document nds32 specific constraints. * doc/install.texi (Cross-Compiler-Specific Options): Document --with-nds32-lib for nds32 target. * doc/extend.texi (Function Attributes, Target Builtins): Document nds32 specific attributes. [libgcc/ChangeLog] * config.host (nds32*-elf*): Add nds32 target. * config/nds32 : New directory and files. [contrib/ChangeLog] * config-list.mk (nds32le-elf, nds32be-elf): Add nds32 target. Co-Authored-By: Shiva Chen <shiva0217@gmail.com> From-SVN: r204269
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc49
1 files changed, 49 insertions, 0 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index a90ab25..e1878bd 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -421,6 +421,10 @@ mips*-*-*)
extra_headers="loongson.h"
extra_options="${extra_options} g.opt mips/mips-tables.opt"
;;
+nds32*)
+ cpu_type=nds32
+ extra_headers="nds32_intrinsic.h"
+ ;;
picochip-*-*)
cpu_type=picochip
;;
@@ -2091,6 +2095,18 @@ msp430*-*-*)
target_has_targetm_common=no
tmake_file="${tmake_file} msp430/t-msp430"
;;
+nds32le-*-*)
+ target_cpu_default="0"
+ tm_defines="${tm_defines}"
+ tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
+ tmake_file="nds32/t-mlibs"
+ ;;
+nds32be-*-*)
+ target_cpu_default="0|MASK_BIG_ENDIAN"
+ tm_defines="${tm_defines} TARGET_BIG_ENDIAN_DEFAULT=1"
+ tm_file="dbxelf.h elfos.h newlib-stdint.h ${tm_file}"
+ tmake_file="nds32/t-mlibs"
+ ;;
pdp11-*-*)
tm_file="${tm_file} newlib-stdint.h"
use_gcc_stdint=wrap
@@ -3754,6 +3770,39 @@ case "${target}" in
esac
;;
+ nds32*-*-*)
+ supported_defaults="arch nds32_lib"
+
+ # process --with-arch
+ case "${with_arch}" in
+ "" | v2 | v3 | v3m)
+ # OK
+ ;;
+ *)
+ echo "Cannot accept --with-arch=$with_arch, available values are: v2 v3 v3m" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # process --with-nds32-lib
+ case "${with_nds32_lib}" in
+ "")
+ # the default library is newlib
+ with_nds32_lib=newlib
+ ;;
+ newlib)
+ # OK
+ ;;
+ mculib)
+ # OK
+ ;;
+ *)
+ echo "Cannot accept --with-nds32-lib=$with_nds32_lib, available values are: newlib mculib" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+
powerpc*-*-* | rs6000-*-*)
supported_defaults="cpu cpu_32 cpu_64 float tune tune_32 tune_64"