]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/config/arm/arm-cpus.in
[arm] Allow CPU and architecture extensions to be
authorRichard Earnshaw <rearnsha@arm.com>
Fri, 16 Jun 2017 21:03:39 +0000 (21:03 +0000)
committerRichard Earnshaw <rearnsha@gcc.gnu.org>
Fri, 16 Jun 2017 21:03:39 +0000 (21:03 +0000)
commit357e1023c9b10e98d1aa4d59fdb876078de47608
tree81755f852a25bf94f37ee7836a53b764251a9246
parente53993efae201a6a65164a299e5305894ff1cb84
[arm] Allow CPU and architecture extensions to be

A follow up patch to this one will start to canonicalize options to
simplify generating multilib fragments.  This patch is enabling work
for that.  If we have extension options that duplicate other options
(done principally for back-wards compatibility purposes) we need to
ensure that just one of them will be used consistently when generating
a canonical form of the user-specified options.  We do this by
explicitly noting when an option is defined as an alias of another.

Another aspect of canonicalization is to enforce a strict order in
which the options are inspected, we do this by ensuring that no later
option examined can be a subset of an earlier option (add and remove
options are treated separtely).

It's practically impossible to check all this in parsecpu.awk since
that premits use of C macros in the ISA features list, so instead we
enforce the ordering with a selftest function in the compiler, which
is only run when self tests are enabled (it's not something that will
change every day, so this should be sufficient).

* config/arm/arm-protos.h (cpu_arch_extension): Add field to record
when an option is an alias of another.
* config/arm/parsecpu.awk (optalias): New parser token.
(gen_comm_data): Mark non-alias options as such.  Emit entries
for extension aliases.
* config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
(armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
(armv6kz, armv6zk, armv6t2): Likewise.
(armv7): Make vfpv3-d16 an alias.
(armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
canonical order.
(armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
Sort in canonical order.
(armv8-a): Sort in canonical order.
(armv8.1-a, armv8.2-a):  Likewise.
(generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
canonical order.
(cortex-a9): Sort in canonical order.
* config/arm/arm.c (selftests.h): Include it.
(arm_test_cpu_arch_data): New function.
(arm_run_self_tests): New function.
(TARGET_RUN_TARGET_SELFTESTS): Redefine.
(targetm): Move declaration to the end of the file.
* arm-cpu-cdata.h: Regenerated.

From-SVN: r249289
gcc/ChangeLog
gcc/config/arm/arm-cpu-cdata.h
gcc/config/arm/arm-cpus.in
gcc/config/arm/arm-protos.h
gcc/config/arm/arm.c
gcc/config/arm/parsecpu.awk