aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsrinath <srinath.parvathaneni@arm.com>2024-01-08 14:13:28 +0000
committersrinath <srinath.parvathaneni@arm.com>2024-01-08 14:13:40 +0000
commitb3b647dc7fb8f9854637234b47c17c0d11873577 (patch)
treee76939887365e4e120e126ccdf29d9d15bb66fee
parentbde5096397811b8859813afab21dd3e8a5b0082b (diff)
downloadgdb-b3b647dc7fb8f9854637234b47c17c0d11873577.zip
gdb-b3b647dc7fb8f9854637234b47c17c0d11873577.tar.gz
gdb-b3b647dc7fb8f9854637234b47c17c0d11873577.tar.bz2
arm: Add support for Armv8.9-A and Armv9.4-A
This patch adds AArch32 support for -march=armv8.9-a and -march=armv9.4-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_4A and ARM_ARCH_V8_9A are technically redundant but it including them for macro code consistency across architectures.
-rw-r--r--gas/NEWS2
-rw-r--r--gas/config/tc-arm.c6
-rw-r--r--gas/doc/c-arm.texi2
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv8_9-a.d17
-rw-r--r--gas/testsuite/gas/arm/attr-march-armv9_4-a.d17
-rw-r--r--gas/testsuite/gas/arm/bfloat16-armv8.9-a.d5
-rw-r--r--gas/testsuite/gas/arm/bfloat16-armv9.4-a.d5
-rw-r--r--gas/testsuite/gas/arm/i8mm-armv8.9-a.d5
-rw-r--r--gas/testsuite/gas/arm/i8mm-armv9.4-a.d5
-rw-r--r--include/opcode/arm.h2
10 files changed, 66 insertions, 0 deletions
diff --git a/gas/NEWS b/gas/NEWS
index 3dede06..74df7e6 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -1,5 +1,7 @@
-*- text -*-
+* Add support for 'armv8.9-a' and 'armv9.4-a' for -march in Arm GAS.
+
* Initial support for Intel APX: 32 GPRs, NDD, PUSH2/POP2 and PUSHP/POPP.
* On RISC-V macro instructions expanding to AUIPC and a load, store, or branch
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 228e5e0..9c4bf56 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -32022,6 +32022,7 @@ static const struct arm_ext_table armv86a_ext_table[] =
#define armv87a_ext_table armv86a_ext_table
#define armv88a_ext_table armv87a_ext_table
+#define armv89a_ext_table armv88a_ext_table
static const struct arm_ext_table armv9a_ext_table[] =
{
@@ -32041,6 +32042,7 @@ static const struct arm_ext_table armv9a_ext_table[] =
#define armv91a_ext_table armv86a_ext_table
#define armv92a_ext_table armv91a_ext_table
#define armv93a_ext_table armv92a_ext_table
+#define armv94a_ext_table armv93a_ext_table
#define CDE_EXTENSIONS \
ARM_ADD ("cdecp0", ARM_FEATURE_CORE_HIGH (ARM_EXT2_CDE | ARM_EXT2_CDE0)), \
@@ -32166,10 +32168,12 @@ 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 ("armv8.9-a", ARM_ARCH_V8_9A, FPU_ARCH_VFP, armv89a),
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_OPT2 ("armv9.4-a", ARM_ARCH_V9_4A, FPU_ARCH_VFP, armv94a),
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),
@@ -32955,10 +32959,12 @@ static const cpu_arch_ver_table cpu_arch_ver[] =
{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_V8, ARM_ARCH_V8_9A},
{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},
+ {TAG_CPU_ARCH_V9, ARM_ARCH_V9_4A},
{-1, ARM_ARCH_NONE}
};
diff --git a/gas/doc/c-arm.texi b/gas/doc/c-arm.texi
index 0a54073..ec1ed9d 100644
--- a/gas/doc/c-arm.texi
+++ b/gas/doc/c-arm.texi
@@ -268,10 +268,12 @@ names are recognized:
@code{armv8.6-a},
@code{armv8.7-a},
@code{armv8.8-a},
+@code{armv8.9-a},
@code{armv9-a},
@code{armv9.1-a},
@code{armv9.2-a},
@code{armv9.3-a},
+@code{armv9.4-a},
@code{iwmmxt},
@code{iwmmxt2}
and
diff --git a/gas/testsuite/gas/arm/attr-march-armv8_9-a.d b/gas/testsuite/gas/arm/attr-march-armv8_9-a.d
new file mode 100644
index 0000000..e1d8feb
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv8_9-a.d
@@ -0,0 +1,17 @@
+# name: attributes for -march=armv8.9-a
+# source: blank.s
+# as: -march=armv8.9-a
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi* *-*-nacl*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "8.9-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-armv9_4-a.d b/gas/testsuite/gas/arm/attr-march-armv9_4-a.d
new file mode 100644
index 0000000..b989114
--- /dev/null
+++ b/gas/testsuite/gas/arm/attr-march-armv9_4-a.d
@@ -0,0 +1,17 @@
+# name: check for armv9.4-a command line option settings
+# source: blank.s
+# as: -march=armv9.4-a
+# readelf: -A
+# This test is only valid on EABI based ports.
+# target: *-*-*eabi* *-*-nacl*
+
+Attribute Section: aeabi
+File Attributes
+ Tag_CPU_name: "9.4-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-armv8.9-a.d b/gas/testsuite/gas/arm/bfloat16-armv8.9-a.d
new file mode 100644
index 0000000..8c32abd
--- /dev/null
+++ b/gas/testsuite/gas/arm/bfloat16-armv8.9-a.d
@@ -0,0 +1,5 @@
+#name: Bfloat 16 extension (Armv8.9-A)
+#source: bfloat16.s
+#as: -mno-warn-deprecated -march=armv8.9-a+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/gas/testsuite/gas/arm/bfloat16-armv9.4-a.d b/gas/testsuite/gas/arm/bfloat16-armv9.4-a.d
new file mode 100644
index 0000000..d78876c
--- /dev/null
+++ b/gas/testsuite/gas/arm/bfloat16-armv9.4-a.d
@@ -0,0 +1,5 @@
+#name: Bfloat 16 extension (Armv9.4-A)
+#source: bfloat16.s
+#as: -mno-warn-deprecated -march=armv9.4-a+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/gas/testsuite/gas/arm/i8mm-armv8.9-a.d b/gas/testsuite/gas/arm/i8mm-armv8.9-a.d
new file mode 100644
index 0000000..a2a28ae
--- /dev/null
+++ b/gas/testsuite/gas/arm/i8mm-armv8.9-a.d
@@ -0,0 +1,5 @@
+#name: Int8 Matrix Multiply extension (Armv8.9-A)
+#source: i8mm.s
+#as: -mno-warn-deprecated -march=armv8.9-a+i8mm+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/gas/testsuite/gas/arm/i8mm-armv9.4-a.d b/gas/testsuite/gas/arm/i8mm-armv9.4-a.d
new file mode 100644
index 0000000..3929410
--- /dev/null
+++ b/gas/testsuite/gas/arm/i8mm-armv9.4-a.d
@@ -0,0 +1,5 @@
+#name: Int8 Matrix Multiply extension (Armv9.4-A)
+#source: i8mm.s
+#as: -mno-warn-deprecated -march=armv9.4-a+i8mm+simd -I$srcdir/$subdir
+#objdump: -dr --show-raw-insn
+#...
diff --git a/include/opcode/arm.h b/include/opcode/arm.h
index 0b5c373..ad1d18a 100644
--- a/include/opcode/arm.h
+++ b/include/opcode/arm.h
@@ -379,6 +379,7 @@
| FPU_NEON_EXT_DOTPROD)
#define ARM_ARCH_V8_7A ARM_ARCH_V8_6A
#define ARM_ARCH_V8_8A ARM_ARCH_V8_7A
+#define ARM_ARCH_V8_9A ARM_ARCH_V8_8A
#define ARM_ARCH_V8M_BASE ARM_FEATURE_CORE (ARM_AEXT_V8M_BASE, \
ARM_AEXT2_V8M_BASE)
#define ARM_ARCH_V8M_MAIN ARM_FEATURE_CORE (ARM_AEXT_V8M_MAIN, \
@@ -399,6 +400,7 @@
| FPU_NEON_EXT_DOTPROD)
#define ARM_ARCH_V9_2A ARM_ARCH_V9_1A
#define ARM_ARCH_V9_3A ARM_ARCH_V9_2A
+#define ARM_ARCH_V9_4A ARM_ARCH_V9_3A
/* Some useful combinations: */
#define ARM_ARCH_NONE ARM_FEATURE_ALL (0, 0, 0, 0)