aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorChung-Ju Wu <jasonwucj@gmail.com>2015-01-13 05:17:54 +0000
committerChung-Ju Wu <jasonwucj@gcc.gnu.org>2015-01-13 05:17:54 +0000
commitfe4c07dc48d92369c030a216831fe6aff8b860bd (patch)
tree7378dca118ac738e565a0f11a6561f0b7b847d0d /gcc/config
parentd9a5f0cc4f16f711ef503be185988b4eb1d230e6 (diff)
downloadgcc-fe4c07dc48d92369c030a216831fe6aff8b860bd.zip
gcc-fe4c07dc48d92369c030a216831fe6aff8b860bd.tar.gz
gcc-fe4c07dc48d92369c030a216831fe6aff8b860bd.tar.bz2
[NDS32] Add -mcmodel= option to support different code model.
* config/nds32/nds32.opt (mcmodel): Add new option. * config/nds32/nds32-opts.h (nds32_cmodel_type): Add new enum type to describe code model. From-SVN: r219509
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/nds32/nds32-opts.h8
-rw-r--r--gcc/config/nds32/nds32.opt17
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/config/nds32/nds32-opts.h b/gcc/config/nds32/nds32-opts.h
index 3f24487..1aa0d31 100644
--- a/gcc/config/nds32/nds32-opts.h
+++ b/gcc/config/nds32/nds32-opts.h
@@ -32,4 +32,12 @@ enum nds32_arch_type
ARCH_V3M
};
+/* The code model defines the address generation strategy. */
+enum nds32_cmodel_type
+{
+ CMODEL_SMALL,
+ CMODEL_MEDIUM,
+ CMODEL_LARGE
+};
+
#endif
diff --git a/gcc/config/nds32/nds32.opt b/gcc/config/nds32/nds32.opt
index 53928b5..346c9c0 100644
--- a/gcc/config/nds32/nds32.opt
+++ b/gcc/config/nds32/nds32.opt
@@ -82,6 +82,23 @@ Enum(nds32_arch_type) String(v3) Value(ARCH_V3)
EnumValue
Enum(nds32_arch_type) String(v3m) Value(ARCH_V3M)
+mcmodel=
+Target RejectNegative Joined Enum(nds32_cmodel_type) Var(nds32_cmodel_option) Init(CMODEL_MEDIUM)
+Specify the address generation strategy for code model.
+
+Enum
+Name(nds32_cmodel_type) Type(enum nds32_cmodel_type)
+Known cmodel types (for use with the -mcmodel= option):
+
+EnumValue
+Enum(nds32_cmodel_type) String(small) Value(CMODEL_SMALL)
+
+EnumValue
+Enum(nds32_cmodel_type) String(medium) Value(CMODEL_MEDIUM)
+
+EnumValue
+Enum(nds32_cmodel_type) String(large) Value(CMODEL_LARGE)
+
mforce-fp-as-gp
Target Report Mask(FORCE_FP_AS_GP)
Prevent $fp being allocated during register allocation so that compiler is able to force performing fp-as-gp optimization.