aboutsummaryrefslogtreecommitdiff
path: root/include
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
commit3518022233e6b757c57d3deb7723fd91214fe036 (patch)
treedce33920495be659550b38c847c95483e2d926f9 /include
parent23ff54c27d535727c1c467abdd4bed8fbd46d4a6 (diff)
downloadgdb-3518022233e6b757c57d3deb7723fd91214fe036.zip
gdb-3518022233e6b757c57d3deb7723fd91214fe036.tar.gz
gdb-3518022233e6b757c57d3deb7723fd91214fe036.tar.bz2
aarch64: Add support for Armv9.1-A to Armv9.3-A
This patch adds AArch64 support for -march=armv9.[123]-a. The behaviour of the new options can be expressed using a combination of existing feature flags, so we don't need to eat into the vanishing number of spare AARCH64_FEATURE_* bits. Hoewver, it was more convenient to separate out the |s of feature flags so that Armv9.1-A could reuse the set for Armv8.6-A, and so on. include/ * opcode/aarch64.h (AARCH64_ARCH_V8_FEATURES): New macro, split out from... (AARCH64_ARCH_V8): ...here. (AARCH64_ARCH_V8_1_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_1): ...here. (AARCH64_ARCH_V8_2_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_2): ...here. (AARCH64_ARCH_V8_3_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_3): ...here. (AARCH64_ARCH_V8_4_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_4): ...here. (AARCH64_ARCH_V8_5_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_5): ...here. (AARCH64_ARCH_V8_6_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_6): ...here. (AARCH64_ARCH_V8_7_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_7): ...here. (AARCH64_ARCH_V8_8_FEATURES): New macro, split out from... (AARCH64_ARCH_V8_8): ...here. (AARCH64_ARCH_V9_FEATURES): New macro, split out from... (AARCH64_ARCH_V9): ...here. (AARCH64_ARCH_V9_1_FEATURES, AARCH64_ARCH_V9_1): New macros. (AARCH64_ARCH_V9_2_FEATURES, AARCH64_ARCH_V9_2): New macros. (AARCH64_ARCH_V9_3_FEATURES, AARCH64_ARCH_V9_3): New macros. gas/ * doc/c-aarch64.texi: Add armv9.1-a, armv9-2-a and armv9.3-a. * config/tc-aarch64.c (aarch64_archs): Likewise. * NEWS: Mention the above. * testsuite/gas/aarch64/armv9_invalid.d, testsuite/gas/aarch64/armv9_invalid.s, testsuite/gas/aarch64/armv9_invalid.l: New test. * testsuite/gas/aarch64/armv9_1.d, testsuite/gas/aarch64/armv9_1.s: Likewise. * testsuite/gas/aarch64/armv9_1_invalid.d, testsuite/gas/aarch64/armv9_1_invalid.s, testsuite/gas/aarch64/armv9_1_invalid.l: Likewise. * testsuite/gas/aarch64/armv9_2.d, testsuite/gas/aarch64/armv9_2.s: Likewise. * testsuite/gas/aarch64/armv9_2_invalid.d, testsuite/gas/aarch64/armv9_2_invalid.s, testsuite/gas/aarch64/armv9_2_invalid.l: Likewise. * testsuite/gas/aarch64/armv9_3.d, testsuite/gas/aarch64/armv9_3.s: Likewise.
Diffstat (limited to 'include')
-rw-r--r--include/opcode/aarch64.h102
1 files changed, 62 insertions, 40 deletions
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 4d4f108..7bd011c 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -101,60 +101,82 @@ typedef uint32_t aarch64_insn;
/* Crypto instructions are the combination of AES and SHA2. */
#define AARCH64_FEATURE_CRYPTO (AARCH64_FEATURE_SHA2 | AARCH64_FEATURE_AES)
+#define AARCH64_ARCH_V8_FEATURES (AARCH64_FEATURE_V8_A \
+ | AARCH64_FEATURE_FP \
+ | AARCH64_FEATURE_RAS \
+ | AARCH64_FEATURE_SIMD)
+#define AARCH64_ARCH_V8_1_FEATURES (AARCH64_FEATURE_V8_1 \
+ | AARCH64_FEATURE_CRC \
+ | AARCH64_FEATURE_LSE \
+ | AARCH64_FEATURE_PAN \
+ | AARCH64_FEATURE_LOR \
+ | AARCH64_FEATURE_RDMA)
+#define AARCH64_ARCH_V8_2_FEATURES (AARCH64_FEATURE_V8_2)
+#define AARCH64_ARCH_V8_3_FEATURES (AARCH64_FEATURE_V8_3 \
+ | AARCH64_FEATURE_PAC \
+ | AARCH64_FEATURE_RCPC \
+ | AARCH64_FEATURE_COMPNUM)
+#define AARCH64_ARCH_V8_4_FEATURES (AARCH64_FEATURE_V8_4 \
+ | AARCH64_FEATURE_DOTPROD \
+ | AARCH64_FEATURE_FLAGM \
+ | AARCH64_FEATURE_F16_FML)
+#define AARCH64_ARCH_V8_5_FEATURES (AARCH64_FEATURE_V8_5 \
+ | AARCH64_FEATURE_FLAGMANIP \
+ | AARCH64_FEATURE_FRINTTS \
+ | AARCH64_FEATURE_SB \
+ | AARCH64_FEATURE_PREDRES \
+ | AARCH64_FEATURE_CVADP \
+ | AARCH64_FEATURE_BTI \
+ | AARCH64_FEATURE_SCXTNUM \
+ | AARCH64_FEATURE_ID_PFR2 \
+ | AARCH64_FEATURE_SSBS)
+#define AARCH64_ARCH_V8_6_FEATURES (AARCH64_FEATURE_V8_6 \
+ | AARCH64_FEATURE_BFLOAT16 \
+ | AARCH64_FEATURE_I8MM)
+#define AARCH64_ARCH_V8_7_FEATURES (AARCH64_FEATURE_V8_7 \
+ | AARCH64_FEATURE_LS64)
+#define AARCH64_ARCH_V8_8_FEATURES (AARCH64_FEATURE_V8_8 \
+ | AARCH64_FEATURE_MOPS \
+ | AARCH64_FEATURE_HBC)
+
+#define AARCH64_ARCH_V9_FEATURES (AARCH64_FEATURE_V9 \
+ | AARCH64_FEATURE_SVE \
+ | AARCH64_FEATURE_SVE2)
+#define AARCH64_ARCH_V9_1_FEATURES (AARCH64_ARCH_V8_6_FEATURES)
+#define AARCH64_ARCH_V9_2_FEATURES (AARCH64_ARCH_V8_7_FEATURES)
+#define AARCH64_ARCH_V9_3_FEATURES (AARCH64_ARCH_V8_8_FEATURES)
+
/* Architectures are the sum of the base and extensions. */
#define AARCH64_ARCH_V8 AARCH64_FEATURE (AARCH64_FEATURE_V8, \
- AARCH64_FEATURE_V8_A \
- | AARCH64_FEATURE_FP \
- | AARCH64_FEATURE_RAS \
- | AARCH64_FEATURE_SIMD)
+ AARCH64_ARCH_V8_FEATURES)
#define AARCH64_ARCH_V8_1 AARCH64_FEATURE (AARCH64_ARCH_V8, \
- AARCH64_FEATURE_CRC \
- | AARCH64_FEATURE_V8_1 \
- | AARCH64_FEATURE_LSE \
- | AARCH64_FEATURE_PAN \
- | AARCH64_FEATURE_LOR \
- | AARCH64_FEATURE_RDMA)
+ AARCH64_ARCH_V8_1_FEATURES)
#define AARCH64_ARCH_V8_2 AARCH64_FEATURE (AARCH64_ARCH_V8_1, \
- AARCH64_FEATURE_V8_2)
+ AARCH64_ARCH_V8_2_FEATURES)
#define AARCH64_ARCH_V8_3 AARCH64_FEATURE (AARCH64_ARCH_V8_2, \
- AARCH64_FEATURE_V8_3 \
- | AARCH64_FEATURE_PAC \
- | AARCH64_FEATURE_RCPC \
- | AARCH64_FEATURE_COMPNUM)
+ AARCH64_ARCH_V8_3_FEATURES)
#define AARCH64_ARCH_V8_4 AARCH64_FEATURE (AARCH64_ARCH_V8_3, \
- AARCH64_FEATURE_V8_4 \
- | AARCH64_FEATURE_DOTPROD \
- | AARCH64_FEATURE_FLAGM \
- | AARCH64_FEATURE_F16_FML)
+ AARCH64_ARCH_V8_4_FEATURES)
#define AARCH64_ARCH_V8_5 AARCH64_FEATURE (AARCH64_ARCH_V8_4, \
- AARCH64_FEATURE_V8_5 \
- | AARCH64_FEATURE_FLAGMANIP \
- | AARCH64_FEATURE_FRINTTS \
- | AARCH64_FEATURE_SB \
- | AARCH64_FEATURE_PREDRES \
- | AARCH64_FEATURE_CVADP \
- | AARCH64_FEATURE_BTI \
- | AARCH64_FEATURE_SCXTNUM \
- | AARCH64_FEATURE_ID_PFR2 \
- | AARCH64_FEATURE_SSBS)
+ AARCH64_ARCH_V8_5_FEATURES)
#define AARCH64_ARCH_V8_6 AARCH64_FEATURE (AARCH64_ARCH_V8_5, \
- AARCH64_FEATURE_V8_6 \
- | AARCH64_FEATURE_BFLOAT16 \
- | AARCH64_FEATURE_I8MM)
+ AARCH64_ARCH_V8_6_FEATURES)
#define AARCH64_ARCH_V8_7 AARCH64_FEATURE (AARCH64_ARCH_V8_6, \
- AARCH64_FEATURE_V8_7 \
- | AARCH64_FEATURE_LS64)
+ AARCH64_ARCH_V8_7_FEATURES)
#define AARCH64_ARCH_V8_8 AARCH64_FEATURE (AARCH64_ARCH_V8_7, \
- AARCH64_FEATURE_V8_8 \
- | AARCH64_FEATURE_MOPS \
- | AARCH64_FEATURE_HBC)
+ AARCH64_ARCH_V8_8_FEATURES)
#define AARCH64_ARCH_V8_R (AARCH64_FEATURE (AARCH64_ARCH_V8_4, \
AARCH64_FEATURE_V8_R) \
& ~(AARCH64_FEATURE_V8_A | AARCH64_FEATURE_LOR))
+
#define AARCH64_ARCH_V9 AARCH64_FEATURE (AARCH64_ARCH_V8_5, \
- AARCH64_FEATURE_SVE \
- | AARCH64_FEATURE_SVE2 \
- | AARCH64_FEATURE_V9)
+ AARCH64_ARCH_V9_FEATURES)
+#define AARCH64_ARCH_V9_1 AARCH64_FEATURE (AARCH64_ARCH_V9, \
+ AARCH64_ARCH_V9_1_FEATURES)
+#define AARCH64_ARCH_V9_2 AARCH64_FEATURE (AARCH64_ARCH_V9_1, \
+ AARCH64_ARCH_V9_2_FEATURES)
+#define AARCH64_ARCH_V9_3 AARCH64_FEATURE (AARCH64_ARCH_V9_2, \
+ AARCH64_ARCH_V9_3_FEATURES)
#define AARCH64_ARCH_NONE AARCH64_FEATURE (0, 0)
#define AARCH64_ANY AARCH64_FEATURE (-1, 0) /* Any basic core. */