aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-12-16 09:32:00 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2021-12-16 09:32:00 +0000
commitb3e4d9326faf88d83745379f254d56b8a8324b63 (patch)
treee7bfa6bcfcde9b2cd862001af4e75f59d4310820 /gas
parent3518022233e6b757c57d3deb7723fd91214fe036 (diff)
downloadgdb-b3e4d9326faf88d83745379f254d56b8a8324b63.zip
gdb-b3e4d9326faf88d83745379f254d56b8a8324b63.tar.gz
gdb-b3e4d9326faf88d83745379f254d56b8a8324b63.tar.bz2
arm: Add support for Armv8.7-A and Armv8.8-A
This patch adds AArch32 support for -march=armv8.[78]-a. The behaviour of the new options can be expressed using a combination of existing feature flags and tables. The cpu_arch_ver entries are technically redundant but it seemed less surprising to include them anyway. include/ * opcode/arm.h (ARM_ARCH_V8_7A, ARM_ARCH_V8_8A): New macros. gas/ * doc/c-arm.texi: Add armv8.7-a and armv8.8-a. * config/tc-arm.c (armv87a_ext_table, armv88a_ext_table): New macros. (arm_archs): Add armv8.7-a and armv8.8-a. (cpu_arch_ver): Add ARM_ARCH_V8_7A and ARM_ARCH_V8_8A. * NEWS: Mention the above. * testsuite/gas/arm/attr-march-armv8_7-a.d: New test. * testsuite/gas/arm/attr-march-armv8_8-a.d: Likewise. * testsuite/gas/arm/bfloat16-armv8.7-a.d: Likewise. * testsuite/gas/arm/bfloat16-armv8.8-a.d: Likewise. * testsuite/gas/arm/i8mm-armv8.7-a.d: Likewise. * testsuite/gas/arm/i8mm-armv8.8-a.d: Likewise.
Diffstat (limited to 'gas')
-rw-r--r--gas/NEWS3
-rw-r--r--gas/config/tc-arm.c7
-rw-r--r--gas/doc/c-arm.texi2
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8_7-a.d17
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8_8-a.d17
-rw-r--r--gas/testsuite/gas/arm/bfloat16-armv8.7-a.d5
-rw-r--r--gas/testsuite/gas/arm/bfloat16-armv8.8-a.d5
-rw-r--r--gas/testsuite/gas/arm/i8mm-armv8.7-a.d5
-rw-r--r--gas/testsuite/gas/arm/i8mm-armv8.8-a.d5
9 files changed, 65 insertions, 1 deletions
diff --git a/gas/NEWS b/gas/NEWS
index d0dca5b..82d5aa5 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -31,7 +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 'armv9-a' for -march in Arm GAS.
+* Add support for 'armv8.7-a', 'armv8.8-a', and 'armv9-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 fad1775..50320fe 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -31954,6 +31954,9 @@ static const struct arm_ext_table armv86a_ext_table[] =
{ NULL, 0, ARM_ARCH_NONE, ARM_ARCH_NONE }
};
+#define armv87a_ext_table armv86a_ext_table
+#define armv88a_ext_table armv87a_ext_table
+
static const struct arm_ext_table armv9a_ext_table[] =
{
ARM_ADD ("simd", FPU_ARCH_DOTPROD_NEON_VFP_ARMV8),
@@ -32091,6 +32094,8 @@ static const struct arm_arch_option_table arm_archs[] =
ARM_ARCH_OPT2 ("armv8.4-a", ARM_ARCH_V8_4A, FPU_ARCH_VFP, armv84a),
ARM_ARCH_OPT2 ("armv8.5-a", ARM_ARCH_V8_5A, FPU_ARCH_VFP, armv85a),
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_OPT ("xscale", ARM_ARCH_XSCALE, FPU_ARCH_VFP),
ARM_ARCH_OPT ("iwmmxt", ARM_ARCH_IWMMXT, FPU_ARCH_VFP),
@@ -32875,6 +32880,8 @@ static const cpu_arch_ver_table cpu_arch_ver[] =
{TAG_CPU_ARCH_V8, ARM_ARCH_V8_5A},
{TAG_CPU_ARCH_V8_1M_MAIN, ARM_ARCH_V8_1M_MAIN},
{TAG_CPU_ARCH_V8, ARM_ARCH_V8_6A},
+ {TAG_CPU_ARCH_V8, ARM_ARCH_V8_7A},
+ {TAG_CPU_ARCH_V8, ARM_ARCH_V8_8A},
{TAG_CPU_ARCH_V9, ARM_ARCH_V9A},
{-1, ARM_ARCH_NONE}
};
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi
index 4b5656e..49a9127 100644
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -265,6 +265,8 @@ names are recognized:
@code{armv8-m.main},
@code{armv8.1-m.main},
@code{armv8.6-a},
+@code{armv8.7-a},
+@code{armv8.8-a},
@code{armv9-a},
@code{iwmmxt},
@code{iwmmxt2}
diff --git a/gas/testsuite/gas/arm/attr-march-armv8_7-a.d b/gas/testsuite/gas/arm/attr-march-armv8_7-a.d
new file mode 100644
index 0000000..38f0429
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv8_7-a.d
@@ -0,0 +1,17 @@
+# name: attributes for -march=armv8.7-a
+# source: blank.s
+# as: -march=armv8.7-a
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi* *-*-nacl*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "8.7-A"
+ Tag_CPU_arch: v8
+ 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-armv8_8-a.d b/gas/testsuite/gas/arm/attr-march-armv8_8-a.d
new file mode 100644
index 0000000..64db000
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv8_8-a.d
@@ -0,0 +1,17 @@
+# name: attributes for -march=armv8.8-a
+# source: blank.s
+# as: -march=armv8.8-a
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi* *-*-nacl*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "8.8-A"
+ Tag_CPU_arch: v8
+ 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-armv8.7-a.d b/gas/testsuite/gas/arm/bfloat16-armv8.7-a.d
new file mode 100644
index 0000000..c898958
--- /dev/null
+++ b/gas/testsuite/gas/arm/bfloat16-armv8.7-a.d
@@ -0,0 +1,5 @@
+#name: Bfloat 16 extension (Armv8.7-A)
+#source: bfloat16.s
+#as: -mno-warn-deprecated -march=armv8.7-a+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/gas/testsuite/gas/arm/bfloat16-armv8.8-a.d b/gas/testsuite/gas/arm/bfloat16-armv8.8-a.d
new file mode 100644
index 0000000..0741624
--- /dev/null
+++ b/gas/testsuite/gas/arm/bfloat16-armv8.8-a.d
@@ -0,0 +1,5 @@
+#name: Bfloat 16 extension (Armv8.8-A)
+#source: bfloat16.s
+#as: -mno-warn-deprecated -march=armv8.8-a+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/gas/testsuite/gas/arm/i8mm-armv8.7-a.d b/gas/testsuite/gas/arm/i8mm-armv8.7-a.d
new file mode 100644
index 0000000..881060b
--- /dev/null
+++ b/gas/testsuite/gas/arm/i8mm-armv8.7-a.d
@@ -0,0 +1,5 @@
+#name: Int8 Matrix Multiply extension (Armv8.7-A)
+#source: i8mm.s
+#as: -mno-warn-deprecated -march=armv8.7-a+i8mm+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/gas/testsuite/gas/arm/i8mm-armv8.8-a.d b/gas/testsuite/gas/arm/i8mm-armv8.8-a.d
new file mode 100644
index 0000000..ab15b31
--- /dev/null
+++ b/gas/testsuite/gas/arm/i8mm-armv8.8-a.d
@@ -0,0 +1,5 @@
+#name: Int8 Matrix Multiply extension (Armv8.8-A)
+#source: i8mm.s
+#as: -mno-warn-deprecated -march=armv8.8-a+i8mm+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...