mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-01 04:29:57 +00:00
Deleted commented-out code as we now get namespace directly, add comments
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15627 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b64af918cb
commit
ad346ad170
@ -24,15 +24,16 @@ void CodeEmitterGen::run(std::ostream &o) {
|
|||||||
std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction");
|
std::vector<Record*> Insts = Records.getAllDerivedDefinitions("Instruction");
|
||||||
|
|
||||||
EmitSourceFileHeader("Machine Code Emitter", o);
|
EmitSourceFileHeader("Machine Code Emitter", o);
|
||||||
|
|
||||||
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
|
std::string Namespace = Insts[0]->getValueAsString("Namespace") + "::";
|
||||||
|
|
||||||
//const std::string &Namespace = Inst->getValue("Namespace")->getName();
|
// Emit function declaration
|
||||||
o << "unsigned " << Target.getName() << "CodeEmitter::"
|
o << "unsigned " << Target.getName() << "CodeEmitter::"
|
||||||
<< "getBinaryCodeForInstr(MachineInstr &MI) {\n"
|
<< "getBinaryCodeForInstr(MachineInstr &MI) {\n"
|
||||||
<< " unsigned Value = 0;\n"
|
<< " unsigned Value = 0;\n"
|
||||||
<< " DEBUG(std::cerr << MI);\n"
|
<< " DEBUG(std::cerr << MI);\n"
|
||||||
<< " switch (MI.getOpcode()) {\n";
|
<< " switch (MI.getOpcode()) {\n";
|
||||||
|
|
||||||
|
// Emit a case statement for each opcode
|
||||||
for (std::vector<Record*>::iterator I = Insts.begin(), E = Insts.end();
|
for (std::vector<Record*>::iterator I = Insts.begin(), E = Insts.end();
|
||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
Record *R = *I;
|
Record *R = *I;
|
||||||
|
Loading…
Reference in New Issue
Block a user