mirror of
https://github.com/jeremysrand/llvm-65816.git
synced 2024-06-07 19:29:33 +00:00
Get rid of the .size stuff in the assembly output and format the instructions better.
This commit is contained in:
parent
48276b8f1f
commit
30e52d00c8
|
@ -27,6 +27,9 @@ WDC65816MCAsmInfo::WDC65816MCAsmInfo(StringRef TT) {
|
|||
// Disable the ".file <filename>" parameter
|
||||
HasSingleParameterDotFile = false;
|
||||
|
||||
// Diable the ".size" parameter
|
||||
HasDotTypeDotSizeDirective = false;
|
||||
|
||||
#if 0 // WDC_TODO - Do I need any of this?
|
||||
Data16bitsDirective = "\t.half\t";
|
||||
Data32bitsDirective = "\t.word\t";
|
||||
|
|
|
@ -71,3 +71,12 @@ void WDC65816TargetAsmStreamer::EmitSegEndDirective(void)
|
|||
OS << "end";
|
||||
OS << '\n';
|
||||
}
|
||||
|
||||
|
||||
void WDC65816TargetAsmStreamer::EmitInstruction(StringRef instruction)
|
||||
{
|
||||
instruction = instruction.ltrim();
|
||||
OS << indent;
|
||||
OS << instruction;
|
||||
OS << '\n';
|
||||
}
|
||||
|
|
|
@ -24,6 +24,8 @@ namespace llvm {
|
|||
virtual void EmitKeepDirective(StringRef filename) = 0;
|
||||
virtual void EmitSegStartDirective(StringRef filename) = 0;
|
||||
virtual void EmitSegEndDirective(void) = 0;
|
||||
|
||||
virtual void EmitInstruction(StringRef instruction) = 0;
|
||||
};
|
||||
|
||||
class WDC65816TargetAsmStreamer : public WDC65816TargetStreamer {
|
||||
|
@ -40,6 +42,8 @@ namespace llvm {
|
|||
virtual void EmitKeepDirective(StringRef filename);
|
||||
virtual void EmitSegStartDirective(StringRef filename);
|
||||
virtual void EmitSegEndDirective(void);
|
||||
|
||||
virtual void EmitInstruction(StringRef instruction);
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -61,9 +61,8 @@ namespace {
|
|||
raw_svector_ostream OS(Str);
|
||||
printInstruction(MI, OS);
|
||||
|
||||
StringRef instrString = OS.str().ltrim();
|
||||
|
||||
OutStreamer.EmitRawText(" " + instrString);
|
||||
WDC65816TargetStreamer &streamer = getTargetStreamer();
|
||||
streamer.EmitInstruction(OS.str());
|
||||
}
|
||||
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue
Block a user