diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2021-12-16 09:32:00 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2021-12-16 09:32:00 +0000 |
commit | a2b1ea81bacc044a721092484c7cdcb600bcf9ce (patch) | |
tree | 34e407ceca32e2172ad72534b60c6d19f4e678cb /gas | |
parent | b3e4d9326faf88d83745379f254d56b8a8324b63 (diff) | |
download | binutils-a2b1ea81bacc044a721092484c7cdcb600bcf9ce.zip binutils-a2b1ea81bacc044a721092484c7cdcb600bcf9ce.tar.gz binutils-a2b1ea81bacc044a721092484c7cdcb600bcf9ce.tar.bz2 |
arm: Add support for Armv9.1-A to Armv9.3-A
This patch adds AArch32 support for -march=armv9.[123]-a.
The behaviour of the new options can be expressed using a
combination of existing feature flags and tables.
The cpu_arch_ver entries for ARM_ARCH_V9_2A and ARM_ARCH_V9_3A
are technically redundant but it seemed less surprising to include
them anyway.
include/
* opcode/arm.h (ARM_ARCH_V9_1A, ARM_ARCH_V9_2A): New macros.
(ARM_ARCH_V9_3A): Likewise.
gas/
* doc/c-arm.texi: Add armv9.1-a, armv9.2-a and armv9.3-a.
* config/tc-arm.c (armv91a_ext_table, armv92a_ext_table): New macros.
(armv93a_ext_table): Likewise.
(arm_archs): Add armv9.1-a, armv9.2-a and armv9.3-a.
(cpu_arch_ver): Add ARM_ARCH_V9_1A, ARM_ARCH_V9_2A and ARM_ARCH_V9_3A.
* NEWS: Mention the above.
* testsuite/gas/arm/attr-march-armv9_1-a.d: New test.
* testsuite/gas/arm/attr-march-armv9_2-a.d: Likewise.
* testsuite/gas/arm/attr-march-armv9_3-a.d: Likewise.
* testsuite/gas/arm/bfloat16-armv9.1-a.d: Likewise.
* testsuite/gas/arm/bfloat16-armv9.2-a.d: Likewise.
* testsuite/gas/arm/bfloat16-armv9.3-a.d: Likewise.
* testsuite/gas/arm/i8mm-armv9.1-a.d: Likewise.
* testsuite/gas/arm/i8mm-armv9.2-a.d: Likewise.
* testsuite/gas/arm/i8mm-armv9.3-a.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/NEWS | 4 | ||||
-rw-r--r-- | gas/config/tc-arm.c | 12 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/attr-march-armv9_1-a.d | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/attr-march-armv9_2-a.d | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/attr-march-armv9_3-a.d | 17 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bfloat16-armv9.1-a.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bfloat16-armv9.2-a.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/bfloat16-armv9.3-a.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/i8mm-armv9.1-a.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/i8mm-armv9.2-a.d | 5 | ||||
-rw-r--r-- | gas/testsuite/gas/arm/i8mm-armv9.3-a.d | 5 |
11 files changed, 94 insertions, 3 deletions
@@ -31,8 +31,8 @@ * Add support for 'armv8.8-a', 'armv9-a', 'armv9.1-a', 'armv9.2-a' and 'armv9.3-a' for -march in AArch64 GAS. -* Add support for 'armv8.7-a', 'armv8.8-a', and 'armv9-a' for -march - in Arm GAS. +* Add support for 'armv8.7-a', 'armv8.8-a', 'armv9-a', 'armv9.1-a', + 'armv9.2-a' and 'armv9.3-a' for -march in Arm GAS. * Add support for Intel AVX512_FP16 instructions. diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c index 50320fe..f3f3f9a 100644 --- a/gas/config/tc-arm.c +++ b/gas/config/tc-arm.c @@ -31972,6 +31972,10 @@ static const struct arm_ext_table armv9a_ext_table[] = { NULL, 0, ARM_ARCH_NONE, ARM_ARCH_NONE } }; +#define armv91a_ext_table armv86a_ext_table +#define armv92a_ext_table armv91a_ext_table +#define armv93a_ext_table armv92a_ext_table + #define CDE_EXTENSIONS \ ARM_ADD ("cdecp0", ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE | ARM_EXT2_CDE0)), \ ARM_ADD ("cdecp1", ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE | ARM_EXT2_CDE1)), \ @@ -32096,7 +32100,10 @@ static const struct arm_arch_option_table arm_archs[] = ARM_ARCH_OPT2 ("armv8.6-a", ARM_ARCH_V8_6A, FPU_ARCH_VFP, armv86a), ARM_ARCH_OPT2 ("armv8.7-a", ARM_ARCH_V8_7A, FPU_ARCH_VFP, armv87a), ARM_ARCH_OPT2 ("armv8.8-a", ARM_ARCH_V8_8A, FPU_ARCH_VFP, armv88a), - ARM_ARCH_OPT2 ("armv9-a", ARM_ARCH_V9A, FPU_ARCH_VFP, armv9a), + ARM_ARCH_OPT2 ("armv9-a", ARM_ARCH_V9A, FPU_ARCH_VFP, armv9a), + ARM_ARCH_OPT2 ("armv9.1-a", ARM_ARCH_V9_1A, FPU_ARCH_VFP, armv91a), + ARM_ARCH_OPT2 ("armv9.2-a", ARM_ARCH_V9_2A, FPU_ARCH_VFP, armv92a), + ARM_ARCH_OPT2 ("armv9.3-a", ARM_ARCH_V9_2A, FPU_ARCH_VFP, armv93a), ARM_ARCH_OPT ("xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP), ARM_ARCH_OPT ("iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP), ARM_ARCH_OPT ("iwmmxt2", ARM_ARCH_IWMMXT2, FPU_ARCH_VFP), @@ -32883,6 +32890,9 @@ static const cpu_arch_ver_table cpu_arch_ver[] = {TAG_CPU_ARCH_V8, ARM_ARCH_V8_7A}, {TAG_CPU_ARCH_V8, ARM_ARCH_V8_8A}, {TAG_CPU_ARCH_V9, ARM_ARCH_V9A}, + {TAG_CPU_ARCH_V9, ARM_ARCH_V9_1A}, + {TAG_CPU_ARCH_V9, ARM_ARCH_V9_2A}, + {TAG_CPU_ARCH_V9, ARM_ARCH_V9_3A}, {-1, ARM_ARCH_NONE} }; diff --git a/gas/testsuite/gas/arm/attr-march-armv9_1-a.d b/gas/testsuite/gas/arm/attr-march-armv9_1-a.d new file mode 100644 index 0000000..abde8c2 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-march-armv9_1-a.d @@ -0,0 +1,17 @@ +# name: check for armv9-a command line option settings +# source: blank.s +# as: -march=armv9.1-a +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi* *-*-nacl* + +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "9.1-A" + Tag_CPU_arch: v9 + Tag_CPU_arch_profile: Application + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_Advanced_SIMD_arch: NEON for ARMv8.1 + Tag_MPextension_use: Allowed + Tag_Virtualization_use: TrustZone and Virtualization Extensions diff --git a/gas/testsuite/gas/arm/attr-march-armv9_2-a.d b/gas/testsuite/gas/arm/attr-march-armv9_2-a.d new file mode 100644 index 0000000..891576c --- /dev/null +++ b/gas/testsuite/gas/arm/attr-march-armv9_2-a.d @@ -0,0 +1,17 @@ +# name: check for armv9-a command line option settings +# source: blank.s +# as: -march=armv9.2-a +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi* *-*-nacl* + +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "9.2-A" + Tag_CPU_arch: v9 + Tag_CPU_arch_profile: Application + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_Advanced_SIMD_arch: NEON for ARMv8.1 + Tag_MPextension_use: Allowed + Tag_Virtualization_use: TrustZone and Virtualization Extensions diff --git a/gas/testsuite/gas/arm/attr-march-armv9_3-a.d b/gas/testsuite/gas/arm/attr-march-armv9_3-a.d new file mode 100644 index 0000000..3ed4d81 --- /dev/null +++ b/gas/testsuite/gas/arm/attr-march-armv9_3-a.d @@ -0,0 +1,17 @@ +# name: check for armv9-a command line option settings +# source: blank.s +# as: -march=armv9.3-a +# readelf: -A +# This test is only valid on EABI based ports. +# target: *-*-*eabi* *-*-nacl* + +Attribute Section: aeabi +File Attributes + Tag_CPU_name: "9.3-A" + Tag_CPU_arch: v9 + Tag_CPU_arch_profile: Application + Tag_ARM_ISA_use: Yes + Tag_THUMB_ISA_use: Thumb-2 + Tag_Advanced_SIMD_arch: NEON for ARMv8.1 + Tag_MPextension_use: Allowed + Tag_Virtualization_use: TrustZone and Virtualization Extensions diff --git a/gas/testsuite/gas/arm/bfloat16-armv9.1-a.d b/gas/testsuite/gas/arm/bfloat16-armv9.1-a.d new file mode 100644 index 0000000..871fe1e --- /dev/null +++ b/gas/testsuite/gas/arm/bfloat16-armv9.1-a.d @@ -0,0 +1,5 @@ +#name: Bfloat 16 extension (Armv9.1-A) +#source: bfloat16.s +#as: -mno-warn-deprecated -march=armv9.1-a+simd -I$srcdir/$subdir +#objdump: -dr --show-raw-insn +#... diff --git a/gas/testsuite/gas/arm/bfloat16-armv9.2-a.d b/gas/testsuite/gas/arm/bfloat16-armv9.2-a.d new file mode 100644 index 0000000..a9f4d57 --- /dev/null +++ b/gas/testsuite/gas/arm/bfloat16-armv9.2-a.d @@ -0,0 +1,5 @@ +#name: Bfloat 16 extension (Armv9.2-A) +#source: bfloat16.s +#as: -mno-warn-deprecated -march=armv9.2-a+simd -I$srcdir/$subdir +#objdump: -dr --show-raw-insn +#... diff --git a/gas/testsuite/gas/arm/bfloat16-armv9.3-a.d b/gas/testsuite/gas/arm/bfloat16-armv9.3-a.d new file mode 100644 index 0000000..921006a --- /dev/null +++ b/gas/testsuite/gas/arm/bfloat16-armv9.3-a.d @@ -0,0 +1,5 @@ +#name: Bfloat 16 extension (Armv9.3-A) +#source: bfloat16.s +#as: -mno-warn-deprecated -march=armv9.3-a+simd -I$srcdir/$subdir +#objdump: -dr --show-raw-insn +#... diff --git a/gas/testsuite/gas/arm/i8mm-armv9.1-a.d b/gas/testsuite/gas/arm/i8mm-armv9.1-a.d new file mode 100644 index 0000000..1c319f6 --- /dev/null +++ b/gas/testsuite/gas/arm/i8mm-armv9.1-a.d @@ -0,0 +1,5 @@ +#name: Int8 Matrix Multiply extension (Armv9.1-A) +#source: i8mm.s +#as: -mno-warn-deprecated -march=armv9.1-a+i8mm+simd -I$srcdir/$subdir +#objdump: -dr --show-raw-insn +#... diff --git a/gas/testsuite/gas/arm/i8mm-armv9.2-a.d b/gas/testsuite/gas/arm/i8mm-armv9.2-a.d new file mode 100644 index 0000000..6d82e72 --- /dev/null +++ b/gas/testsuite/gas/arm/i8mm-armv9.2-a.d @@ -0,0 +1,5 @@ +#name: Int8 Matrix Multiply extension (Armv9.2-A) +#source: i8mm.s +#as: -mno-warn-deprecated -march=armv9.2-a+i8mm+simd -I$srcdir/$subdir +#objdump: -dr --show-raw-insn +#... diff --git a/gas/testsuite/gas/arm/i8mm-armv9.3-a.d b/gas/testsuite/gas/arm/i8mm-armv9.3-a.d new file mode 100644 index 0000000..942aa6d --- /dev/null +++ b/gas/testsuite/gas/arm/i8mm-armv9.3-a.d @@ -0,0 +1,5 @@ +#name: Int8 Matrix Multiply extension (Armv9.3-A) +#source: i8mm.s +#as: -mno-warn-deprecated -march=armv9.3-a+i8mm+simd -I$srcdir/$subdir +#objdump: -dr --show-raw-insn +#... |