diff options
author | Matthew Fortune <matthew.fortune@imgtec.com> | 2014-12-19 20:18:08 +0000 |
---|---|---|
committer | Matthew Fortune <mpf@gcc.gnu.org> | 2014-12-19 20:18:08 +0000 |
commit | 58c9330bc1f7d1235de3fa7f4684a75d9c3d9e0c (patch) | |
tree | 441ef3911d247f7c9a52d8cd4fc6d0602c7e9b15 | |
parent | 943cf9cf629016365473adf17f42df2a61792394 (diff) | |
download | gcc-58c9330bc1f7d1235de3fa7f4684a75d9c3d9e0c.zip gcc-58c9330bc1f7d1235de3fa7f4684a75d9c3d9e0c.tar.gz gcc-58c9330bc1f7d1235de3fa7f4684a75d9c3d9e0c.tar.bz2 |
MIPSR6: mips-img-elf mips-img-linux-gnu triplets and vendor updates
gcc/
* config.gcc: Support mips*-img-linux* and mips*-img-elf*.
* config/mips/mti-linux.h: Support mips32r6 as being the default arch.
* config/mips/t-img-elf: New.
* config/mips/t-img-linux: New.
gcc/testsuite/
* gcc.target/mips/pr37362.c: Skip for mips-img-elf.
From-SVN: r218975
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/config.gcc | 13 | ||||
-rw-r--r-- | gcc/config/mips/mti-linux.h | 9 | ||||
-rw-r--r-- | gcc/config/mips/t-img-elf | 38 | ||||
-rw-r--r-- | gcc/config/mips/t-img-linux | 30 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.target/mips/pr37362.c | 2 |
7 files changed, 101 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9dce19b..05374e1 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,12 @@ 2014-12-19 Matthew Fortune <matthew.fortune@imgtec.com> + * config.gcc: Support mips*-img-linux* and mips*-img-elf*. + * config/mips/mti-linux.h: Support mips32r6 as being the default arch. + * config/mips/t-img-elf: New. + * config/mips/t-img-linux: New. + +2014-12-19 Matthew Fortune <matthew.fortune@imgtec.com> + * config.gcc: Add mipsisa64r6 and mipsisa32r6 cpu support. * config/mips/constraints.md (ZD): Add r6 restrictions. * config/mips/gnu-user.h (DRIVER_SELF_SPECS): Add MIPS_ISA_LEVEL_SPEC. diff --git a/gcc/config.gcc b/gcc/config.gcc index 259f63b..c5d9ff8 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1961,6 +1961,14 @@ mips*-*-netbsd*) # NetBSD/mips, either endian. tm_file="elfos.h ${tm_file} mips/elf.h netbsd.h netbsd-elf.h mips/netbsd.h" extra_options="${extra_options} netbsd.opt netbsd-elf.opt" ;; +mips*-img-linux*) + tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h" + extra_options="${extra_options} linux-android.opt" + tmake_file="${tmake_file} mips/t-img-linux" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32" + gnu_ld=yes + gas=yes + ;; mips*-mti-linux*) tm_file="dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h ${tm_file} mips/gnu-user.h mips/linux.h mips/linux-common.h mips/mti-linux.h" extra_options="${extra_options} linux-android.opt" @@ -2021,6 +2029,11 @@ mips*-mti-elf*) tmake_file="mips/t-mti-elf" tm_defines="${tm_defines} MIPS_ISA_DEFAULT=33 MIPS_ABI_DEFAULT=ABI_32" ;; +mips*-img-elf*) + tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h mips/mti-elf.h" + tmake_file="mips/t-img-elf" + tm_defines="${tm_defines} MIPS_ISA_DEFAULT=37 MIPS_ABI_DEFAULT=ABI_32" + ;; mips*-sde-elf*) tm_file="elfos.h newlib-stdint.h ${tm_file} mips/elf.h mips/n32-elf.h mips/sde.h" tmake_file="mips/t-sde" diff --git a/gcc/config/mips/mti-linux.h b/gcc/config/mips/mti-linux.h index 98d6582..5761ab7 100644 --- a/gcc/config/mips/mti-linux.h +++ b/gcc/config/mips/mti-linux.h @@ -19,8 +19,15 @@ along with GCC; see the file COPYING3. If not see /* This target is a multilib target, specify the sysroot paths. */ #undef SYSROOT_SUFFIX_SPEC +#if MIPS_ISA_DEFAULT == 33 /* mips32r2 is the default */ #define SYSROOT_SUFFIX_SPEC \ - "%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{mnan=2008:/nan2008}" + "%{mips32:/mips32}%{mips64:/mips64}%{mips64r2:/mips64r2}%{mips32r6:/mips32r6}%{mips64r6:/mips64r6}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{!mips32r6:%{!mips64r6:%{mnan=2008:/nan2008}}}" +#elif MIPS_ISA_DEFAULT == 37 /* mips32r6 is the default */ +#define SYSROOT_SUFFIX_SPEC \ + "%{mips32:/mips32}%{mips64:/mips64}%{mips32r2:/mips32r2}%{mips64r2:/mips64r2}%{mips64r6:/mips64r6}%{mips16:/mips16}%{mmicromips:/micromips}%{mabi=64:/64}%{mel|EL:/el}%{msoft-float:/sof}%{!mips32r6:%{!mips64r6:%{mnan=2008:/nan2008}}}" +#else /* Unexpected default ISA. */ +#error No SYSROOT_SUFFIX_SPEC exists for this default ISA +#endif #undef DRIVER_SELF_SPECS #define DRIVER_SELF_SPECS \ diff --git a/gcc/config/mips/t-img-elf b/gcc/config/mips/t-img-elf new file mode 100644 index 0000000..cc5dabb --- /dev/null +++ b/gcc/config/mips/t-img-elf @@ -0,0 +1,38 @@ +# Copyright (C) 2014 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/>. + +# The default build is mips32r6, hard-float big-endian. +# A multilib for mips32r6+LE +# A multilib for mips64r6 +# A multilib for mips64r6+LE +# A multilib for mips32r6+LE+singlefloat+shortdouble + +MULTILIB_OPTIONS = mips64r6 mabi=64 EL msoft-float/msingle-float fshort-double +MULTILIB_DIRNAMES = mips64r6 64 el sof sgl short +MULTILIB_MATCHES = EL=mel EB=meb + +# Don't build 64r6 with single-float +MULTILIB_EXCEPTIONS += mips64r6/*msingle-float* +MULTILIB_EXCEPTIONS += mips64r6/*fshort-double* + +MULTILIB_EXCEPTIONS += mabi=64* +MULTILIB_EXCEPTIONS += msingle-float* +MULTILIB_EXCEPTIONS += *msingle-float +MULTILIB_EXCEPTIONS += fshort-double +MULTILIB_EXCEPTIONS += EL/fshort-double +MULTILIB_EXCEPTIONS += *msoft-float/fshort-double diff --git a/gcc/config/mips/t-img-linux b/gcc/config/mips/t-img-linux new file mode 100644 index 0000000..5dbfbe4 --- /dev/null +++ b/gcc/config/mips/t-img-linux @@ -0,0 +1,30 @@ +# Copyright (C) 2014 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/>. + +# The default build is mips32r6, hard-float big-endian. Add mips64r6, +# 64-bit ABI and little-endian variations. + +MULTILIB_OPTIONS = mips64r6 mabi=64 EL +MULTILIB_DIRNAMES = mips64r6 64 el +MULTILIB_MATCHES = EL=mel EB=meb + +# The 64 bit ABI is not supported on the mips32r6 architecture. +# Because mips32r6 is the default we can't use that flag to trigger +# the exception so we check for mabi=64 with no specific mips +# architecture flag instead. +MULTILIB_EXCEPTIONS += mabi=64* diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8d2f41c..d00b5d7 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,4 +1,8 @@ 2014-12-19 Matthew Fortune <matthew.fortune@imgtec.com> + + * gcc.target/mips/pr37362.c: Skip for mips-img-elf. + +2014-12-19 Matthew Fortune <matthew.fortune@imgtec.com> Steve Ellcey <sellcey@imgtec.com> * gcc.dg/torture/mips-hilo-2.c: Unconditionally pass for R6 onwards. diff --git a/gcc/testsuite/gcc.target/mips/pr37362.c b/gcc/testsuite/gcc.target/mips/pr37362.c index 848d879..2ad4e8d 100644 --- a/gcc/testsuite/gcc.target/mips/pr37362.c +++ b/gcc/testsuite/gcc.target/mips/pr37362.c @@ -1,5 +1,5 @@ /* mips*-sde-elf doesn't have 128-bit long doubles. */ -/* { dg-do compile { target { ! { mips*-sde-elf mips*-mti-elf } } } } */ +/* { dg-do compile { target { ! { mips*-sde-elf mips*-mti-elf mips*-img-elf } } } } */ /* { dg-options "-march=mips64r2 -mabi=n32" } */ typedef float TFtype __attribute__((mode(TF))); |