Add support for specifying a PostEncoderMethod, which can perform post-processing after the automated encoding of an instruction.
Not yet used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118759 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp
index e86c18f..e7b022a 100644
--- a/utils/TableGen/CodeEmitterGen.cpp
+++ b/utils/TableGen/CodeEmitterGen.cpp
@@ -230,6 +230,10 @@
}
}
+ if (R->getValue("PostEncoderMethod"))
+ Case += " Value = " +
+ R->getValueAsString("PostEncoderMethod") + "(MI, Value);\n";
+
std::vector<std::string> &InstList = CaseMap[Case];
InstList.push_back(InstName);
}