diff options
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/common/config/nds32/nds32-common.c | 2 | ||||
-rw-r--r-- | gcc/config/nds32/nds32.h | 19 | ||||
-rw-r--r-- | gcc/config/nds32/nds32.opt | 4 | ||||
-rw-r--r-- | gcc/config/nds32/t-mlibs | 14 |
5 files changed, 23 insertions, 26 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c585d0d..cff776f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,15 @@ 2015-01-13 Chung-Ju Wu <jasonwucj@gmail.com> + * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): + Remove MASK_GP_DIRECT flag. + * config/nds32/nds32.h (MULTILIB_DEFAULTS): Have -mcmodel=medium as + one of the multilib default options. + * config/nds32/nds32.opt (mgp-direct): Remove. + * config/nds32/t-mlibs (MULTILIB_OPTIONS): Use -mcmodel instead of + -mgp-direct. We also remove unnecessary -mlittle-endian/-mbig-endian. + +2015-01-13 Chung-Ju Wu <jasonwucj@gmail.com> + * config/nds32/nds32.opt (mcmodel): Add new option. * config/nds32/nds32-opts.h (nds32_cmodel_type): Add new enum type to describe code model. diff --git a/gcc/common/config/nds32/nds32-common.c b/gcc/common/config/nds32/nds32-common.c index a478e6c..a633ed7 100644 --- a/gcc/common/config/nds32/nds32-common.c +++ b/gcc/common/config/nds32/nds32-common.c @@ -95,14 +95,12 @@ static const struct default_options nds32_option_optimization_table[] = Other MASK_XXX flags are set individually. By default we enable - TARGET_GP_DIRECT: Generate gp-imply instruction. TARGET_16_BIT : Generate 16/32 bit mixed length instruction. TARGET_PERF_EXT : Generate performance extention instrcution. TARGET_CMOV : Generate conditional move instruction. */ #undef TARGET_DEFAULT_TARGET_FLAGS #define TARGET_DEFAULT_TARGET_FLAGS \ (TARGET_CPU_DEFAULT \ - | MASK_GP_DIRECT \ | MASK_16_BIT \ | MASK_PERF_EXT \ | MASK_CMOV) diff --git a/gcc/config/nds32/nds32.h b/gcc/config/nds32/nds32.h index 7c38f7f..d9a55ad 100644 --- a/gcc/config/nds32/nds32.h +++ b/gcc/config/nds32/nds32.h @@ -391,17 +391,22 @@ enum nds32_builtins #define ENDFILE_SPEC \ " %{!mno-ctor-dtor:crtend1.o%s}" -/* The TARGET_BIG_ENDIAN_DEFAULT is defined if we configure gcc - with --target=nds32be-* setting. - Check gcc/config.gcc for more information. - In addition, currently we only have elf toolchain, - where mgp-direct is always the default. */ +/* The TARGET_BIG_ENDIAN_DEFAULT is defined if we + configure gcc with --target=nds32be-* setting. + Check gcc/config.gcc for more information. */ #ifdef TARGET_BIG_ENDIAN_DEFAULT -#define MULTILIB_DEFAULTS { "mbig-endian", "mgp-direct" } +# define NDS32_ENDIAN_DEFAULT "mbig-endian" #else -#define MULTILIB_DEFAULTS { "mlittle-endian", "mgp-direct" } +# define NDS32_ENDIAN_DEFAULT "mlittle-endian" #endif +/* Currently we only have elf toolchain, + where -mcmodel=medium is always the default. */ +#define NDS32_CMODEL_DEFAULT "mcmodel=medium" + +#define MULTILIB_DEFAULTS \ + { NDS32_ENDIAN_DEFAULT, NDS32_CMODEL_DEFAULT } + /* Run-time Target Specification. */ diff --git a/gcc/config/nds32/nds32.opt b/gcc/config/nds32/nds32.opt index 346c9c0..fa8a6ce 100644 --- a/gcc/config/nds32/nds32.opt +++ b/gcc/config/nds32/nds32.opt @@ -53,10 +53,6 @@ m16-bit Target Report Mask(16_BIT) Generate 16-bit instructions. -mgp-direct -Target Report Mask(GP_DIRECT) -Generate GP base instructions directly. - misr-vector-size= Target RejectNegative Joined UInteger Var(nds32_isr_vector_size) Init(NDS32_DEFAULT_ISR_VECTOR_SIZE) Specify the size of each interrupt vector, which must be 4 or 16. diff --git a/gcc/config/nds32/t-mlibs b/gcc/config/nds32/t-mlibs index dd70205..d9e5ba4 100644 --- a/gcc/config/nds32/t-mlibs +++ b/gcc/config/nds32/t-mlibs @@ -18,21 +18,9 @@ # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. -# We need to build following multilibs combinations: -# -# 1. <None multilibs> -# 2. -mlittle-endian -# 3. -mbig-endian -# 4. -mgp-direct -# 5. -mno-gp-direct -# 6. -mlittle-endian -mgp-direct -# 7. -mlittle-endian -mno-gp-direct -# 8. -mbig-endian -mgp-direct -# 9. -mbig-endian -mno-gp-direct -# # We also define a macro MULTILIB_DEFAULTS in nds32.h that tells the # driver program which options are defaults for this target and thus # do not need to be handled specially. -MULTILIB_OPTIONS = mlittle-endian/mbig-endian mgp-direct/mno-gp-direct +MULTILIB_OPTIONS = mcmodel=small/mcmodel=medium/mcmodel=large # ------------------------------------------------------------------------ |