summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikhail Kashkarov <m.kashkarov@partner.samsung.com>2017-05-10 12:58:52 +0300
committerMikhail Kashkarov <m.kashkarov@partner.samsung.com>2017-05-16 12:12:20 +0300
commit438ee891ccb52c97f797598c08b92922fc1cce40 (patch)
tree985e186eb6477fb357da4ff46a628a8c3a52246d
parent58909fae5d4d6bf5048b16cae96a8fe9b9405a55 (diff)
downloadlinaro-gcc-438ee891ccb52c97f797598c08b92922fc1cce40.tar.gz
linaro-gcc-438ee891ccb52c97f797598c08b92922fc1cce40.tar.bz2
linaro-gcc-438ee891ccb52c97f797598c08b92922fc1cce40.zip
Move static array from header to .c file (fixed increased memory usage bs-45)tizen_4.0.m1_releasesubmit/tizen_base/20170518.085959accepted/tizen/base/20170519.201131
Please, remove this commit when merging c1cb342. gcc/ * config/arm/arm-opts.h: Move struct arm_arch_core_flag and static array arm_arch_core_flags to... * common/config/arm/arm-common.c: There. Change-Id: Id71ddb5deac5372791b63f9bf03852e661477bf4
-rw-r--r--gcc/common/config/arm/arm-common.c20
-rw-r--r--gcc/config/arm/arm-opts.h19
2 files changed, 20 insertions, 19 deletions
diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c
index 29ae0c35dd0..1cb59aae5ed 100644
--- a/gcc/common/config/arm/arm-common.c
+++ b/gcc/common/config/arm/arm-common.c
@@ -97,6 +97,26 @@ arm_rewrite_mcpu (int argc, const char **argv)
return arm_rewrite_selected_cpu (argv[argc - 1]);
}
+struct arm_arch_core_flag
+{
+ const char *const name;
+ const arm_feature_set flags;
+};
+
+static const struct arm_arch_core_flag arm_arch_core_flags[] =
+{
+#undef ARM_CORE
+#define ARM_CORE(NAME, X, IDENT, ARCH, FLAGS, COSTS) \
+ {NAME, FLAGS},
+#include "config/arm/arm-cores.def"
+#undef ARM_CORE
+#undef ARM_ARCH
+#define ARM_ARCH(NAME, CORE, ARCH, FLAGS) \
+ {NAME, FLAGS},
+#include "config/arm/arm-arches.def"
+#undef ARM_ARCH
+};
+
/* Called by the driver to check whether the target denoted by current
command line options is a Thumb-only target. ARGV is an array of
-march and -mcpu values (ie. it contains the rhs after the equal
diff --git a/gcc/config/arm/arm-opts.h b/gcc/config/arm/arm-opts.h
index 9ae104a824b..84669f429bd 100644
--- a/gcc/config/arm/arm-opts.h
+++ b/gcc/config/arm/arm-opts.h
@@ -80,23 +80,4 @@ enum arm_tls_type {
TLS_GNU2
};
-struct arm_arch_core_flag
-{
- const char *const name;
- const arm_feature_set flags;
-};
-
-static const struct arm_arch_core_flag arm_arch_core_flags[] =
-{
-#undef ARM_CORE
-#define ARM_CORE(NAME, X, IDENT, ARCH, FLAGS, COSTS) \
- {NAME, FLAGS},
-#include "arm-cores.def"
-#undef ARM_CORE
-#undef ARM_ARCH
-#define ARM_ARCH(NAME, CORE, ARCH, FLAGS) \
- {NAME, FLAGS},
-#include "arm-arches.def"
-#undef ARM_ARCH
-};
#endif