forked from OSchip/llvm-project
Rather then have a wrapper function, have tblgen instantiate the implementation.
Also remove an unused argument. llvm-svn: 164567
This commit is contained in:
parent
61740f6649
commit
c4734c8950
|
@ -115,7 +115,7 @@ public:
|
|||
return Match_Success;
|
||||
}
|
||||
|
||||
virtual unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
|
||||
virtual unsigned getMCInstOperandNum(unsigned Kind,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
unsigned OperandNum,
|
||||
unsigned &NumMCOperands) = 0;
|
||||
|
|
|
@ -262,12 +262,6 @@ public:
|
|||
bool MatchAndEmitInstruction(SMLoc IDLoc,
|
||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
MCStreamer &Out);
|
||||
|
||||
unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
unsigned OperandNum, unsigned &NumMCOperands) {
|
||||
return getMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum, NumMCOperands);
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
|
|
|
@ -56,13 +56,6 @@ class MBlazeAsmParser : public MCTargetAsmParser {
|
|||
|
||||
/// }
|
||||
|
||||
unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
unsigned OperandNum, unsigned &NumMCOperands) {
|
||||
return getMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum,
|
||||
NumMCOperands);
|
||||
}
|
||||
|
||||
public:
|
||||
MBlazeAsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser)
|
||||
: MCTargetAsmParser(), Parser(_Parser) {}
|
||||
|
|
|
@ -58,11 +58,6 @@ class MipsAsmParser : public MCTargetAsmParser {
|
|||
MipsAsmParser::OperandMatchResultTy
|
||||
parseMemOperand(SmallVectorImpl<MCParsedAsmOperand*>&);
|
||||
|
||||
unsigned
|
||||
getMCInstOperandNum(unsigned Kind, MCInst &Inst,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
unsigned OperandNum, unsigned &NumMCOperands);
|
||||
|
||||
bool ParseOperand(SmallVectorImpl<MCParsedAsmOperand*> &,
|
||||
StringRef Mnemonic);
|
||||
|
||||
|
@ -261,18 +256,6 @@ public:
|
|||
};
|
||||
}
|
||||
|
||||
unsigned MipsAsmParser::
|
||||
getMCInstOperandNum(unsigned Kind, MCInst &Inst,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
unsigned OperandNum, unsigned &NumMCOperands) {
|
||||
assert (0 && "getMCInstOperandNum() not supported by the Mips target.");
|
||||
// The Mips backend doesn't currently include the matcher implementation, so
|
||||
// the getMCInstOperandNumImpl() is undefined. This is a temporary
|
||||
// work around.
|
||||
NumMCOperands = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool MipsAsmParser::
|
||||
MatchAndEmitInstruction(SMLoc IDLoc,
|
||||
SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
|
|
|
@ -73,13 +73,6 @@ private:
|
|||
unsigned &OrigErrorInfo,
|
||||
bool matchingInlineAsm = false);
|
||||
|
||||
unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
|
||||
const SmallVectorImpl<MCParsedAsmOperand*> &Operands,
|
||||
unsigned OperandNum, unsigned &NumMCOperands) {
|
||||
return getMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum,
|
||||
NumMCOperands);
|
||||
}
|
||||
|
||||
/// isSrcOp - Returns true if operand is either (%rsi) or %ds:%(rsi)
|
||||
/// in 64bit mode or (%esi) or %es:(%esi) in 32bit mode.
|
||||
bool isSrcOp(X86Operand &Op);
|
||||
|
|
|
@ -1714,9 +1714,9 @@ static void emitConvertToMCInst(CodeGenTarget &Target, StringRef ClassName,
|
|||
raw_string_ostream OpOS(OperandFnBody);
|
||||
// Start the operand number lookup function.
|
||||
OpOS << "unsigned " << Target.getName() << ClassName << "::\n"
|
||||
<< "getMCInstOperandNumImpl(unsigned Kind, MCInst &Inst,\n"
|
||||
<< " const SmallVectorImpl<MCParsedAsmOperand*> "
|
||||
<< "&Operands,\n unsigned OperandNum, unsigned "
|
||||
<< "getMCInstOperandNum(unsigned Kind,\n"
|
||||
<< " const SmallVectorImpl<MCParsedAsmOperand*> "
|
||||
<< "&Operands,\n unsigned OperandNum, unsigned "
|
||||
<< "&NumMCOperands) {\n"
|
||||
<< " assert(Kind < CVT_NUM_SIGNATURES && \"Invalid signature!\");\n"
|
||||
<< " NumMCOperands = 0;\n"
|
||||
|
@ -2617,10 +2617,10 @@ void AsmMatcherEmitter::run(raw_ostream &OS) {
|
|||
<< "unsigned Opcode,\n"
|
||||
<< " const SmallVectorImpl<MCParsedAsmOperand*> "
|
||||
<< "&Operands);\n";
|
||||
OS << " unsigned getMCInstOperandNumImpl(unsigned Kind, MCInst &Inst,\n"
|
||||
<< " const "
|
||||
OS << " unsigned getMCInstOperandNum(unsigned Kind,\n"
|
||||
<< " const "
|
||||
<< "SmallVectorImpl<MCParsedAsmOperand*> &Operands,\n "
|
||||
<< " unsigned OperandNum, unsigned &NumMCOperands);\n";
|
||||
<< " unsigned OperandNum, unsigned &NumMCOperands);\n";
|
||||
OS << " bool mnemonicIsValid(StringRef Mnemonic);\n";
|
||||
OS << " unsigned MatchInstructionImpl(\n"
|
||||
<< " const SmallVectorImpl<MCParsedAsmOperand*> &Operands,\n"
|
||||
|
|
Loading…
Reference in New Issue