LLVM API Documentation
MCTargetAsmParser - Generic interface to target specific assembly parsers. More...
#include <MCTargetAsmParser.h>
Public Types | |
enum | MatchResultTy { Match_InvalidOperand, Match_MissingFeature, Match_MnemonicFail, Match_Success, FIRST_TARGET_MATCH_RESULT_TY } |
Protected Member Functions | |
MCTargetAsmParser () | |
![]() | |
MCAsmParserExtension () | |
Protected Attributes | |
unsigned | AvailableFeatures |
AvailableFeatures - The current set of available features. More... | |
bool | ParsingInlineAsm |
ParsingInlineAsm - Are we parsing ms-style inline assembly? More... | |
MCAsmParserSemaCallback * | SemaCallback |
![]() | |
bool | BracketExpressionsSupported |
Additional Inherited Members | |
![]() | |
template<typename T , bool(T::*)(StringRef, SMLoc) Handler> | |
static bool | HandleDirective (MCAsmParserExtension *Target, StringRef Directive, SMLoc DirectiveLoc) |
MCTargetAsmParser - Generic interface to target specific assembly parsers.
Definition at line 74 of file MCTargetAsmParser.h.
Enumerator | |
---|---|
Match_InvalidOperand | |
Match_MissingFeature | |
Match_MnemonicFail | |
Match_Success | |
FIRST_TARGET_MATCH_RESULT_TY |
Definition at line 76 of file MCTargetAsmParser.h.
|
protected |
Definition at line 13 of file MCTargetAsmParser.cpp.
|
virtual |
Definition at line 18 of file MCTargetAsmParser.cpp.
|
inlinevirtual |
Definition at line 179 of file MCTargetAsmParser.h.
checkTargetMatchPredicate - Validate the instruction match against any complex target predicates not expressible via match classes.
Definition at line 172 of file MCTargetAsmParser.h.
References Match_Success.
|
pure virtual |
|
inline |
Definition at line 103 of file MCTargetAsmParser.h.
References AvailableFeatures.
|
inline |
Definition at line 106 of file MCTargetAsmParser.h.
References ParsingInlineAsm.
|
pure virtual |
MatchAndEmitInstruction - Recognize a series of operands of a parsed instruction as an actual MCInst and emit it to the specified MCStreamer. This returns false on success and returns true on failure to match.
On failure, the target parser is responsible for emitting a diagnostic explaining the match failure.
|
pure virtual |
mnemonicIsValid - This returns true if this is a valid mnemonic and false otherwise.
|
inlinevirtual |
Definition at line 185 of file MCTargetAsmParser.h.
ParseDirective - Parse a target specific assembler directive
The parser is positioned following the directive name. The target specific directive parser should parse the entire directive doing or recording any target specific work, or return true and do nothing if the directive is not target specific. If the directive is specific for the target, the entire line is parsed up to and including the end-of-statement token and false is returned.
DirectiveID | - the identifier token of the directive. |
|
pure virtual |
ParseInstruction - Parse one assembly instruction.
The parser is positioned following the instruction name. The target specific instruction parser should parse the entire instruction and construct the appropriate MCInst, or emit an error. On success, the entire line should be parsed up to and including the end-of-statement token. On failure, the parser is not required to read to the end of the line.
Name | - The instruction name. |
NameLoc | - The source location of the name. |
Operands | [out] - The list of parsed operands, this returns ownership of them to the caller. |
|
pure virtual |
|
inline |
Definition at line 104 of file MCTargetAsmParser.h.
References AvailableFeatures.
|
inline |
Definition at line 107 of file MCTargetAsmParser.h.
References ParsingInlineAsm.
|
inline |
Definition at line 109 of file MCTargetAsmParser.h.
References SemaCallback.
|
inlinevirtual |
Allow a target to add special case operand matching for things that tblgen doesn't/can't handle effectively. For example, literal immediates on ARM. TableGen expects a token operand, but the parser will recognize them as immediates.
Definition at line 165 of file MCTargetAsmParser.h.
References Match_InvalidOperand.
|
protected |
AvailableFeatures - The current set of available features.
Definition at line 91 of file MCTargetAsmParser.h.
Referenced by getAvailableFeatures(), and setAvailableFeatures().
|
protected |
ParsingInlineAsm - Are we parsing ms-style inline assembly?
Definition at line 94 of file MCTargetAsmParser.h.
Referenced by isParsingInlineAsm(), and setParsingInlineAsm().
|
protected |
SemaCallback - The Sema callback implementation. Must be set when parsing ms-style inline assembly.
Definition at line 98 of file MCTargetAsmParser.h.
Referenced by setSemaCallback().