From 6e4e50f5cbb8f96a2654ef2e39075b0e0261faf2 Mon Sep 17 00:00:00 2001 From: Thomas Preud'homme Date: Mon, 12 Dec 2016 09:39:51 +0000 Subject: [PATCH] Define arm_arch_core_flags in a single file 2016-12-12 Thomas Preud'homme gcc/ * config/arm/arm-opts.h: Move struct arm_arch_core_flag and arm_arch_core_flags to ... * common/config/arm/arm-common.c: There. From-SVN: r243541 --- gcc/ChangeLog | 6 ++++++ gcc/common/config/arm/arm-common.c | 20 ++++++++++++++++++++ gcc/config/arm/arm-opts.h | 20 -------------------- 3 files changed, 26 insertions(+), 20 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bf789c6f2ca..a3cc94e2a32 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2016-12-12 Thomas Preud'homme + + * config/arm/arm-opts.h: Move struct arm_arch_core_flag and + arm_arch_core_flags to ... + * common/config/arm/arm-common.c: There. + 2016-12-12 Eric Botcazou * config/sparc/constraints.md (T): Use special memory constraint. diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index 473417a2e5f..c0de5d2563f 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -98,6 +98,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 6971534a562..e06fedbcf5c 100644 --- a/gcc/config/arm/arm-opts.h +++ b/gcc/config/arm/arm-opts.h @@ -79,24 +79,4 @@ enum arm_tls_type { TLS_GNU, 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 -- 2.30.2