37 std::unique_ptr<MCAsmBackend> MAB,
38 std::unique_ptr<MCObjectWriter> OW,
39 std::unique_ptr<MCCodeEmitter>
Emitter)
43void PPCELFStreamer::emitPrefixedInstruction(
const MCInst &Inst,
76 if (InstLine == LabelLine) {
92 std::optional<bool> IsPartOfGOTToPCRelPair =
99 if (IsPartOfGOTToPCRelPair && !*IsPartOfGOTToPCRelPair)
100 emitGOTToPCRelReloc(Inst);
103 if (!
Emitter->isPrefixedInstruction(Inst)) {
107 emitPrefixedInstruction(Inst, STI);
114 if (IsPartOfGOTToPCRelPair && *IsPartOfGOTToPCRelPair)
115 emitGOTToPCRelLabel(Inst);
135void PPCELFStreamer::emitGOTToPCRelReloc(
const MCInst &Inst) {
143 "Expecting a symbol of type VK_PCREL_OPT");
152 const MCExpr *CurrentLocationExpr =
167void PPCELFStreamer::emitGOTToPCRelLabel(
const MCInst &Inst) {
175 "Expecting a symbol of type VK_PCREL_OPT");
220 std::unique_ptr<MCAsmBackend> &&MAB,
221 std::unique_ptr<MCObjectWriter> &&OW,
222 std::unique_ptr<MCCodeEmitter> &&
Emitter) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
dxil DXContainer Global Emitter
MCCodeEmitter * getEmitterPtr() const
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
static LLVM_ABI const MCConstantExpr * create(int64_t Value, MCContext &Ctx, bool PrintInHex=false, unsigned SizeInBytes=0)
Context object for machine code objects.
LLVM_ABI MCSymbol * createTempSymbol()
Create a temporary symbol with a unique name.
const SourceMgr * getSourceManager() const
LLVM_ABI MCSymbol * getOrCreateSymbol(const Twine &Name)
Lookup the symbol inside with the specified Name.
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
Base class for the full range of assembler expressions which are needed for parsing.
static MCFixup create(uint32_t Offset, const MCExpr *Value, MCFixupKind Kind, bool PCRel=false)
Consider bit fields if we need more flags.
Instances of this class represent a single low-level machine instruction.
unsigned getNumOperands() const
unsigned getOpcode() const
const MCOperand & getOperand(unsigned i) const
MCAssembler & getAssembler()
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
void emitCodeAlignment(Align ByteAlignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0) override
Emit nops until the byte alignment ByteAlignment is reached.
Instances of this class represent operands of the MCInst class.
const MCExpr * getExpr() const
Streaming machine code generation interface.
MCFragment * getCurrentFragment() const
MCContext & getContext() const
Generic base class for all target subtargets.
Represent a reference to a symbol from inside an expression.
const MCSymbol & getSymbol() const
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx, SMLoc Loc=SMLoc())
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
bool isDefined() const
isDefined - Check if this symbol is defined (i.e., it has an address).
StringRef getName() const
getName - Get the symbol name.
void setFragment(MCFragment *F) const
Mark the symbol as defined in the fragment F.
void setOffset(uint64_t Value)
MCFragment * getFragment() const
uint64_t getOffset() const
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
PPCELFStreamer(MCContext &Context, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > OW, std::unique_ptr< MCCodeEmitter > Emitter)
void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc()) override
Emit a label for Symbol into the current section.
Represents a location in source code.
constexpr bool isValid() const
This owns the files read by a parser, handles include stacks, and handles diagnostic wrangling.
unsigned FindLineNumber(SMLoc Loc, unsigned BufferID=0) const
Find the line number for the specified location in the specified file.
Triple - Helper class for working with autoconf configuration names.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
@ FirstLiteralRelocationKind
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
static uint16_t getSpecifier(const MCSymbolRefExpr *SRE)
std::optional< bool > isPartOfGOTToPCRelPair(const MCInst &Inst, const MCSubtargetInfo &STI)
MCStreamer * createPPCELFStreamer(const Triple &, MCContext &, std::unique_ptr< MCAsmBackend > &&MAB, std::unique_ptr< MCObjectWriter > &&OW, std::unique_ptr< MCCodeEmitter > &&Emitter)
Implement std::hash so that hash_code can be used in STL containers.
This struct is a compact representation of a valid (non-zero power of two) alignment.