diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-09-03 02:06:46 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-09-03 02:06:46 +0000 |
commit | 3a86e1396230748f17a521915bc802939a787eac (patch) | |
tree | 9cef06bba2fc5e5a64a5816a7cdc2b0496667e51 /utils | |
parent | 61290e3845a9cae85f26468e4367a598c0f3f6c1 (diff) | |
download | llvm-3a86e1396230748f17a521915bc802939a787eac.tar.gz llvm-3a86e1396230748f17a521915bc802939a787eac.tar.bz2 llvm-3a86e1396230748f17a521915bc802939a787eac.tar.xz |
[ms-inline asm] Expose the Kind and Opcode variables from the
MatchInstructionImpl() function.
These values are used by the ConvertToMCInst() function to index into the
ConversionTable. The values are also needed to call the GetMCInstOperandNum()
function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163101 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/AsmMatcherEmitter.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/utils/TableGen/AsmMatcherEmitter.cpp b/utils/TableGen/AsmMatcherEmitter.cpp index 3fff1527d3..32c0f2e4d4 100644 --- a/utils/TableGen/AsmMatcherEmitter.cpp +++ b/utils/TableGen/AsmMatcherEmitter.cpp @@ -2585,9 +2585,10 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { << "&Operands,\n unsigned OperandNum, unsigned " << "&MCOperandNum);\n"; OS << " bool MnemonicIsValid(StringRef Mnemonic);\n"; - OS << " unsigned MatchInstructionImpl(\n"; - OS << " const SmallVectorImpl<MCParsedAsmOperand*> &Operands,\n"; - OS << " MCInst &Inst, unsigned &ErrorInfo, unsigned VariantID = 0);\n"; + OS << " unsigned MatchInstructionImpl(\n" + << " const SmallVectorImpl<MCParsedAsmOperand*> &Operands,\n" + << " unsigned &Kind, unsigned &Opcode, MCInst &Inst, " + << "unsigned &ErrorInfo,\n unsigned VariantID = 0);\n"; if (Info.OperandMatchInfo.size()) { OS << "\n enum OperandMatchResultTy {\n"; @@ -2767,8 +2768,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { << Target.getName() << ClassName << "::\n" << "MatchInstructionImpl(const SmallVectorImpl<MCParsedAsmOperand*>" << " &Operands,\n"; - OS << " MCInst &Inst, unsigned &ErrorInfo, "; - OS << "unsigned VariantID) {\n"; + OS << " unsigned &Kind, unsigned &Opcode, MCInst &Inst,"; + OS << "\n unsigned &ErrorInfo, unsigned VariantID) {\n"; OS << " // Eliminate obvious mismatches.\n"; OS << " if (Operands.size() > " << (MaxNumOperands+1) << ") {\n"; @@ -2885,6 +2886,8 @@ void AsmMatcherEmitter::run(raw_ostream &OS) { if (!InsnCleanupFn.empty()) OS << " " << InsnCleanupFn << "(Inst);\n"; + OS << " Kind = it->ConvertFn;\n"; + OS << " Opcode = it->Opcode;\n"; OS << " return Match_Success;\n"; OS << " }\n\n"; |