summaryrefslogtreecommitdiff
path: root/lib/Target/ARM/AsmParser
diff options
context:
space:
mode:
authorJoey Gouly <joey.gouly@arm.com>2013-08-02 19:18:12 +0000
committerJoey Gouly <joey.gouly@arm.com>2013-08-02 19:18:12 +0000
commit787fdb86a71c5108c231b3bbbb7d3fea3ce4bb8c (patch)
tree5d680b78db2c48ed29e1b28053a43ca5f7fdc3e2 /lib/Target/ARM/AsmParser
parentf2855f88864cb00c774114b80b78f2388821b8ca (diff)
downloadllvm-787fdb86a71c5108c231b3bbbb7d3fea3ce4bb8c.tar.gz
llvm-787fdb86a71c5108c231b3bbbb7d3fea3ce4bb8c.tar.bz2
llvm-787fdb86a71c5108c231b3bbbb7d3fea3ce4bb8c.tar.xz
[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
Diffstat (limited to 'lib/Target/ARM/AsmParser')
-rw-r--r--lib/Target/ARM/AsmParser/ARMAsmParser.cpp12
1 files changed, 12 insertions, 0 deletions
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<MCParsedAsmOperand*> &Operands);
bool shouldOmitPredicateOperand(StringRef Mnemonic,
SmallVectorImpl<MCParsedAsmOperand*> &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;
}