10 #ifndef LLVM_MC_MCPARSER_MCTARGETASMPARSER_H
11 #define LLVM_MC_MCPARSER_MCTARGETASMPARSER_H
21 class MCParsedAsmOperand;
23 class MCSubtargetInfo;
191 bool MatchingInlineAsm) = 0;
virtual bool isLabel(AsmToken &Token)
MCAsmParserSemaCallback * SemaCallback
SemaCallback - The Sema callback implementation.
SmallVectorImpl< AsmRewrite > * AsmRewrites
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
virtual unsigned checkEarlyTargetMatchPredicate(MCInst &Inst, const OperandVector &Operands)
Validate the instruction match against any complex target predicates before rendering any operands to...
MCTargetAsmParser - Generic interface to target specific assembly parsers.
const MCSubtargetInfo * STI
Current STI.
ParseInstructionInfo(SmallVectorImpl< AsmRewrite > *rewrites)
virtual void onLabelParsed(MCSymbol *Symbol)
AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len, StringRef label)
MCTargetOptions MCOptions
Set of options which affects instrumentation of inline assembly.
virtual unsigned validateTargetOperandClass(MCParsedAsmOperand &Op, unsigned Kind)
Allow a target to add special case operand matching for things that tblgen doesn't/can't handle effec...
virtual void convertToMapAndConstraints(unsigned Kind, const OperandVector &Operands)=0
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
Base class for the full range of assembler expressions which are needed for parsing.
virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc, SMLoc &EndLoc)=0
Target independent representation for an assembler token.
MCParsedAsmOperand - This abstract class represents a source-level assembly instruction operand...
Context object for machine code objects.
uint64_t getAvailableFeatures() const
Instances of this class represent a single low-level machine instruction.
virtual void SetFrameRegister(unsigned RegNo)
Sets frame register corresponding to the current MachineFunction.
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
const MCSubtargetInfo & getSTI() const
Streaming machine code generation interface.
virtual bool OmitRegisterFromClobberLists(unsigned RegNo)
Allows targets to let registers opt out of clobber lists.
uint64_t AvailableFeatures
AvailableFeatures - The current set of available features.
void setSemaCallback(MCAsmParserSemaCallback *Callback)
virtual unsigned checkTargetMatchPredicate(MCInst &Inst)
checkTargetMatchPredicate - Validate the instruction match against any complex target predicates not ...
void setParsingInlineAsm(bool Value)
Generic Sema callback for assembly parser.
virtual bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name, AsmToken Token, OperandVector &Operands)
virtual bool equalIsAsmAssignment()
virtual const MCExpr * createTargetUnaryExpr(const MCExpr *E, AsmToken::TokenKind OperatorToken, MCContext &Ctx)
Base class for user error types.
void setAvailableFeatures(uint64_t Value)
virtual bool ParseInstruction(ParseInstructionInfo &Info, StringRef Name, SMLoc NameLoc, OperandVector &Operands)=0
ParseInstruction - Parse one assembly instruction.
AsmRewrite(AsmRewriteKind kind, SMLoc loc, unsigned len=0, unsigned val=0)
bool ParsingInlineAsm
ParsingInlineAsm - Are we parsing ms-style inline assembly?
virtual bool ParseDirective(AsmToken DirectiveID)=0
ParseDirective - Parse a target specific assembler directive.
MCSubtargetInfo - Generic base class for all target subtargets.
virtual const MCExpr * applyModifierToExpr(const MCExpr *E, MCSymbolRefExpr::VariantKind, MCContext &Ctx)
MCTargetOptions getTargetOptions() const
SmallVectorImpl< std::unique_ptr< MCParsedAsmOperand > > OperandVector
MCSubtargetInfo & copySTI()
Create a copy of STI and return a non-const reference to it.
virtual void flushPendingInstructions(MCStreamer &Out)
Ensure that all previously parsed instructions have been emitted to the output streamer, if the target does not emit them immediately.
Generic interface for extending the MCAsmParser, which is implemented by target and object file assem...
const char AsmRewritePrecedence[]
LLVM Value Representation.
~MCTargetAsmParser() override
StringRef - Represent a constant reference to a string, i.e.
Represents a location in source code.
virtual bool MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, OperandVector &Operands, MCStreamer &Out, uint64_t &ErrorInfo, bool MatchingInlineAsm)=0
MatchAndEmitInstruction - Recognize a series of operands of a parsed instruction as an actual MCInst ...
bool isParsingInlineAsm()