summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeEmitterGen.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-09-17 06:29:52 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-09-17 06:29:52 +0000
commitbc95b23156058ab3820d03c56709308e604a981b (patch)
tree794897c29d05b673e1e125b9a8e4645b116a56b7 /utils/TableGen/CodeEmitterGen.cpp
parent682d5a88341ebcb1ba4edad7f8df069e33e78b01 (diff)
downloadllvm-bc95b23156058ab3820d03c56709308e604a981b.tar.gz
llvm-bc95b23156058ab3820d03c56709308e604a981b.tar.bz2
llvm-bc95b23156058ab3820d03c56709308e604a981b.tar.xz
Add instruction names as comments to InstBits entries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56275 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r--utils/TableGen/CodeEmitterGen.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp
index e2278ad62c..62df686ea2 100644
--- a/utils/TableGen/CodeEmitterGen.cpp
+++ b/utils/TableGen/CodeEmitterGen.cpp
@@ -100,8 +100,6 @@ void CodeEmitterGen::run(std::ostream &o) {
const CodeGenInstruction *CGI = *IN;
Record *R = CGI->TheDef;
- if (IN != NumberedInstructions.begin()) o << ",\n";
-
if (R->getName() == "PHI" ||
R->getName() == "INLINEASM" ||
R->getName() == "DBG_LABEL" ||
@@ -112,7 +110,7 @@ void CodeEmitterGen::run(std::ostream &o) {
R->getName() == "INSERT_SUBREG" ||
R->getName() == "IMPLICIT_DEF" ||
R->getName() == "SUBREG_TO_REG") {
- o << " 0U";
+ o << " 0U,\n";
continue;
}
@@ -125,9 +123,9 @@ void CodeEmitterGen::run(std::ostream &o) {
Value |= B->getValue() << (e-i-1);
}
}
- o << " " << Value << "U";
+ o << " " << Value << "U," << '\t' << "// " << R->getName() << "\n";
}
- o << "\n };\n";
+ o << " 0U\n };\n";
// Map to accumulate all the cases.
std::map<std::string, std::vector<std::string> > CaseMap;