mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Start using the CodeGeneratorWrappers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "InstrInfoEmitter.h"
|
||||
#include "CodeGenWrappers.h"
|
||||
#include "Record.h"
|
||||
|
||||
// runEnums - Print out enum values for all of the instructions.
|
||||
@@ -23,9 +24,10 @@ void InstrInfoEmitter::runEnums(std::ostream &OS) {
|
||||
OS << "namespace " << Namespace << " {\n";
|
||||
OS << " enum {\n";
|
||||
|
||||
CodeGenTarget Target;
|
||||
|
||||
// We must emit the PHI opcode first...
|
||||
Record *Target = getTarget(Records);
|
||||
Record *InstrInfo = Target->getValueAsDef("InstructionSet");
|
||||
Record *InstrInfo = Target.getInstructionSet();
|
||||
Record *PHI = InstrInfo->getValueAsDef("PHIInst");
|
||||
|
||||
OS << " " << PHI->getName() << ", \t// 0 (fixed for all targets)\n";
|
||||
@@ -55,9 +57,9 @@ void InstrInfoEmitter::printDefList(ListInit *LI, const std::string &Name,
|
||||
// run - Emit the main instruction description records for the target...
|
||||
void InstrInfoEmitter::run(std::ostream &OS) {
|
||||
EmitSourceFileHeader("Target Instruction Descriptors", OS);
|
||||
Record *Target = getTarget(Records);
|
||||
const std::string &TargetName = Target->getName();
|
||||
Record *InstrInfo = Target->getValueAsDef("InstructionSet");
|
||||
CodeGenTarget Target;
|
||||
const std::string &TargetName = Target.getName();
|
||||
Record *InstrInfo = Target.getInstructionSet();
|
||||
Record *PHI = InstrInfo->getValueAsDef("PHIInst");
|
||||
|
||||
std::vector<Record*> Instructions =
|
||||
|
Reference in New Issue
Block a user