diff options
author | Sam Parker <sam.parker@arm.com> | 2017-08-21 08:52:45 +0000 |
---|---|---|
committer | Sam Parker <sam.parker@arm.com> | 2017-08-21 08:52:45 +0000 |
commit | f84c79550c97f760530061f068c15dbdefaced85 (patch) | |
tree | 88aaf41873016307e07d284a7765903d13996229 /lib | |
parent | 8982819d15f4ba52ab853569c849121db58776fb (diff) | |
download | clang-f84c79550c97f760530061f068c15dbdefaced85.tar.gz |
[ARM][AArch64] Cortex-A75 and Cortex-A55 tests
Add frontend tests for Cortex-A75 and Cortex-A55, Arm's latest
big.LITTLE A-class cores. They implement the ARMv8.2-A architecture,
including the cryptography and RAS extensions, plus the optional dot
product extension. They also implement the RCpc AArch64 extension
from ARMv8.3-A.
Cortex-A75:
https://developer.arm.com/products/processors/cortex-a/cortex-a75
Cortex-A55:
https://developer.arm.com/products/processors/cortex-a/cortex-a55
Differential Revision: https://reviews.llvm.org/D36731
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@311319 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Driver/ToolChains/Arch/ARM.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/Driver/ToolChains/Arch/ARM.cpp b/lib/Driver/ToolChains/Arch/ARM.cpp index 49bb23535d..a5d63557f4 100644 --- a/lib/Driver/ToolChains/Arch/ARM.cpp +++ b/lib/Driver/ToolChains/Arch/ARM.cpp @@ -87,6 +87,15 @@ static bool DecodeARMFeatures(const Driver &D, StringRef text, return true; } +static void DecodeARMFeaturesFromCPU(const Driver &D, StringRef CPU, + std::vector<StringRef> &Features) { + if (CPU != "generic") { + llvm::ARM::ArchKind ArchKind = llvm::ARM::parseCPUArch(CPU); + unsigned Extension = llvm::ARM::getDefaultExtensions(CPU, ArchKind); + llvm::ARM::getExtensionFeatures(Extension, Features); + } +} + // Check if -march is valid by checking if it can be canonicalised and parsed. // getARMArch is used here instead of just checking the -march value in order // to handle -march=native correctly. @@ -331,6 +340,8 @@ void arm::getARMTargetFeatures(const ToolChain &TC, for (auto &F : HostFeatures) Features.push_back( Args.MakeArgString((F.second ? "+" : "-") + F.first())); + } else if (!CPUName.empty()) { + DecodeARMFeaturesFromCPU(D, CPUName, Features); } // Honor -mfpu=. ClangAs gives preference to -Wa,-mfpu=. |