From: Chung-Ju Wu Date: Tue, 13 Jan 2015 05:22:25 +0000 (+0000) Subject: [NDS32] Remove -mgp-direct/-mno-gp-direct options. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c9eb51a7f76f70476afb4ebebefe1efbc7b2d035;p=gcc.git [NDS32] Remove -mgp-direct/-mno-gp-direct options. gcc/ * 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. From-SVN: r219510 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index c585d0d518b..cff776fb2cc 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2015-01-13 Chung-Ju Wu + + * 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 * config/nds32/nds32.opt (mcmodel): Add new option. diff --git a/gcc/common/config/nds32/nds32-common.c b/gcc/common/config/nds32/nds32-common.c index a478e6c0a84..a633ed7972d 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 7c38f7f7b35..d9a55adff48 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 346c9c073f1..fa8a6cea6fa 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 dd70205e123..d9e5ba4b952 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 # . -# We need to build following multilibs combinations: -# -# 1. -# 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 # ------------------------------------------------------------------------