diff options
author | Richard Earnshaw <rearnsha@arm.com> | 2017-01-11 14:39:00 +0000 |
---|---|---|
committer | Richard Earnshaw <rearnsha@gcc.gnu.org> | 2017-01-11 14:39:00 +0000 |
commit | a92ffb3e945608131f5edf3ec2d6d583e417083b (patch) | |
tree | 5bbd0872a85c391ee212c559fe8febfa9e2fbc81 /gcc/common | |
parent | ca280d38f95255a876fc56547d55ab3db50ea38f (diff) | |
download | gcc-a92ffb3e945608131f5edf3ec2d6d583e417083b.tar.gz |
[arm] Replace command-line option .def files with single definition file
The files arm-cores.def, arm-fpus.def and arm-arches.def are parsed and
used in several places and the format is slightly awkward to maintain
as they must be parsable in C and by certain scripts. Furthermore,
changes to the content that affects every entry is particularly awkward for
dealing with merges.
This patch replaces all three files with a single file that specifies all
the command-line related definitions in a new format that allows for better
checking for consistency as well as (hopefully) easier to merge changes.
The awk script used to parse it is relatively complicated, but should be
pretty portable. It works by parsing in all the data and then operating
one of a number of possible sub-commands to generate the desired output.
The new method picked up one error. The CPU descriptions referred to an
architecture ARMv5tej which was not supported by -march. This has been
fixed by adding the relevant entry to the architecture list.
gcc:
* config.gcc: Use new awk script to check CPU, FPU and architecture
parameters for --with-... options.
* config/arm/parsecpu.awk: New file
* config/arm/arm-cpus.in: New file.
* config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
files.
* config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
files.
* config/arm/t-arm: Update dependency rules.
* common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
of processing .def files.
* config/arm/genopt.sh: Deleted.
* config/arm/gentune.sh: Deleted.
* config/arm/arm-cores.def: Deleted.
* config/arm/arm-arches.def: Deleted.
* config/arm/arm-fpus.def: Deleted.
* config/arm/arm-tune.md: Regenerated.
* config/arm/arm-tables.opt: Regenerated.
* config/arm/arm-cpu.h: New generated file.
* config/arm/arm-cpu-data.h: New generated file.
* config/arm/arm-cpu-cdata.h: New generated file.
Contrib:
* gcc_update: Adjust touch list.
From-SVN: r244316
Diffstat (limited to 'gcc/common')
-rw-r--r-- | gcc/common/config/arm/arm-common.c | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/gcc/common/config/arm/arm-common.c b/gcc/common/config/arm/arm-common.c index 4103c67ce2f..7ecc68d6757 100644 --- a/gcc/common/config/arm/arm-common.c +++ b/gcc/common/config/arm/arm-common.c @@ -104,19 +104,7 @@ struct arm_arch_core_flag const enum isa_feature isa_bits[isa_num_bits]; }; -static const struct arm_arch_core_flag arm_arch_core_flags[] = -{ -#undef ARM_CORE -#define ARM_CORE(NAME, X, IDENT, TUNE_FLAGS, ARCH, ISA, COSTS) \ - {NAME, {ISA isa_nobit}}, -#include "config/arm/arm-cores.def" -#undef ARM_CORE -#undef ARM_ARCH -#define ARM_ARCH(NAME, CORE, TUNE_FLAGS, ARCH, ISA) \ - {NAME, {ISA isa_nobit}}, -#include "config/arm/arm-arches.def" -#undef ARM_ARCH -}; +#include "config/arm/arm-cpu-cdata.h" /* Scan over a raw feature array BITS checking for BIT being present. This is slower than the normal bitmask checks, but we would spend longer |