From f84c79550c97f760530061f068c15dbdefaced85 Mon Sep 17 00:00:00 2001 From: Sam Parker Date: Mon, 21 Aug 2017 08:52:45 +0000 Subject: [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 --- lib/Driver/ToolChains/Arch/ARM.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lib') 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 &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=. -- cgit v1.2.1