llvm.org GIT mirror llvm / 2590c2e
Rather then have a wrapper function, have tblgen instantiate the implementation. Also remove an unused argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164567 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 7 years ago
6 changed file(s) with 7 addition(s) and 44 deletion(s). Raw diff Collapse all Expand all
114114 return Match_Success;
115115 }
116116
117 virtual unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
117 virtual unsigned getMCInstOperandNum(unsigned Kind,
118118 const SmallVectorImpl &Operands,
119119 unsigned OperandNum,
120120 unsigned &NumMCOperands) = 0;
261261 bool MatchAndEmitInstruction(SMLoc IDLoc,
262262 SmallVectorImpl &Operands,
263263 MCStreamer &Out);
264
265 unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
266 const SmallVectorImpl &Operands,
267 unsigned OperandNum, unsigned &NumMCOperands) {
268 return getMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum, NumMCOperands);
269 }
270264 };
271265 } // end anonymous namespace
272266
5454 #include "MBlazeGenAsmMatcher.inc"
5555
5656 /// }
57
58 unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
59 const SmallVectorImpl &Operands,
60 unsigned OperandNum, unsigned &NumMCOperands) {
61 return getMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum,
62 NumMCOperands);
63 }
6457
6558 public:
6659 MBlazeAsmParser(MCSubtargetInfo &_STI, MCAsmParser &_Parser)
5757 MipsAsmParser::OperandMatchResultTy
5858 parseMemOperand(SmallVectorImpl&);
5959
60 unsigned
61 getMCInstOperandNum(unsigned Kind, MCInst &Inst,
62 const SmallVectorImpl &Operands,
63 unsigned OperandNum, unsigned &NumMCOperands);
64
6560 bool ParseOperand(SmallVectorImpl &,
6661 StringRef Mnemonic);
6762
258253 llvm_unreachable("unimplemented!");
259254 }
260255 };
261 }
262
263 unsigned MipsAsmParser::
264 getMCInstOperandNum(unsigned Kind, MCInst &Inst,
265 const SmallVectorImpl &Operands,
266 unsigned OperandNum, unsigned &NumMCOperands) {
267 assert (0 && "getMCInstOperandNum() not supported by the Mips target.");
268 // The Mips backend doesn't currently include the matcher implementation, so
269 // the getMCInstOperandNumImpl() is undefined. This is a temporary
270 // work around.
271 NumMCOperands = 0;
272 return 0;
273256 }
274257
275258 bool MipsAsmParser::
7171 SmallVectorImpl &MCInsts,
7272 unsigned &OrigErrorInfo,
7373 bool matchingInlineAsm = false);
74
75 unsigned getMCInstOperandNum(unsigned Kind, MCInst &Inst,
76 const SmallVectorImpl &Operands,
77 unsigned OperandNum, unsigned &NumMCOperands) {
78 return getMCInstOperandNumImpl(Kind, Inst, Operands, OperandNum,
79 NumMCOperands);
80 }
8174
8275 /// isSrcOp - Returns true if operand is either (%rsi) or %ds:%(rsi)
8376 /// in 64bit mode or (%esi) or %es:(%esi) in 32bit mode.
17131713 raw_string_ostream OpOS(OperandFnBody);
17141714 // Start the operand number lookup function.
17151715 OpOS << "unsigned " << Target.getName() << ClassName << "::\n"
1716 << "getMCInstOperandNumImpl(unsigned Kind, MCInst &Inst,\n"
1717 << " const SmallVectorImpl "
1718 << "&Operands,\n unsigned OperandNum, unsigned "
1716 << "getMCInstOperandNum(unsigned Kind,\n"
1717 << " const SmallVectorImpl "
1718 << "&Operands,\n unsigned OperandNum, unsigned "
17191719 << "&NumMCOperands) {\n"
17201720 << " assert(Kind < CVT_NUM_SIGNATURES && \"Invalid signature!\");\n"
17211721 << " NumMCOperands = 0;\n"
26162616 << "unsigned Opcode,\n"
26172617 << " const SmallVectorImpl "
26182618 << "&Operands);\n";
2619 OS << " unsigned getMCInstOperandNumImpl(unsigned Kind, MCInst &Inst,\n"
2620 << " const "
2619 OS << " unsigned getMCInstOperandNum(unsigned Kind,\n"
2620 << " const "
26212621 << "SmallVectorImpl &Operands,\n "
2622 << " unsigned OperandNum, unsigned &NumMCOperands);\n";
2622 << " unsigned OperandNum, unsigned &NumMCOperands);\n";
26232623 OS << " bool mnemonicIsValid(StringRef Mnemonic);\n";
26242624 OS << " unsigned MatchInstructionImpl(\n"
26252625 << " const SmallVectorImpl &Operands,\n"