mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
Make target asm info a property of the target machine.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30162 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -37,19 +37,8 @@ using namespace llvm;
|
||||
namespace {
|
||||
Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
|
||||
|
||||
struct VISIBILITY_HIDDEN SparcTargetAsmInfo : public TargetAsmInfo {
|
||||
SparcTargetAsmInfo() {
|
||||
Data16bitsDirective = "\t.half\t";
|
||||
Data32bitsDirective = "\t.word\t";
|
||||
Data64bitsDirective = 0; // .xword is only supported by V9.
|
||||
ZeroDirective = "\t.skip\t";
|
||||
CommentString = "!";
|
||||
ConstantPoolSection = "\t.section \".rodata\",#alloc\n";
|
||||
}
|
||||
};
|
||||
|
||||
struct VISIBILITY_HIDDEN SparcAsmPrinter : public AsmPrinter {
|
||||
SparcAsmPrinter(std::ostream &O, TargetMachine &TM, TargetAsmInfo *T)
|
||||
SparcAsmPrinter(std::ostream &O, TargetMachine &TM, const TargetAsmInfo *T)
|
||||
: AsmPrinter(O, TM, T) {
|
||||
}
|
||||
|
||||
@@ -85,8 +74,7 @@ namespace {
|
||||
///
|
||||
FunctionPass *llvm::createSparcCodePrinterPass(std::ostream &o,
|
||||
TargetMachine &tm) {
|
||||
SparcTargetAsmInfo *TAI = new SparcTargetAsmInfo();
|
||||
return new SparcAsmPrinter(o, tm, TAI);
|
||||
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo());
|
||||
}
|
||||
|
||||
/// runOnMachineFunction - This uses the printMachineInstruction()
|
||||
|
Reference in New Issue
Block a user