Go to the documentation of this file.
26 std::unique_ptr<MCAsmBackend> MAB,
27 std::unique_ptr<MCObjectWriter> OW,
28 std::unique_ptr<MCCodeEmitter> Emitter)
34 auto *
Symbol = cast<MCSymbolXCOFF>(Sym);
78 Symbol->setExternal(cast<MCSymbolXCOFF>(
Symbol)->getStorageClass() !=
84 cast<MCSymbolXCOFF>(
Symbol)->getRepresentedCsect()->setAlignment(
108 const size_t ContentsSize =
DF->getContents().size();
109 auto &DataFragmentFixups =
DF->getFixups();
111 Fixup.setOffset(
Fixup.getOffset() + ContentsSize);
112 DataFragmentFixups.push_back(
Fixup);
115 DF->setHasInstructions(STI);
116 DF->getContents().append(Code.begin(), Code.end());
120 std::unique_ptr<MCAsmBackend> &&MAB,
121 std::unique_ptr<MCObjectWriter> &&OW,
122 std::unique_ptr<MCCodeEmitter> &&CE,
127 S->getAssembler().setRelaxAll(
true);
This class represents lattice values for constants.
void emitXCOFFSymbolLinkageWithVisibility(MCSymbol *Symbol, MCSymbolAttr Linkage, MCSymbolAttr Visibility) override
Emit a symbol's linkage and visibilty with a linkage directive for XCOFF.
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void registerSymbol(const MCSymbol &Symbol, bool *Created=nullptr)
void emitValueToAlignment(unsigned ByteAlignment, int64_t Value=0, unsigned ValueSize=1, unsigned MaxBytesToEmit=0) override
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
Context object for machine code objects.
@ MCSA_Invalid
Not a valid directive.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
void emitCommonSymbol(MCSymbol *Symbol, uint64_t Size, unsigned ByteAlignment) override
Emit a common symbol.
bool emitSymbolAttribute(MCSymbol *Symbol, MCSymbolAttr Attribute) override
Add the given Attribute to Symbol.
Instances of this class represent a single low-level machine instruction.
void emitZerofill(MCSection *Section, MCSymbol *Symbol=nullptr, uint64_t Size=0, unsigned ByteAlignment=0, SMLoc Loc=SMLoc()) override
Emit the zerofill section and an optional symbol.
Streaming machine code generation interface.
Represents a location in source code.
@ MCSA_Extern
.extern (XCOFF)
@ MCSA_Protected
.protected (ELF)
@ MCSA_LGlobal
.lglobl (XCOFF)
Streaming object file generation interface.
LLVM_ATTRIBUTE_NORETURN void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
@ MCSA_Hidden
.hidden (ELF)
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
MCXCOFFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
MCCodeEmitter & getEmitter() const
MCStreamer * createXCOFFStreamer(MCContext &Ctx, std::unique_ptr< MCAsmBackend > &&TAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&CE, bool RelaxAll)
compiles ldr LCPI1_0 ldr ldr mov lsr tst moveq r1 ldr LCPI1_1 and r0 bx lr It would be better to do something like to fold the shift into the conditional move
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
void emitXCOFFLocalCommonSymbol(MCSymbol *LabelSym, uint64_t Size, MCSymbol *CsectSym, unsigned ByteAlign) override
Emits an lcomm directive with XCOFF csect information.
MCAssembler & getAssembler()
void emitInstToData(const MCInst &Inst, const MCSubtargetInfo &) override
MCDataFragment * getOrCreateDataFragment(const MCSubtargetInfo *STI=nullptr)
Get a data fragment to write into, creating a new one if the current fragment is not a data fragment.
PowerPC TLS Dynamic Call Fixup
Instances of this class represent a uniqued identifier for a section in the current translation unit.
add sub stmia L5 ldr r0 bl L_printf $stub Instead of a and a wouldn t it be better to do three moves *Return an aggregate type is even return S
Linkage
Describes symbol linkage.
@ MCSA_Global
.type _foo, @gnu_unique_object
A raw_ostream that writes to an SmallVector or SmallString.
Fragment for data and encoded instructions.
Generic base class for all target subtargets.
virtual void encodeInstruction(const MCInst &Inst, raw_ostream &OS, SmallVectorImpl< MCFixup > &Fixups, const MCSubtargetInfo &STI) const =0
EncodeInstruction - Encode the given Inst to bytes on the output stream OS.
void emitZeros(uint64_t NumBytes)
Emit NumBytes worth of zeros.