On Wed, Nov 18, 2015 at 4:29 AM, Marcus Shawcroft <marcus.shawcr...@gmail.com> wrote: > On 17 November 2015 at 22:10, Andrew Pinski <apin...@cavium.com> wrote: >> >> This moves the #undef from the header files to the .def files like was done >> for builtins.def (https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00662.html). >> >> OK? Bootstrapped and tested on aarch64-linux-gnu with no regressions. >> >> Thanks, >> Andrew Pinski >> >> * config/aarch64/aarch64-arches.def (AARCH64_ARCH): #undef at the end. >> * config/aarch64/aarch64-cores.def (AARCH64_CORE): Likewise. >> * config/aarch64/aarch64-fusion-pairs.def (AARCH64_FUSION_PAIR): Likewise. >> * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): >> Likewise. >> * config/aarch64/aarch64-opts.h (AARCH64_CORE): Don't #undef here. >> (AARCH64_ARCH): Likewise. >> * config/aarch64/aarch64-protos.h (AARCH64_FUSION_PAIR): Likewise. >> (AARCH64_EXTRA_TUNING_OPTION): Likewise. >> * config/aarch64/aarch64.c (AARCH64_FUION_PAIR): Likewise. >> (AARCH64_EXTRA_TUNING_OPTION): Likewise. >> (AARCH64_ARCH): Likewise. >> (AARCH64_CORE): Likewise. >> (AARCH64_OPT_EXTENSION): Likewise. >> * config/aarch64/aarch64.h (AARCH64_CORE): Likewise. >> * config/aarch64/driver-aarch64.c (AARCH64_OPT_EXTENSION): Likewise. >> (AARCH64_CORE): Likewise. >> (AARCH64_ARCH): Likewise. >> * common/config/aarch64/aarch64-common.c: Likewise. > > OK Thanks /Marcus
This is what I applied finally after a new bootstrap/test. By the way there was even a typo in the code originally for AARCH64_FUSION_PAIR; there was an undef for AARCH64_FUION_PAIR in config/aarch64/aarch64.c. So this patch alone fixes that issue. Thanks, Andrew Pinski 2016-10-07 Andrew Pinski <apin...@cavium.com> * config/aarch64/aarch64-arches.def (AARCH64_ARCH): #undef at the end. * config/aarch64/aarch64-cores.def (AARCH64_CORE): Likewise. * config/aarch64/aarch64-fusion-pairs.def (AARCH64_FUSION_PAIR): Likewise. * config/aarch64/aarch64-option-extensions.def (AARCH64_OPT_EXTENSION): Likewise. * config/aarch64/aarch64-tuning-flags.def (AARCH64_EXTRA_TUNING_OPTION): Likewise. * config/aarch64/aarch64-opts.h (AARCH64_CORE): Don't #undef here. (AARCH64_ARCH): Likewise. * common/config/aarch64/aarch64-common.c (AARCH64_OPT_EXTENSION): Likewise. (AARCH64_CORE): Likewise. (AARCH64_ARCH): Likewise. * config/aarch64/aarch64-protos.h (AARCH64_FUSION_PAIR): Likewise. (AARCH64_EXTRA_TUNING_OPTION): Likewise. * config/aarch64/aarch64.c (AARCH64_FUION_PAIR): Likewise. (AARCH64_EXTRA_TUNING_OPTION): Likewise. (AARCH64_ARCH): Likewise. (AARCH64_CORE): Likewise. * config/aarch64/aarch64.h (AARCH64_CORE): Likewise. * config/aarch64/driver-aarch64.c (AARCH64_OPT_EXTENSION): Likewise. (AARCH64_CORE): Likewise. (AARCH64_ARCH): Likewise.
Index: common/config/aarch64/aarch64-common.c =================================================================== --- common/config/aarch64/aarch64-common.c (revision 240845) +++ common/config/aarch64/aarch64-common.c (working copy) @@ -123,7 +123,6 @@ static const struct aarch64_option_exten #define AARCH64_OPT_EXTENSION(NAME, FLAG_CANONICAL, FLAGS_ON, FLAGS_OFF, Z) \ {NAME, FLAG_CANONICAL, FLAGS_ON, FLAGS_OFF}, #include "config/aarch64/aarch64-option-extensions.def" -#undef AARCH64_OPT_EXTENSION {NULL, 0, 0, 0} }; @@ -148,7 +147,6 @@ static const struct processor_name_to_ar #define AARCH64_CORE(NAME, X, IDENT, ARCH_IDENT, FLAGS, COSTS, IMP, PART) \ {NAME, AARCH64_ARCH_##ARCH_IDENT, FLAGS}, #include "config/aarch64/aarch64-cores.def" -#undef AARCH64_CORE {"generic", AARCH64_ARCH_8A, AARCH64_FL_FOR_ARCH8}, {"", aarch64_no_arch, 0} }; @@ -159,7 +157,6 @@ static const struct arch_to_arch_name al #define AARCH64_ARCH(NAME, CORE, ARCH_IDENT, ARCH, FLAGS) \ {AARCH64_ARCH_##ARCH_IDENT, NAME, FLAGS}, #include "config/aarch64/aarch64-arches.def" -#undef AARCH64_ARCH {aarch64_no_arch, "", 0} }; Index: config/aarch64/aarch64-arches.def =================================================================== --- config/aarch64/aarch64-arches.def (revision 240845) +++ config/aarch64/aarch64-arches.def (working copy) @@ -34,3 +34,4 @@ AARCH64_ARCH("armv8-a", generic, AARCH64_ARCH("armv8.1-a", generic, 8_1A, 8, AARCH64_FL_FOR_ARCH8_1) AARCH64_ARCH("armv8.2-a", generic, 8_2A, 8, AARCH64_FL_FOR_ARCH8_2) +#undef AARCH64_ARCH Index: config/aarch64/aarch64-cores.def =================================================================== --- config/aarch64/aarch64-cores.def (revision 240846) +++ config/aarch64/aarch64-cores.def (working copy) @@ -70,3 +70,5 @@ AARCH64_CORE("cortex-a57.cortex-a53", c AARCH64_CORE("cortex-a72.cortex-a53", cortexa72cortexa53, cortexa53, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC, cortexa72, "0x41", "0xd08.0xd03") AARCH64_CORE("cortex-a73.cortex-a35", cortexa73cortexa35, cortexa53, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC, cortexa73, "0x41", "0xd09.0xd04") AARCH64_CORE("cortex-a73.cortex-a53", cortexa73cortexa53, cortexa53, 8A, AARCH64_FL_FOR_ARCH8 | AARCH64_FL_CRC, cortexa73, "0x41", "0xd09.0xd03") + +#undef AARCH64_CORE Index: config/aarch64/aarch64-fusion-pairs.def =================================================================== --- config/aarch64/aarch64-fusion-pairs.def (revision 240845) +++ config/aarch64/aarch64-fusion-pairs.def (working copy) @@ -35,3 +35,4 @@ AARCH64_FUSION_PAIR ("adrp+ldr", ADRP_LD AARCH64_FUSION_PAIR ("cmp+branch", CMP_BRANCH) AARCH64_FUSION_PAIR ("aes+aesmc", AES_AESMC) +#undef AARCH64_FUSION_PAIR Index: config/aarch64/aarch64-option-extensions.def =================================================================== --- config/aarch64/aarch64-option-extensions.def (revision 240845) +++ config/aarch64/aarch64-option-extensions.def (working copy) @@ -59,3 +59,5 @@ AARCH64_OPT_EXTENSION("lse", AARCH64_FL_ /* Enabling "fp16" also enables "fp". Disabling "fp16" just disables "fp16". */ AARCH64_OPT_EXTENSION("fp16", AARCH64_FL_F16, AARCH64_FL_FP, 0, "fp16") + +#undef AARCH64_OPT_EXTENSION Index: config/aarch64/aarch64-opts.h =================================================================== --- config/aarch64/aarch64-opts.h (revision 240845) +++ config/aarch64/aarch64-opts.h (working copy) @@ -28,7 +28,6 @@ enum aarch64_processor #define AARCH64_CORE(NAME, INTERNAL_IDENT, SCHED, ARCH, FLAGS, COSTS, IMP, PART) \ INTERNAL_IDENT, #include "aarch64-cores.def" -#undef AARCH64_CORE /* Used to indicate that no processor has been specified. */ generic, /* Used to mark the end of the processor table. */ @@ -40,7 +39,6 @@ enum aarch64_arch #define AARCH64_ARCH(NAME, CORE, ARCH_IDENT, ARCH_REV, FLAGS) \ AARCH64_ARCH_##ARCH_IDENT, #include "aarch64-arches.def" -#undef AARCH64_ARCH aarch64_no_arch }; Index: config/aarch64/aarch64-protos.h =================================================================== --- config/aarch64/aarch64-protos.h (revision 240845) +++ config/aarch64/aarch64-protos.h (working copy) @@ -248,7 +248,6 @@ enum aarch64_fusion_pairs_index #include "aarch64-fusion-pairs.def" AARCH64_FUSE_index_END }; -#undef AARCH64_FUSION_PAIR #define AARCH64_FUSION_PAIR(x, name) \ AARCH64_FUSE_##name = (1u << AARCH64_FUSE_##name##_index), @@ -259,7 +258,6 @@ enum aarch64_fusion_pairs #include "aarch64-fusion-pairs.def" AARCH64_FUSE_ALL = (1u << AARCH64_FUSE_index_END) - 1 }; -#undef AARCH64_FUSION_PAIR #define AARCH64_EXTRA_TUNING_OPTION(x, name) \ AARCH64_EXTRA_TUNE_##name##_index, @@ -269,7 +267,6 @@ enum aarch64_extra_tuning_flags_index #include "aarch64-tuning-flags.def" AARCH64_EXTRA_TUNE_index_END }; -#undef AARCH64_EXTRA_TUNING_OPTION #define AARCH64_EXTRA_TUNING_OPTION(x, name) \ @@ -281,7 +278,6 @@ enum aarch64_extra_tuning_flags #include "aarch64-tuning-flags.def" AARCH64_EXTRA_TUNE_ALL = (1u << AARCH64_EXTRA_TUNE_index_END) - 1 }; -#undef AARCH64_EXTRA_TUNING_OPTION /* Enum describing the various ways that the aarch64_parse_{arch,tune,cpu,extension} functions can fail. Index: config/aarch64/aarch64-tuning-flags.def =================================================================== --- config/aarch64/aarch64-tuning-flags.def (revision 240845) +++ config/aarch64/aarch64-tuning-flags.def (working copy) @@ -34,3 +34,5 @@ AARCH64_EXTRA_TUNING_OPTION ("rename_fma two load/stores are not at least 8 byte aligned don't create load/store pairs. */ AARCH64_EXTRA_TUNING_OPTION ("slow_unaligned_ldpw", SLOW_UNALIGNED_LDPW) + +#undef AARCH64_EXTRA_TUNING_OPTION Index: config/aarch64/aarch64.c =================================================================== --- config/aarch64/aarch64.c (revision 240845) +++ config/aarch64/aarch64.c (working copy) @@ -172,7 +172,6 @@ static const struct aarch64_flag_desc aa { "all", AARCH64_FUSE_ALL }, { NULL, AARCH64_FUSE_NOTHING } }; -#undef AARCH64_FUION_PAIR #define AARCH64_EXTRA_TUNING_OPTION(name, internal_name) \ { name, AARCH64_EXTRA_TUNE_##internal_name }, @@ -183,7 +182,6 @@ static const struct aarch64_flag_desc aa { "all", AARCH64_EXTRA_TUNE_ALL }, { NULL, AARCH64_EXTRA_TUNE_NONE } }; -#undef AARCH64_EXTRA_TUNING_OPTION /* Tuning parameters. */ @@ -828,7 +826,6 @@ static const struct processor all_archit #define AARCH64_ARCH(NAME, CORE, ARCH_IDENT, ARCH_REV, FLAGS) \ {NAME, CORE, CORE, AARCH64_ARCH_##ARCH_IDENT, ARCH_REV, FLAGS, NULL}, #include "aarch64-arches.def" -#undef AARCH64_ARCH {NULL, aarch64_none, aarch64_none, aarch64_no_arch, 0, 0, NULL} }; @@ -840,7 +837,6 @@ static const struct processor all_cores[ all_architectures[AARCH64_ARCH_##ARCH].architecture_version, \ FLAGS, &COSTS##_tunings}, #include "aarch64-cores.def" -#undef AARCH64_CORE {"generic", generic, cortexa53, AARCH64_ARCH_8A, 8, AARCH64_FL_FOR_ARCH8, &generic_tunings}, {NULL, aarch64_none, aarch64_none, aarch64_no_arch, 0, 0, NULL} Index: config/aarch64/aarch64.h =================================================================== --- config/aarch64/aarch64.h (revision 240845) +++ config/aarch64/aarch64.h (working copy) @@ -493,7 +493,6 @@ enum target_cpus #define AARCH64_CORE(NAME, INTERNAL_IDENT, SCHED, ARCH, FLAGS, COSTS, IMP, PART) \ TARGET_CPU_##INTERNAL_IDENT, #include "aarch64-cores.def" -#undef AARCH64_CORE TARGET_CPU_generic }; Index: config/aarch64/driver-aarch64.c =================================================================== --- config/aarch64/driver-aarch64.c (revision 240845) +++ config/aarch64/driver-aarch64.c (working copy) @@ -40,7 +40,6 @@ static struct aarch64_arch_extension aar { #include "aarch64-option-extensions.def" }; -#undef AARCH64_OPT_EXTENSION struct aarch64_core_data @@ -61,7 +60,6 @@ static struct aarch64_core_data aarch64_ { NULL, NULL, NULL, NULL, 0 } }; -#undef AARCH64_CORE struct aarch64_arch_driver_info { @@ -79,7 +77,6 @@ static struct aarch64_arch_driver_info a {NULL, NULL, 0} }; -#undef AARCH64_ARCH /* Return an aarch64_arch_driver_info for the architecture described by ID, or NULL if ID describes something we don't know about. */