From 195e9040022e6516fbd26b46b712c15465edecbc Mon Sep 17 00:00:00 2001 From: Sjoerd Meijer Date: Fri, 29 Jun 2018 08:43:19 +0000 Subject: [ARM][AArch64] Armv8.4-A Enablement Initial patch adding assembly support for Armv8.4-A. Besides adding v8.4 as a supported architecture to the usual places, this also adds target features for the different crypto algorithms. Armv8.4-A introduced new crypto algorithms, made them optional, and allows different combinations: - none of the v8.4 crypto functions are supported, which is independent of the implementation of the Armv8.0 SHA1 and SHA2 instructions. - the v8.4 SHA512 and SHA3 support is implemented, in this case the Armv8.0 SHA1 and SHA2 instructions must also be implemented. - the v8.4 SM3 and SM4 support is implemented, which is independent of the implementation of the Armv8.0 SHA1 and SHA2 instructions. - all of the v8.4 crypto functions are supported, in this case the Armv8.0 SHA1 and SHA2 instructions must also be implemented. The v8.4 crypto instructions are added to AArch64 only, and not AArch32, and are made optional extensions to Armv8.2-A. The user-facing Clang options will map on these new target features, their naming will be compatible with GCC and added in follow-up patches. The Armv8.4-A instruction sets can be downloaded here: https://developer.arm.com/products/architecture/a-profile/exploration-tools Differential Revision: https://reviews.llvm.org/D48625 llvm-svn: 335953 --- llvm/lib/Support/TargetParser.cpp | 5 +++++ llvm/lib/Support/Triple.cpp | 2 ++ 2 files changed, 7 insertions(+) (limited to 'llvm/lib/Support') diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp index cadb3efc063..bb2aecdc63e 100644 --- a/llvm/lib/Support/TargetParser.cpp +++ b/llvm/lib/Support/TargetParser.cpp @@ -480,6 +480,8 @@ bool llvm::AArch64::getArchFeatures(AArch64::ArchKind AK, Features.push_back("+v8.2a"); if (AK == AArch64::ArchKind::ARMV8_3A) Features.push_back("+v8.3a"); + if (AK == AArch64::ArchKind::ARMV8_4A) + Features.push_back("+v8.4a"); return AK != AArch64::ArchKind::INVALID; } @@ -585,6 +587,7 @@ static StringRef getArchSynonym(StringRef Arch) { .Case("v8.1a", "v8.1-a") .Case("v8.2a", "v8.2-a") .Case("v8.3a", "v8.3-a") + .Case("v8.4a", "v8.4-a") .Case("v8r", "v8-r") .Case("v8m.base", "v8-m.base") .Case("v8m.main", "v8-m.main") @@ -752,6 +755,7 @@ ARM::ProfileKind ARM::parseArchProfile(StringRef Arch) { case ARM::ArchKind::ARMV8_1A: case ARM::ArchKind::ARMV8_2A: case ARM::ArchKind::ARMV8_3A: + case ARM::ArchKind::ARMV8_4A: return ARM::ProfileKind::A; case ARM::ArchKind::ARMV2: case ARM::ArchKind::ARMV2A: @@ -814,6 +818,7 @@ unsigned llvm::ARM::parseArchVersion(StringRef Arch) { case ARM::ArchKind::ARMV8_1A: case ARM::ArchKind::ARMV8_2A: case ARM::ArchKind::ARMV8_3A: + case ARM::ArchKind::ARMV8_4A: case ARM::ArchKind::ARMV8R: case ARM::ArchKind::ARMV8MBaseline: case ARM::ArchKind::ARMV8MMainline: diff --git a/llvm/lib/Support/Triple.cpp b/llvm/lib/Support/Triple.cpp index bf08eb3a2ee..b791370ed26 100644 --- a/llvm/lib/Support/Triple.cpp +++ b/llvm/lib/Support/Triple.cpp @@ -590,6 +590,8 @@ static Triple::SubArchType parseSubArch(StringRef SubArchName) { return Triple::ARMSubArch_v8_2a; case ARM::ArchKind::ARMV8_3A: return Triple::ARMSubArch_v8_3a; + case ARM::ArchKind::ARMV8_4A: + return Triple::ARMSubArch_v8_4a; case ARM::ArchKind::ARMV8R: return Triple::ARMSubArch_v8r; case ARM::ArchKind::ARMV8MBaseline: -- cgit v1.2.3