From 787fdb86a71c5108c231b3bbbb7d3fea3ce4bb8c Mon Sep 17 00:00:00 2001 From: Joey Gouly Date: Fri, 2 Aug 2013 19:18:12 +0000 Subject: [ARMv8] Add an assembler warning for the deprecated 'setend' instruction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187666 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'lib/Target/ARM/AsmParser') diff --git a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 8e56a1ab94..862e116602 100644 --- a/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -229,6 +229,7 @@ class ARMAsmParser : public MCTargetAsmParser { SmallVectorImpl &Operands); bool shouldOmitPredicateOperand(StringRef Mnemonic, SmallVectorImpl &Operands); + bool isDeprecated(MCInst &Inst, StringRef &Info); public: enum ARMMatchResultTy { @@ -4876,6 +4877,13 @@ bool ARMAsmParser::shouldOmitPredicateOperand( return false; } +bool ARMAsmParser::isDeprecated(MCInst &Inst, StringRef &Info) { + if (hasV8Ops() && Inst.getOpcode() == ARM::SETEND) { + Info = "armv8"; + return true; + } +} + static bool isDataTypeToken(StringRef Tok) { return Tok == ".8" || Tok == ".16" || Tok == ".32" || Tok == ".64" || Tok == ".i8" || Tok == ".i16" || Tok == ".i32" || Tok == ".i64" || @@ -5376,6 +5384,10 @@ validateInstruction(MCInst &Inst, } } + StringRef DepInfo; + if (isDeprecated(Inst, DepInfo)) + Warning(Loc, "deprecated on " + DepInfo); + return false; } -- cgit v1.2.3