1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

[ARMv8] Add an assembler warning for the deprecated 'setend' instruction.

llvm-svn: 187666
This commit is contained in:
Joey Gouly 2013-08-02 19:18:12 +00:00
parent eef986f7a3
commit 9c798eabce
2 changed files with 15 additions and 0 deletions

View File

@ -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;
}

View File

@ -0,0 +1,3 @@
@ RUN: llvm-mc -triple armv8 -show-encoding < %s 2>&1 | FileCheck %s
setend be
@ CHECK: warning: deprecated on armv8