MCTargetAsmParser target match predicate support.

Allow a target assembly parser to do context sensitive constraint checking
on a potential instruction match. This will be used, for example, to handle
Thumb2 IT block parsing.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jim Grosbach
2011-08-15 23:03:29 +00:00
parent 6326a4238d
commit 19cb7f491f
5 changed files with 30 additions and 7 deletions

View File

@@ -18,6 +18,7 @@ class StringRef;
class SMLoc;
class AsmToken;
class MCParsedAsmOperand;
class MCInst;
template <typename T> class SmallVectorImpl;
/// MCTargetAsmParser - Generic interface to target specific assembly parsers.
@@ -28,7 +29,8 @@ public:
Match_InvalidOperand,
Match_MissingFeature,
Match_MnemonicFail,
Match_Success
Match_Success,
FIRST_TARGET_MATCH_RESULT_TY
};
private:
@@ -88,6 +90,12 @@ public:
SmallVectorImpl<MCParsedAsmOperand*> &Operands,
MCStreamer &Out) = 0;
/// checkTargetMatchPredicate - Validate the instruction match against
/// any complex target predicates not expressible via match classes.
virtual unsigned checkTargetMatchPredicate(MCInst &Inst) {
return Match_Success;
}
};
} // End llvm namespace