llvm.org GIT mirror llvm / c4d2560
Removed unused argument. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163104 91177308-0d34-0410-b5e6-96231b3b80d8 Chad Rosier 7 years ago
5 changed file(s) with 21 addition(s) and 25 deletion(s). Raw diff Collapse all Expand all
8484 /// On failure, the target parser is responsible for emitting a diagnostic
8585 /// explaining the match failure.
8686 virtual bool
87 MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
87 MatchInstruction(SMLoc IDLoc, unsigned &Kind,
8888 SmallVectorImpl &Operands,
8989 SmallVectorImpl &MCInsts,
9090 unsigned &OrigErrorInfo,
74567456 MCStreamer &Out) {
74577457 MCInst Inst;
74587458 unsigned Kind;
7459 unsigned Opcode;
74607459 unsigned ErrorInfo;
74617460 unsigned MatchResult;
74627461
7463 MatchResult = MatchInstructionImpl(Operands, Kind, Opcode, Inst, ErrorInfo);
7462 MatchResult = MatchInstructionImpl(Operands, Kind, Inst, ErrorInfo);
74647463 switch (MatchResult) {
74657464 default: break;
74667465 case Match_Success:
317317 MCStreamer &Out) {
318318 MCInst Inst;
319319 unsigned Kind;
320 unsigned Opcode;
321320 unsigned ErrorInfo;
322321
323 switch (MatchInstructionImpl(Operands, Kind, Opcode, Inst, ErrorInfo)) {
322 switch (MatchInstructionImpl(Operands, Kind, Inst, ErrorInfo)) {
324323 default: break;
325324 case Match_Success:
326325 Out.EmitInstruction(Inst);
6666 SmallVectorImpl &Operands,
6767 MCStreamer &Out);
6868
69 bool MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
69 bool MatchInstruction(SMLoc IDLoc, unsigned &Kind,
7070 SmallVectorImpl &Operands,
7171 SmallVectorImpl &MCInsts,
7272 unsigned &OrigErrorInfo,
15161516 SmallVectorImpl &Operands,
15171517 MCStreamer &Out) {
15181518 unsigned Kind;
1519 unsigned Opcode;
15201519 unsigned ErrorInfo;
15211520 SmallVector Insts;
15221521
1523 bool Error = MatchInstruction(IDLoc, Kind, Opcode, Operands, Insts,
1522 bool Error = MatchInstruction(IDLoc, Kind, Operands, Insts,
15241523 ErrorInfo);
15251524 if (!Error)
15261525 for (unsigned i = 0, e = Insts.size(); i != e; ++i)
15291528 }
15301529
15311530 bool X86AsmParser::
1532 MatchInstruction(SMLoc IDLoc, unsigned &Kind, unsigned &Opcode,
1531 MatchInstruction(SMLoc IDLoc, unsigned &Kind,
15331532 SmallVectorImpl &Operands,
15341533 SmallVectorImpl &MCInsts, unsigned &OrigErrorInfo,
15351534 bool matchingInlineAsm) {
15711570 MCInst Inst;
15721571
15731572 // First, try a direct match.
1574 switch (MatchInstructionImpl(Operands, Kind, Opcode, Inst, OrigErrorInfo,
1573 switch (MatchInstructionImpl(Operands, Kind, Inst, OrigErrorInfo,
15751574 isParsingIntelSyntax())) {
15761575 default: break;
15771576 case Match_Success:
16191618 Tmp[Base.size()] = Suffixes[0];
16201619 unsigned ErrorInfoIgnore;
16211620 unsigned Match1, Match2, Match3, Match4;
1622 unsigned tKind, tOpcode;
1623
1624 Match1 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
1625 if (Match1 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
1621 unsigned tKind;
1622
1623 Match1 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
1624 if (Match1 == Match_Success) Kind = tKind;
16261625 Tmp[Base.size()] = Suffixes[1];
1627 Match2 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
1628 if (Match2 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
1626 Match2 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
1627 if (Match2 == Match_Success) Kind = tKind;
16291628 Tmp[Base.size()] = Suffixes[2];
1630 Match3 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
1631 if (Match3 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
1629 Match3 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
1630 if (Match3 == Match_Success) Kind = tKind;
16321631 Tmp[Base.size()] = Suffixes[3];
1633 Match4 = MatchInstructionImpl(Operands, tKind, tOpcode, Inst, ErrorInfoIgnore);
1634 if (Match4 == Match_Success) { Kind = tKind; Opcode = tOpcode; }
1632 Match4 = MatchInstructionImpl(Operands, tKind, Inst, ErrorInfoIgnore);
1633 if (Match4 == Match_Success) Kind = tKind;
16351634
16361635 // Restore the old token.
16371636 Op->setTokenValue(Base);
25862586 OS << " bool MnemonicIsValid(StringRef Mnemonic);\n";
25872587 OS << " unsigned MatchInstructionImpl(\n"
25882588 << " const SmallVectorImpl &Operands,\n"
2589 << " unsigned &Kind, unsigned &Opcode, MCInst &Inst, "
2590 << "unsigned &ErrorInfo,\n unsigned VariantID = 0);\n";
2589 << " unsigned &Kind, MCInst &Inst, "
2590 << "unsigned &ErrorInfo,\n unsigned VariantID = 0);\n";
25912591
25922592 if (Info.OperandMatchInfo.size()) {
25932593 OS << "\n enum OperandMatchResultTy {\n";
27672767 << Target.getName() << ClassName << "::\n"
27682768 << "MatchInstructionImpl(const SmallVectorImpl"
27692769 << " &Operands,\n";
2770 OS << " unsigned &Kind, unsigned &Opcode, MCInst &Inst,";
2771 OS << "\n unsigned &ErrorInfo, unsigned VariantID) {\n";
2770 OS << " unsigned &Kind, MCInst &Inst, unsigned ";
2771 OS << "&ErrorInfo,\n unsigned VariantID) {\n";
27722772
27732773 OS << " // Eliminate obvious mismatches.\n";
27742774 OS << " if (Operands.size() > " << (MaxNumOperands+1) << ") {\n";
28862886 OS << " " << InsnCleanupFn << "(Inst);\n";
28872887
28882888 OS << " Kind = it->ConvertFn;\n";
2889 OS << " Opcode = it->Opcode;\n";
28902889 OS << " return Match_Success;\n";
28912890 OS << " }\n\n";
28922891