Skip to content

Commit 34ef62f

Browse files
committed
[GAS, Arm] CLI with architecture sensitive extensions
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 <name> it's extension table. This <name>, corresponds to a <name>_ext_table of type 'struct arm_ext_table'. This struct can be filled with three types of entries: ARM_ADD (string <ext>, arm_feature_set <enable_bits>), which means +<ext> will enable <enable_bits> ARM_REMOVE (string <ext>, arm_feature_set <disable_bits>), which means +no<ext> will disable <disable_bits> ARM_EXT (string <ext>, arm_feature_set <enable_bits>, arm_feature_set <disable_bits>), which means +<ext> will enable <enable_bits> and +no<ext> will disable <disable_bits> (this is to be used instead of adding an ARM_ADD and ARM_REMOVE for the same <ext>) 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 +<ext> or +no<ext> 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 <ext> and +no<ext> or +<ext> 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.
1 parent 52093e1 commit 34ef62f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+2878
-53
lines changed

gas/ChangeLog

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,64 @@
1+
2019-04-01 Andre Vieira <[email protected]>
2+
3+
* config/tc-arm.c (arm_ext_table): New struct type.
4+
(arm_arch_option_table): Add new 'arm_ext_table' field.
5+
(ARM_EXT,ARM_ADD,ARM_REMOVE, ALL_FP): New macros.
6+
(armv5te_ext_table, armv7ve_ext_table, armv7a_ext_table,
7+
armv7r_ext_table, armv7em_ext_table, armv8a_ext_table,
8+
armv81a_ext_table, armv82a_ext_table, armv84a_ext_table,
9+
armv85a_ext_table, armv8m_main_ext_table,
10+
armv8r_ext_table): New architecture extension tables.
11+
(ARM_ARCH_OPT): Add new default field.
12+
(ARM_ARCH_OPT2): New macro.
13+
(arm_archs): Extend some architectures with the new architecture
14+
extension tables mentioned above.
15+
(arm_extensions): Add DEPRECATED comment with instructions to
16+
use new table.
17+
(arm_parse_extension): Change to use new extension tables.
18+
(arm_parse_cpu): Don't change existing behavior.
19+
(arm_parse_arch): Change to use new extension tables.
20+
* doc/c-arm.texi: Document new architecture extensions.
21+
* testsuite/gas/arm/attr-mfpu-neon-fp16.d: Change test to use new
22+
extension option rather than -mfpu and change expected behaviour to
23+
sane outputs.
24+
* testsuite/gas/arm/armv8-2-fp16-scalar-bad-ext.d: New.
25+
* testsuite/gas/arm/armv8-2-fp16-scalar-ext.d: New.
26+
* testsuite/gas/arm/armv8-2-fp16-scalar-thumb-ext.d: New.
27+
* testsuite/gas/arm/armv8-2-fp16-simd-ext.d: New.
28+
* testsuite/gas/arm/armv8-2-fp16-simd-thumb-ext.d: New.
29+
* testsuite/gas/arm/armv8-2-fp16-simd-warning-ext.d: New.
30+
* testsuite/gas/arm/armv8-2-fp16-simd-warning-thumb-ext.d: New.
31+
* testsuite/gas/arm/armv8_2+rdma-ext.d: New.
32+
* testsuite/gas/arm/armv8_2-a-fp16-thumb2-ext.d: New.
33+
* testsuite/gas/arm/armv8_2-a-fp16_ext.d: New.
34+
* testsuite/gas/arm/armv8_3-a-fp-bad-ext.d: New.
35+
* testsuite/gas/arm/armv8_3-a-fp-ext.d: New.
36+
* testsuite/gas/arm/armv8_3-a-fp16-ext.d: New.
37+
* testsuite/gas/arm/armv8_3-a-simd-bad-ext.d: New.
38+
* testsuite/gas/arm/armv8_4-a-fp16-ext.d: New.
39+
* testsuite/gas/arm/armv8m.main+fp.d: New.
40+
* testsuite/gas/arm/armv8m.main+fp.dp.d: New.
41+
* testsuite/gas/arm/attr-ext-fpv5-d16.d: New.
42+
* testsuite/gas/arm/attr-ext-fpv5.d: New.
43+
* testsuite/gas/arm/attr-ext-idiv.d: New.
44+
* testsuite/gas/arm/attr-ext-mp.d: New.
45+
* testsuite/gas/arm/attr-ext-neon-fp16.d: New.
46+
* testsuite/gas/arm/attr-ext-neon-vfpv3.d: New.
47+
* testsuite/gas/arm/attr-ext-neon-vfpv4.d: New.
48+
* testsuite/gas/arm/attr-ext-sec.d: New.
49+
* testsuite/gas/arm/attr-ext-vfpv3-d16-fp16.d: New.
50+
* testsuite/gas/arm/attr-ext-vfpv3-d16.d: New.
51+
* testsuite/gas/arm/attr-ext-vfpv3-fp16.d: New.
52+
* testsuite/gas/arm/attr-ext-vfpv3.d: New.
53+
* testsuite/gas/arm/attr-ext-vfpv3xd-fp.d: New.
54+
* testsuite/gas/arm/attr-ext-vfpv3xd.d: New.
55+
* testsuite/gas/arm/attr-ext-vfpv4-d16.d: New.
56+
* testsuite/gas/arm/attr-ext-vfpv4-sp-d16.d: New.
57+
* testsuite/gas/arm/attr-ext-vfpv4.d: New.
58+
* testsuite/gas/arm/dotprod-mandatory-ext.d: New.
59+
* testsuite/gas/arm/fpv5-d16.s: New.
60+
* testsuite/gas/arm/fpv5-sp-d16.s: New.
61+
162
2019-03-28 Alan Modra <[email protected]>
263

364
PR 24390

0 commit comments

Comments
 (0)