Hi, This patch adds a new framework to add architecture sensitive extensions, like GCC does. This patch also implements all architecture extensions currently available in GCC. This framework works as follows. To enable architecture sensitive extensions for a particular architecture, that architecture must contain an ARM_ARCH_OPT2 entry in the 'arm_archs' table. All fields here are the same as previous, with the addition of a new extra field at the end to it's extension table. This , corresponds to a _ext_table of type 'struct arm_ext_table'. This struct can be filled with three types of entries: ARM_ADD (string , arm_feature_set ), which means + will enable ARM_REMOVE (string , arm_feature_set ), which means +no will disable ARM_EXT (string , arm_feature_set , arm_feature_set ), which means + will enable and +no will disable (this is to be used instead of adding an ARM_ADD and ARM_REMOVE for the same ) This patch does not disable the use of the old extensions, even if some of them are duplicated in the new tables. This is a "in-between-step" as we may want to deprecate the old table of extensions in later patches. For now, GAS will first look for the + or +no in the new table and if no entry is found it will continue searching in the old table, following old behaviour. If only an ARM_ADD or an ARM_REMOVE is defined for and +no or + resp. is used then it also continues to search the old table for it. A couple of caveats: - This patch does not enable the use of these architecture extensions with the '.arch_extension' directive. This is future work that I will tend to later. - This patch does not enable the use of these architecture extensions with the -mcpu option. This is future work that I will tend to later. - This patch does not change the current behaviour when combining an architecture extension and using -mfpu on the command-line. The current behaviour of GAS is to stage the union of feature bits enabled by both -march and -mfpu. GCC behaves differently here, so this is something we may want to revisit on a later date. For testing I duplicated an attributes test prior to Armv8-A for every set of enabled bits by one of the new extensions, I didn't test all possible new -march +ext combinations as that would be too much I believe. For armv8-a I reused a couple of instruction tests using the new extensions. For Armv8-m I added two new tests. Cheers, Andre gas/ChangeLog: 2019-03-** Andre Vieira * config/tc-arm.c (arm_ext_table): New struct type. (arm_arch_option_table): Add new 'arm_ext_table' field. (ARM_EXT,ARM_ADD,ARM_REMOVE, ALL_FP): New macros. (armv5te_ext_table, armv7ve_ext_table, armv7a_ext_table, armv7r_ext_table, armv7em_ext_table, armv8a_ext_table, armv81a_ext_table, armv82a_ext_table, armv84a_ext_table, armv85a_ext_table, armv8m_main_ext_table, armv8r_ext_table): New architecture extension tables. (ARM_ARCH_OPT): Add new default field. (ARM_ARCH_OPT2): New macro. (arm_archs): Extend some architectures with the new architecture extension tables mentioned above. (arm_extensions): Add DEPRECATED comment with instructions to use new table. (arm_parse_extension): Change to use new extension tables. (arm_parse_cpu): Don't change existing behavior. (arm_parse_arch): Change to use new extension tables. * doc/c-arm.texi: Document new architecture extensions. * testsuite/gas/arm/attr-mfpu-neon-fp16.d: Change test to use new extension option rather than -mfpu and change expected behaviour to sane outputs. * testsuite/gas/arm/armv8-2-fp16-scalar-bad-ext.d: New. * testsuite/gas/arm/armv8-2-fp16-scalar-ext.d: New. * testsuite/gas/arm/armv8-2-fp16-scalar-thumb-ext.d: New. * testsuite/gas/arm/armv8-2-fp16-simd-ext.d: New. * testsuite/gas/arm/armv8-2-fp16-simd-thumb-ext.d: New. * testsuite/gas/arm/armv8-2-fp16-simd-warning-ext.d: New. * testsuite/gas/arm/armv8-2-fp16-simd-warning-thumb-ext.d: New. * testsuite/gas/arm/armv8_2+rdma-ext.d: New. * testsuite/gas/arm/armv8_2-a-fp16-thumb2-ext.d: New. * testsuite/gas/arm/armv8_2-a-fp16_ext.d: New. * testsuite/gas/arm/armv8_3-a-fp-bad-ext.d: New. * testsuite/gas/arm/armv8_3-a-fp-ext.d: New. * testsuite/gas/arm/armv8_3-a-fp16-ext.d: New. * testsuite/gas/arm/armv8_3-a-simd-bad-ext.d: New. * testsuite/gas/arm/armv8_4-a-fp16-ext.d: New. * testsuite/gas/arm/armv8m.main+fp.d: New. * testsuite/gas/arm/armv8m.main+fp.dp.d: New. * testsuite/gas/arm/attr-ext-fpv5-d16.d: New. * testsuite/gas/arm/attr-ext-fpv5.d: New. * testsuite/gas/arm/attr-ext-idiv.d: New. * testsuite/gas/arm/attr-ext-mp.d: New. * testsuite/gas/arm/attr-ext-neon-fp16.d: New. * testsuite/gas/arm/attr-ext-neon-vfpv3.d: New. * testsuite/gas/arm/attr-ext-neon-vfpv4.d: New. * testsuite/gas/arm/attr-ext-sec.d: New. * testsuite/gas/arm/attr-ext-vfpv3-d16-fp16.d: New. * testsuite/gas/arm/attr-ext-vfpv3-d16.d: New. * testsuite/gas/arm/attr-ext-vfpv3-fp16.d: New. * testsuite/gas/arm/attr-ext-vfpv3.d: New. * testsuite/gas/arm/attr-ext-vfpv3xd-fp.d: New. * testsuite/gas/arm/attr-ext-vfpv3xd.d: New. * testsuite/gas/arm/attr-ext-vfpv4-d16.d: New. * testsuite/gas/arm/attr-ext-vfpv4-sp-d16.d: New. * testsuite/gas/arm/attr-ext-vfpv4.d: New. * testsuite/gas/arm/dotprod-mandatory-ext.d: New. * testsuite/gas/arm/fpv5-d16.s: New. * testsuite/gas/arm/fpv5-sp-d16.s: New. include/ChangeLog: 2019-03-** Andre Vieira * opcode/arm.h (FPU_NEON_ARMV8_1): New. (FPU_ARCH_NEON_VFP_ARMV8_1): Use FPU_NEON_ARMV8_1. (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_1): Likewise. (FPU_ARCH_DOTPROD_NEON_VFP_ARMV8): Likewise. (FPU_ARCH_NEON_VFP_ARMV8_2_FP16): New. (FPU_ARCH_NEON_VFP_ARMV8_2_FP16FML): New. (FPU_ARCH_NEON_VFP_ARMV8_4_FP16FML): New. (FPU_ARCH_CRYPTO_NEON_VFP_ARMV8_4): New.