X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FMC%2FMCTargetAsmParser.h;h=c9ea5ae48464d95b7d26230b704d30dedb4f72d3;hb=b1f8c139c5c1b1a50bf65b8141dd57434c793e54;hp=709c2d245cc3dea7074cde84c7a1834ad431a455;hpb=5d637d7e93c1f6058c16b41b8ac7dd36c61b4a5c;p=oota-llvm.git diff --git a/include/llvm/MC/MCTargetAsmParser.h b/include/llvm/MC/MCTargetAsmParser.h index 709c2d245cc..c9ea5ae4846 100644 --- a/include/llvm/MC/MCTargetAsmParser.h +++ b/include/llvm/MC/MCTargetAsmParser.h @@ -78,21 +78,9 @@ public: /// \param DirectiveID - the identifier token of the directive. virtual bool ParseDirective(AsmToken DirectiveID) = 0; - /// MatchInstruction - Recognize a series of operands of a parsed instruction - /// as an actual MCInst. 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. - virtual bool - MatchInstruction(SMLoc IDLoc, unsigned &Kind, - SmallVectorImpl &Operands, - SmallVectorImpl &MCInsts, - unsigned &OrigErrorInfo, - bool matchingInlineAsm = false) { - OrigErrorInfo = ~0x0; - return true; - } + /// mnemonicIsValid - This returns true if this is a valid mnemonic and false + /// otherwise. + virtual bool mnemonicIsValid(StringRef Mnemonic) = 0; /// MatchAndEmitInstruction - Recognize a series of operands of a parsed /// instruction as an actual MCInst and emit it to the specified MCStreamer. @@ -101,9 +89,10 @@ public: /// On failure, the target parser is responsible for emitting a diagnostic /// explaining the match failure. virtual bool - MatchAndEmitInstruction(SMLoc IDLoc, + MatchAndEmitInstruction(SMLoc IDLoc, unsigned &Opcode, SmallVectorImpl &Operands, - MCStreamer &Out) = 0; + MCStreamer &Out, unsigned &ErrorInfo, + bool MatchingInlineAsm) = 0; /// checkTargetMatchPredicate - Validate the instruction match against /// any complex target predicates not expressible via match classes. @@ -111,10 +100,8 @@ public: return Match_Success; } - virtual unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst, - const SmallVectorImpl &Operands, - unsigned OperandNum, - unsigned &NumMCOperands) = 0; + virtual void convertToMapAndConstraints(unsigned Kind, + const SmallVectorImpl &Operands) = 0; }; } // End llvm namespace