mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-14 17:34:41 +00:00
Tidy up a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124832 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
720b918eeb
commit
0ed92f2de3
@ -206,7 +206,6 @@ void CodeEmitterGen::run(raw_ostream &o) {
|
|||||||
if (Target.isLittleEndianEncoding()) reverseBits(Insts);
|
if (Target.isLittleEndianEncoding()) reverseBits(Insts);
|
||||||
|
|
||||||
EmitSourceFileHeader("Machine Code Emitter", o);
|
EmitSourceFileHeader("Machine Code Emitter", o);
|
||||||
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
|
|
||||||
|
|
||||||
const std::vector<const CodeGenInstruction*> &NumberedInstructions =
|
const std::vector<const CodeGenInstruction*> &NumberedInstructions =
|
||||||
Target.getInstructionsByEnumValue();
|
Target.getInstructionsByEnumValue();
|
||||||
@ -254,7 +253,8 @@ void CodeEmitterGen::run(raw_ostream &o) {
|
|||||||
Record *R = *IC;
|
Record *R = *IC;
|
||||||
if (R->getValueAsString("Namespace") == "TargetOpcode")
|
if (R->getValueAsString("Namespace") == "TargetOpcode")
|
||||||
continue;
|
continue;
|
||||||
const std::string &InstName = R->getName();
|
const std::string &InstName = R->getValueAsString("Namespace") + "::"
|
||||||
|
+ R->getName();
|
||||||
std::string Case = getInstructionCase(R, Target);
|
std::string Case = getInstructionCase(R, Target);
|
||||||
|
|
||||||
CaseMap[Case].push_back(InstName);
|
CaseMap[Case].push_back(InstName);
|
||||||
@ -275,7 +275,7 @@ void CodeEmitterGen::run(raw_ostream &o) {
|
|||||||
|
|
||||||
for (int i = 0, N = InstList.size(); i < N; i++) {
|
for (int i = 0, N = InstList.size(); i < N; i++) {
|
||||||
if (i) o << "\n";
|
if (i) o << "\n";
|
||||||
o << " case " << Namespace << InstList[i] << ":";
|
o << " case " << InstList[i] << ":";
|
||||||
}
|
}
|
||||||
o << " {\n";
|
o << " {\n";
|
||||||
o << Case;
|
o << Case;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user