summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit5d0564d2e6206129464043e45301c6ef4e42359c (patch)
tree8b64cf2f069a5855d1476be20ec5d05d9dce34c9 /llvm/lib/Target/ARM/AsmParser
parent8e091352c9bd6afa7e1e5c6f54e03f9b0c604f03 (diff)
downloadbcm5719-llvm-5d0564d2e6206129464043e45301c6ef4e42359c.tar.gz
bcm5719-llvm-5d0564d2e6206129464043e45301c6ef4e42359c.zip
[ARMv8] Add an assembler warning for the deprecated 'setend' instruction.
llvm-svn: 187666
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser')
-rw-r--r--llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
index 8e56a1ab942..862e1166027 100644
--- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud