aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen/AsmWriterEmitter.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-15 18:05:54 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-03-15 18:05:54 +0000
commitd66b9a222b38d7d29646c582b70a1c107ca615de (patch)
treee624b66ed1ca7beb42a6b6be5989f36de75e2e2a /utils/TableGen/AsmWriterEmitter.cpp
parent8a6bcc3722729803a16b5885de1ff85a3752e6a0 (diff)
downloadexternal_llvm-d66b9a222b38d7d29646c582b70a1c107ca615de.zip
external_llvm-d66b9a222b38d7d29646c582b70a1c107ca615de.tar.gz
external_llvm-d66b9a222b38d7d29646c582b70a1c107ca615de.tar.bz2
Revert r152105: "Use uint16_t to store indices into string table"
This patch limited the concatenated register names to 64K which meant that the total number of registers was many times less than 64K. If any compilers actually enforce the 64K limit on string literals, and it turns out to be a problem, we should fix that problem by not using long string literals. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@152816 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/AsmWriterEmitter.cpp')
-rw-r--r--utils/TableGen/AsmWriterEmitter.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp
index 7671efd..0ef5a93 100644
--- a/utils/TableGen/AsmWriterEmitter.cpp
+++ b/utils/TableGen/AsmWriterEmitter.cpp
@@ -464,7 +464,7 @@ static void
emitRegisterNameString(raw_ostream &O, StringRef AltName,
const std::vector<CodeGenRegister*> &Registers) {
StringToOffsetTable StringTable;
- O << " static const uint16_t RegAsmOffset" << AltName << "[] = {\n ";
+ O << " static const unsigned RegAsmOffset" << AltName << "[] = {\n ";
for (unsigned i = 0, e = Registers.size(); i != e; ++i) {
const CodeGenRegister &Reg = *Registers[i];
@@ -510,7 +510,7 @@ emitRegisterNameString(raw_ostream &O, StringRef AltName,
<< " };\n"
<< "\n";
- O << " const char *const AsmStrs" << AltName << " =\n";
+ O << " const char *AsmStrs" << AltName << " =\n";
StringTable.EmitString(O);
O << ";\n";
}
@@ -544,7 +544,7 @@ void AsmWriterEmitter::EmitGetRegisterName(raw_ostream &O) {
emitRegisterNameString(O, "", Registers);
if (hasAltNames) {
- O << " const uint16_t *RegAsmOffset;\n"
+ O << " const unsigned *RegAsmOffset;\n"
<< " const char *AsmStrs;\n"
<< " switch(AltIdx) {\n"
<< " default: llvm_unreachable(\"Invalid register alt name index!\");\n";
@@ -586,7 +586,7 @@ void AsmWriterEmitter::EmitGetInstructionName(raw_ostream &O) {
<< " assert(Opcode < " << NumberedInstructions.size()
<< " && \"Invalid instruction number!\");\n"
<< "\n"
- << " static const uint16_t InstAsmOffset[] = {";
+ << " static const unsigned InstAsmOffset[] = {";
for (unsigned i = 0, e = NumberedInstructions.size(); i != e; ++i) {
const CodeGenInstruction &Inst = *NumberedInstructions[i];
@@ -602,7 +602,7 @@ void AsmWriterEmitter::EmitGetInstructionName(raw_ostream &O) {
<< " };\n"
<< "\n";
- O << " const char *const Strs =\n";
+ O << " const char *Strs =\n";
StringTable.EmitString(O);
O << ";\n";