if (dt == MODRM_ONEENTRY && decision.instructionIDs[0] == 0) {
// Empty table.
- o2 << "{ " << stringForDecisionType(dt) << ", 0 }";
+ o2 << "{" << stringForDecisionType(dt) << ", 0}";
return;
}
EntryNumber = ModRMTableNum;
ModRMTableNum += ModRMDecision.size();
- o1 << "/* Table" << EntryNumber << " */\n";
+ o1 << "/*Table" << EntryNumber << "*/\n";
i1++;
for (std::vector<unsigned>::const_iterator I = ModRMDecision.begin(),
E = ModRMDecision.end(); I != E; ++I) {
- o1.indent(i1 * 2) << format("0x%hx", *I) << ", /* "
- << InstructionSpecifiers[*I].name << " */\n";
+ o1.indent(i1 * 2) << format("0x%hx", *I) << ", /*"
+ << InstructionSpecifiers[*I].name << "*/\n";
}
i1--;
}
- o2 << "{ " << stringForDecisionType(dt) << ", " << EntryNumber << " /* Table"
- << EntryNumber << " */ }";
+ o2 << "{" << stringForDecisionType(dt) << ", " << EntryNumber << "}";
switch (dt) {
default:
o2 << "},\n";
} else {
o2 << " /* struct OpcodeDecision */ {\n";
- ++i2;
for (index = 0; index < 256; ++index) {
o2.indent(i2);
- o2 << "/* 0x" << format("%02hhx", index) << " */ ";
+ o2 << "/*0x" << format("%02hhx", index) << "*/";
emitModRMDecision(o1, o2, i1, i2, ModRMTableNum,
opDecision.modRMDecisions[index]);
o2 << "\n";
}
- --i2;
o2.indent(i2) << "}\n";
--i2;
o2.indent(i2) << "},\n";
unsigned &ModRMTableNum,
ContextDecision &decision,
const char* name) const {
- o2.indent(i2) << "static const struct ContextDecision " << name << " = {\n";
- i2++;
- o2.indent(i2) << "{ /* opcodeDecisions */" << "\n";
+ o2.indent(i2) << "static const struct ContextDecision " << name << " = {{/* opcodeDecisions */\n";
i2++;
for (unsigned index = 0; index < IC_max; ++index) {
- o2.indent(i2) << "/* ";
+ o2.indent(i2) << "/*";
o2 << stringForContext((InstructionContext)index);
- o2 << " */ ";
+ o2 << "*/ ";
emitOpcodeDecision(o1, o2, i1, i2, ModRMTableNum,
decision.opcodeDecisions[index]);
}
i2--;
- o2.indent(i2) << "}" << "\n";
- i2--;
- o2.indent(i2) << "};" << "\n";
+ o2.indent(i2) << "}};" << "\n";
}
void DisassemblerTables::emitInstructionInfo(raw_ostream &o,
else
o << "IC";
- o << ", /* " << index << " */";
-
- o << "\n";
+ o << ", // " << index << "\n";
}
i--;
std::vector<unsigned> EmptyTable(1, 0);
ModRMTable[EmptyTable] = ModRMTableNum;
ModRMTableNum += EmptyTable.size();
- o1 << "/* EmptyTable */\n";
+ o1 << "/*EmptyTable*/\n";
o1.indent(i1 * 2) << "0x0,\n";
i1--;
emitContextDecisions(o1, o2, i1, i2, ModRMTableNum);