diff options
Diffstat (limited to 'lib/MC/MCAsmStreamer.cpp')
-rw-r--r-- | lib/MC/MCAsmStreamer.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/MC/MCAsmStreamer.cpp b/lib/MC/MCAsmStreamer.cpp index b7f1982..9640fd9 100644 --- a/lib/MC/MCAsmStreamer.cpp +++ b/lib/MC/MCAsmStreamer.cpp @@ -44,6 +44,9 @@ namespace { virtual void EmitCommonSymbol(MCSymbol *Symbol, unsigned Size, unsigned Pow2Alignment, bool IsLocal); + virtual void EmitZerofill(MCSection *Section, MCSymbol *Symbol = NULL, + unsigned Size = 0, unsigned Pow2Alignment = 0); + virtual void EmitBytes(const char *Data, unsigned Length); virtual void EmitValue(const MCValue &Value, unsigned Size); @@ -157,6 +160,21 @@ void MCAsmStreamer::EmitCommonSymbol(MCSymbol *Symbol, unsigned Size, OS << '\n'; } +void MCAsmStreamer::EmitZerofill(MCSection *Section, MCSymbol *Symbol, + unsigned Size, unsigned Pow2Alignment) { + // Note: a .zerofill directive does not switch sections + // FIXME: Really we would like the segment and section names as well as the + // section type to be separate values instead of embedded in the name. Not + // all assemblers understand all this stuff though. + OS << ".zerofill " << Section->getName(); + if (Symbol != NULL) { + OS << ',' << Symbol->getName() << ',' << Size; + if (Pow2Alignment != 0) + OS << ',' << Pow2Alignment; + } + OS << '\n'; +} + void MCAsmStreamer::EmitBytes(const char *Data, unsigned Length) { assert(CurSection && "Cannot emit contents before setting section!"); for (unsigned i = 0; i != Length; ++i) |