summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeEmitterGen.cpp
diff options
context:
space:
mode:
authorMisha Brukman <brukman+llvm@gmail.com>2004-08-04 22:07:54 +0000
committerMisha Brukman <brukman+llvm@gmail.com>2004-08-04 22:07:54 +0000
commit4e4f8631f68862cfd725de66422bb867bda0efdf (patch)
tree2b0849b86888f5af07052e65c663b583538c20f8 /utils/TableGen/CodeEmitterGen.cpp
parent33066e97a00fb2e8924c54890ae587fec2bb7d8a (diff)
downloadllvm-4e4f8631f68862cfd725de66422bb867bda0efdf.tar.gz
llvm-4e4f8631f68862cfd725de66422bb867bda0efdf.tar.bz2
llvm-4e4f8631f68862cfd725de66422bb867bda0efdf.tar.xz
* Added documentation in the file header
* Shorten assert() text to make it fit within 80 cols git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15508 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeEmitterGen.cpp')
-rw-r--r--utils/TableGen/CodeEmitterGen.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/utils/TableGen/CodeEmitterGen.cpp b/utils/TableGen/CodeEmitterGen.cpp
index 6cf18c2ded..29234ad21d 100644
--- a/utils/TableGen/CodeEmitterGen.cpp
+++ b/utils/TableGen/CodeEmitterGen.cpp
@@ -7,7 +7,9 @@
//
//===----------------------------------------------------------------------===//
//
-// FIXME: Document.
+// CodeEmitterGen uses the descriptions of instructions and their fields to
+// construct an automated code emitter: a function that, given a MachineInstr,
+// returns the (currently, 32-bit unsigned) value of the instruction.
//
//===----------------------------------------------------------------------===//
@@ -152,7 +154,7 @@ void CodeEmitterGen::run(std::ostream &o) {
<< " &= (1<<" << beginBitInVar+1 << ") - 1;\n";
// Shift the value to the correct place (according to place in inst)
- assert(endBitInInst >= 0 && "Negative shift amount in inst position!");
+ assert(endBitInInst >= 0 && "Negative shift amount!");
if (endBitInInst != 0)
o << " op" << OpOrder[Vals[i].getName()]
<< " <<= " << endBitInInst << ";\n";