From cf296444ab02db54955f9bbc5f4bd0eda9d7ab7c Mon Sep 17 00:00:00 2001 From: Artyom Skrobov Date: Thu, 24 Sep 2015 17:31:16 +0000 Subject: [ARM] Handle +t2dsp feature as an ArchExtKind in ARMTargetParser.def Currently, the availability of DSP instructions (ACLE 6.4.7) is handled in a hand-rolled tricky condition block in tools/clang/lib/Basic/Targets.cpp, with a FIXME: attached. This patch changes the handling of +t2dsp to be in line with other architecture extensions. Following a revert of r248152 and new review comments, this patch also includes renaming FeatureDSPThumb2 -> FeatureDSP, hasThumb2DSP() -> hasDSP(), etc. The spelling of "t2dsp" is preserved, pending a further investigation of its possible external usage. Differential Revision: http://reviews.llvm.org/D12937 llvm-svn: 248519 --- llvm/lib/Support/TargetParser.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'llvm/lib/Support/TargetParser.cpp') diff --git a/llvm/lib/Support/TargetParser.cpp b/llvm/lib/Support/TargetParser.cpp index b2bf980cf6d..1ae63e2cec5 100644 --- a/llvm/lib/Support/TargetParser.cpp +++ b/llvm/lib/Support/TargetParser.cpp @@ -189,6 +189,11 @@ bool llvm::ARM::getExtensionFeatures(unsigned Extensions, else Features.push_back("-crc"); + if (Extensions & ARM::AEK_DSP) + Features.push_back("+t2dsp"); + else + Features.push_back("-t2dsp"); + return getHWDivFeatures(Extensions, Features); } -- cgit v1.2.3