summaryrefslogtreecommitdiff
path: root/utils/TableGen/AsmWriterEmitter.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-15 18:05:57 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-15 18:05:57 +0000
commitbcfa982c4866fee5f86dca8c4bfc7425a9629f0d (patch)
tree4742e635a91d08f91f917b2355ada716e352689f /utils/TableGen/AsmWriterEmitter.cpp
parentd66b9a222b38d7d29646c582b70a1c107ca615de (diff)
downloadllvm-bcfa982c4866fee5f86dca8c4bfc7425a9629f0d.tar.gz
llvm-bcfa982c4866fee5f86dca8c4bfc7425a9629f0d.tar.bz2
llvm-bcfa982c4866fee5f86dca8c4bfc7425a9629f0d.tar.xz
Revert r152202: "Use uint16_t to store InstrNameIndices in MCInstrInfo."
We cannot limit the concatenated instruction names to 64K. ARM is already at 32K, and it is easy to imagine a target with more instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152817 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/AsmWriterEmitter.cpp')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index 0ef5a93d56..c4812dcae6 100644
--- a/utils/TableGen/AsmWriterEmitter.cpp
+++ b/utils/TableGen/AsmWriterEmitter.cpp
@@ -306,7 +306,6 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
}
// Bias offset by one since we want 0 as a sentinel.
- assert((Idx+1) <= 0xffff && "String offset too large to fit in table");
OpcodeInfo.push_back(Idx+1);
}
@@ -374,7 +373,7 @@ void AsmWriterEmitter::EmitPrintInstruction(raw_ostream &O) {
O << " };\n\n";
// Emit the string itself.
- O << " const char *const AsmStrs = \n";
+ O << " const char *AsmStrs = \n";
StringTable.EmitString(O);
O << ";\n\n";
@@ -497,9 +496,7 @@ emitRegisterNameString(raw_ostream &O, StringRef AltName,
}
}
- unsigned Idx = StringTable.GetOrAddStringOffset(AsmName);
- assert(Idx <= 0xffff && "String offset too large to fit in table");
- O << Idx;
+ O << StringTable.GetOrAddStringOffset(AsmName);
if (((i + 1) % 14) == 0)
O << ",\n ";
else
@@ -594,9 +591,7 @@ void AsmWriterEmitter::EmitGetInstructionName(raw_ostream &O) {
if ((i % 14) == 0)
O << "\n ";
- unsigned Idx = StringTable.GetOrAddStringOffset(AsmName);
- assert(Idx <= 0xffff && "String offset too large to fit in table");
- O << Idx << ", ";
+ O << StringTable.GetOrAddStringOffset(AsmName) << ", ";
}
O << "0\n"
<< " };\n"