26 if (CurrentSection !=
nullptr)
35 Streamer.
emitValue(Entry.Value, Entry.Size, Entry.Loc);
44 if (CurrentSection ==
nullptr)
52 auto Itr =
C ? CachedEntries.find(
C->getValue()) : CachedEntries.end();
53 if (Itr != CachedEntries.end())
56 MCSymbol *CPEntryLabel = Context.createTempSymbol();
70 CachedEntries[
C->getValue()] = SymRef;
77 CurrentSection =
nullptr;
78 CachedEntries.clear();
86 const MCExpr *AdjustExpr) {
90 const MCExpr *OrigExpr = Expr;
92 if (
const CSKYMCExpr *CE = dyn_cast<CSKYMCExpr>(Expr)) {
93 Expr = CE->getSubExpr();
94 ELFRefKind = CE->getKind();
133void CSKYTargetAsmStreamer::emitAttribute(
unsigned Attribute,
unsigned Value) {
137void CSKYTargetAsmStreamer::emitTextAttribute(
unsigned Attribute,
139 OS <<
"\t.csky_attribute\t" <<
Attribute <<
", \"" <<
String <<
"\"\n";
142void CSKYTargetAsmStreamer::finishAttributeSection() {}
void emitAll(MCStreamer &Streamer)
const MCExpr * addEntry(MCStreamer &Streamer, const MCExpr *Value, unsigned Size, SMLoc Loc, const MCExpr *AdjustExpr)
const MCExpr * getSubExpr() const
static const CSKYMCExpr * create(const MCExpr *Expr, VariantKind Kind, MCContext &Ctx)
VariantKind getKind() const
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
virtual void emitTargetAttributes(const MCSubtargetInfo &STI)
DenseMap< SymbolIndex, const MCExpr * > ConstantMap
const MCExpr * addConstantPoolEntry(const MCExpr *, SMLoc Loc, const MCExpr *AdjustExpr=nullptr)
Add a new entry to the constant pool for the current section and return an MCExpr that can be used to...
void emitCurrentConstantPool()
virtual void finishAttributeSection()
CSKYTargetStreamer(MCStreamer &S)
virtual void emitAttribute(unsigned Attribute, unsigned Value)
const MCExpr * addEntry(const MCExpr *Value, MCContext &Context, unsigned Size, SMLoc Loc)
static const MCBinaryExpr * createSub(const MCExpr *LHS, const MCExpr *RHS, MCContext &Ctx)
const MCSubtargetInfo * getSubtargetInfo() const
Base class for the full range of assembler expressions which are needed for parsing.
Streaming machine code generation interface.
MCContext & getContext() const
void emitValue(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc())
virtual void emitLabel(MCSymbol *Symbol, SMLoc Loc=SMLoc())
Emit a label for Symbol into the current section.
virtual void emitCodeAlignment(Align Alignment, const MCSubtargetInfo *STI, unsigned MaxBytesToEmit=0)
Emit nops until the byte alignment ByteAlignment is reached.
virtual void emitDataRegion(MCDataRegionType Kind)
Note in the output the specified region Kind.
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
MCSection * getCurrentSectionOnly() const
Generic base class for all target subtargets.
Represent a reference to a symbol from inside an expression.
static const MCSymbolRefExpr * create(const MCSymbol *Symbol, MCContext &Ctx)
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Target specific streamer interface.
MCStreamer & getStreamer()
Represents a location in source code.
void push_back(const T &Elt)
StringRef - Represent a constant reference to a string, i.e.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
LLVM Value Representation.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
@ MCDR_DataRegionEnd
.end_data_region
@ MCDR_DataRegion
.data_region
This struct is a compact representation of a valid (non-zero power of two) alignment.