mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
[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
This commit is contained in:
parent
f2855f8886
commit
787fdb86a7
@ -229,6 +229,7 @@ class ARMAsmParser : public MCTargetAsmParser {
|
|||||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
||||||
bool shouldOmitPredicateOperand(StringRef Mnemonic,
|
bool shouldOmitPredicateOperand(StringRef Mnemonic,
|
||||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
SmallVectorImpl<MCParsedAsmOperand*> &Operands);
|
||||||
|
bool isDeprecated(MCInst &Inst, StringRef &Info);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum ARMMatchResultTy {
|
enum ARMMatchResultTy {
|
||||||
@ -4876,6 +4877,13 @@ bool ARMAsmParser::shouldOmitPredicateOperand(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ARMAsmParser::isDeprecated(MCInst &Inst, StringRef &Info) {
|
||||||
|
if (hasV8Ops() && Inst.getOpcode() == ARM::SETEND) {
|
||||||
|
Info = "armv8";
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
static bool isDataTypeToken(StringRef Tok) {
|
static bool isDataTypeToken(StringRef Tok) {
|
||||||
return Tok == ".8" || Tok == ".16" || Tok == ".32" || Tok == ".64" ||
|
return Tok == ".8" || Tok == ".16" || Tok == ".32" || Tok == ".64" ||
|
||||||
Tok == ".i8" || Tok == ".i16" || Tok == ".i32" || Tok == ".i64" ||
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
3
test/MC/ARM/deprecated-v8.s
Normal file
3
test/MC/ARM/deprecated-v8.s
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
@ RUN: llvm-mc -triple armv8 -show-encoding < %s 2>&1 | FileCheck %s
|
||||||
|
setend be
|
||||||
|
@ CHECK: warning: deprecated on armv8
|
Loading…
Reference in New Issue
Block a user