assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
assert(CurSection && "Cannot emit before setting section!");
assert(Symbol->isUndefined() && "Cannot define a symbol twice!");
assert(CurSection && "Cannot emit before setting section!");
- OS << *Symbol << ":\n";
+ OS << *Symbol << ":";
+ EmitEOL();
Symbol->setSection(*CurSection);
}
Symbol->setSection(*CurSection);
}
default: assert(0 && "Invalid flag!");
case SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
}
default: assert(0 && "Invalid flag!");
case SubsectionsViaSymbols: OS << ".subsections_via_symbols"; break;
}
}
void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
}
void MCAsmStreamer::EmitAssignment(MCSymbol *Symbol, const MCExpr *Value) {
assert((Symbol->isUndefined() || Symbol->isAbsolute()) &&
"Cannot define a symbol twice!");
assert((Symbol->isUndefined() || Symbol->isAbsolute()) &&
"Cannot define a symbol twice!");
- OS << *Symbol << " = " << *Value << '\n';
+ OS << *Symbol << " = " << *Value;
+ EmitEOL();
// FIXME: Lift context changes into super class.
// FIXME: Set associated section.
// FIXME: Lift context changes into super class.
// FIXME: Set associated section.
case WeakReference: OS << ".weak_reference "; break;
}
case WeakReference: OS << ".weak_reference "; break;
}
+ OS << *Symbol;
+ EmitEOL();
}
void MCAsmStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {
}
void MCAsmStreamer::EmitSymbolDesc(MCSymbol *Symbol, unsigned DescValue) {
- OS << ".desc" << ' ' << *Symbol << ',' << DescValue << '\n';
+ OS << ".desc" << ' ' << *Symbol << ',' << DescValue;
+ EmitEOL();
}
void MCAsmStreamer::EmitCommonSymbol(MCSymbol *Symbol, unsigned Size,
}
void MCAsmStreamer::EmitCommonSymbol(MCSymbol *Symbol, unsigned Size,
else
OS << ',' << Log2_32(ByteAlignment);
}
else
OS << ',' << Log2_32(ByteAlignment);
}
}
void MCAsmStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
}
void MCAsmStreamer::EmitZerofill(const MCSection *Section, MCSymbol *Symbol,
if (ByteAlignment != 0)
OS << ',' << Log2_32(ByteAlignment);
}
if (ByteAlignment != 0)
OS << ',' << Log2_32(ByteAlignment);
}
}
void MCAsmStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) {
assert(CurSection && "Cannot emit contents before setting section!");
const char *Directive = MAI.getData8bitsDirective(AddrSpace);
}
void MCAsmStreamer::EmitBytes(StringRef Data, unsigned AddrSpace) {
assert(CurSection && "Cannot emit contents before setting section!");
const char *Directive = MAI.getData8bitsDirective(AddrSpace);
- for (unsigned i = 0, e = Data.size(); i != e; ++i)
- OS << Directive << (unsigned)(unsigned char)Data[i] << '\n';
+ for (unsigned i = 0, e = Data.size(); i != e; ++i) {
+ OS << Directive << (unsigned)(unsigned char)Data[i];
+ EmitEOL();
+ }
}
/// EmitIntValue - Special case of EmitValue that avoids the client having
}
/// EmitIntValue - Special case of EmitValue that avoids the client having
if (MaxBytesToEmit)
OS << ", " << MaxBytesToEmit;
}
if (MaxBytesToEmit)
OS << ", " << MaxBytesToEmit;
}
OS << ", " << truncateToSize(Value, ValueSize);
if (MaxBytesToEmit)
OS << ", " << MaxBytesToEmit;
OS << ", " << truncateToSize(Value, ValueSize);
if (MaxBytesToEmit)
OS << ", " << MaxBytesToEmit;
}
void MCAsmStreamer::EmitValueToOffset(const MCExpr *Offset,
unsigned char Value) {
// FIXME: Verify that Offset is associated with the current section.
}
void MCAsmStreamer::EmitValueToOffset(const MCExpr *Offset,
unsigned char Value) {
// FIXME: Verify that Offset is associated with the current section.
- OS << ".org " << *Offset << ", " << (unsigned) Value << '\n';
+ OS << ".org " << *Offset << ", " << (unsigned) Value;
+ EmitEOL();
}
void MCAsmStreamer::EmitInstruction(const MCInst &Inst) {
}
void MCAsmStreamer::EmitInstruction(const MCInst &Inst) {
// If we have an AsmPrinter, use that to print.
if (InstPrinter) {
InstPrinter->printInst(&Inst);
// If we have an AsmPrinter, use that to print.
if (InstPrinter) {
InstPrinter->printInst(&Inst);
// Show the encoding if we have a code emitter.
if (Emitter) {
// Show the encoding if we have a code emitter.
if (Emitter) {
// Otherwise fall back to a structural printing for now. Eventually we should
// always have access to the target specific printer.
Inst.print(OS, &MAI);
// Otherwise fall back to a structural printing for now. Eventually we should
// always have access to the target specific printer.
Inst.print(OS, &MAI);
}
void MCAsmStreamer::Finish() {
}
void MCAsmStreamer::Finish() {