Previously, +ext/+noext feature modifiers were only available with
-march. Extend the same mechanism to -mcpu so that CPU-specific
extensions can be enabled and disabled with -mcpu=<cpu>+ext and
-mcpu=<cpu>+noext, matching GCC behaviour.
Add a per-CPU extension table (arm_ext_table) and a new ext_table
field to struct arm_cpu_option_table, reusing the existing
arm_parse_extension () infrastructure used by -march. Move the
ARM_EXT/ARM_ADD/ARM_REMOVE helpers, the ALL_FP/ALL_SIMD/ALL_FP_MVE_FP
masks and the CDE_EXTENSIONS list so they can be shared by both
-mcpu and -march extension tables.
Update ARM CPU feature definitions to match GCC CPU baselines. The
default feature set for each -mcpu remains unchanged; only support for
+ext/+noext modifiers is added.
Add tests covering supported CPU extension modifiers and the resulting
build attributes for each CPU.
gas/
* config/tc-arm.c (struct arm_cpu_option_table): Add ext_table
field.
(ARM_EXT, ARM_ADD, ARM_REMOVE, ALL_FP, ALL_SIMD,
ALL_FP_MVE_FP, CDE_EXTENSIONS): Move earlier.
(cortex_*_ext_table, ...): New.
(arm_cpus): Populate ext_table and update CPU feature baselines
to match GCC.
(arm_parse_cpu): Pass opt->ext_table to arm_parse_extension.
gas/testsuite/
* gas/arm/feat-*.s: New test sources.
* gas/arm/mcpu-*.d: New tests.
* gas/arm/attr-cpu-directive.d: Update.
###
This version address the review comments from:
Message-ID: <2846ac09-3590-409d-8ecf-cc385c8929e8@arm.com>
https://inbox.sourceware.org/binutils/2846ac09-3590-409d-8ecf-cc385c8929e8@arm.com/
###