39 MAB.getTargetOptions().getABIName()));
55void RISCVTargetELFStreamer::emitAttribute(
unsigned Attribute,
unsigned Value) {
59void RISCVTargetELFStreamer::emitTextAttribute(
unsigned Attribute,
64void RISCVTargetELFStreamer::emitIntTextAttribute(
unsigned Attribute,
71void RISCVTargetELFStreamer::finishAttributeSection() {
88 if (Features[RISCV::FeatureStdExtC])
90 if (Features[RISCV::FeatureStdExtZtso])
116void RISCVTargetELFStreamer::reset() {
117 AttributeSection =
nullptr;
125void RISCVELFStreamer::reset() {
128 MappingSymbolCounter = 0;
129 LastMappingSymbols.clear();
133void RISCVELFStreamer::emitDataMappingSymbol() {
134 if (LastEMS == EMS_Data)
136 emitMappingSymbol(
"$d");
140void RISCVELFStreamer::emitInstructionsMappingSymbol() {
141 if (LastEMS == EMS_Instructions)
143 emitMappingSymbol(
"$x");
144 LastEMS = EMS_Instructions;
148 auto *
Symbol = cast<MCSymbolELF>(getContext().getOrCreateSymbol(
149 Name +
"." +
Twine(MappingSymbolCounter++)));
156 const MCExpr *Subsection) {
160 LastMappingSymbols[getPreviousSection().first] = LastEMS;
161 LastEMS = LastMappingSymbols.lookup(Section);
168 emitInstructionsMappingSymbol();
173 emitDataMappingSymbol();
179 emitDataMappingSymbol();
185 emitDataMappingSymbol();
191 std::unique_ptr<MCAsmBackend> MAB,
192 std::unique_ptr<MCObjectWriter> MOW,
193 std::unique_ptr<MCCodeEmitter> MCE,
void emitBytes(StringRef Data) override
Emit the bytes in Data into the output.
void changeSection(MCSection *Section, const MCExpr *Subsection) override
Update streamer for a new active section.
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
void emitFill(const MCExpr &NumBytes, uint64_t FillValue, SMLoc Loc) override
Emit Size bytes worth of the value specified by FillValue.
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc) override
Emit the expression Value into the output as a native integer of the given Size bytes.
Container class for subtarget features.
unsigned getELFHeaderEFlags() const
ELF e_header flags.
MCAsmBackend & getBackend() const
void setELFHeaderEFlags(unsigned Flags)
bool registerSymbol(const MCSymbol &Symbol)
void setRelaxAll(bool Value)
Context object for machine code objects.
SmallVector< AttributeItem, 64 > Contents
void emitAttributesSection(StringRef Vendor, const Twine &Section, unsigned Type, MCSection *&AttributeSection)
void setAttributeItems(unsigned Attribute, unsigned IntValue, StringRef StringValue, bool OverwriteExisting)
void emitValueImpl(const MCExpr *Value, unsigned Size, SMLoc Loc=SMLoc()) override
Emit the expression Value into the output as a native integer of the given Size bytes.
void setAttributeItem(unsigned Attribute, unsigned Value, bool OverwriteExisting)
void reset() override
state management
void changeSection(MCSection *Section, const MCExpr *Subsection) override
Update streamer for a new active section.
Base class for the full range of assembler expressions which are needed for parsing.
Instances of this class represent a single low-level machine instruction.
void emitFill(const MCExpr &NumBytes, uint64_t FillValue, SMLoc Loc=SMLoc()) override
Emit Size bytes worth of the value specified by FillValue.
MCAssembler & getAssembler()
void emitBytes(StringRef Data) override
Emit the bytes in Data into the output.
void emitInstruction(const MCInst &Inst, const MCSubtargetInfo &STI) override
Emit the given Instruction into the current section.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Streaming machine code generation interface.
Generic base class for all target subtargets.
const Triple & getTargetTriple() const
const FeatureBitset & getFeatureBits() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
void emitDirectiveOptionPop() override
void emitDirectiveOptionPush() override
void emitDirectiveOptionNoPIC() override
void emitDirectiveOptionNoRVC() override
RISCVTargetELFStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
void emitDirectiveVariantCC(MCSymbol &Symbol) override
void emitDirectiveOptionRelax() override
RISCVELFStreamer & getStreamer()
void emitDirectiveOptionNoRelax() override
void emitDirectiveOptionPIC() override
void emitDirectiveOptionRVC() override
RISCVABI::ABI getTargetABI() const
void setTargetABI(RISCVABI::ABI ABI)
Represents a location in source code.
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.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ C
The default llvm calling convention, compatible with C.
@ EF_RISCV_FLOAT_ABI_SINGLE
@ EF_RISCV_FLOAT_ABI_DOUBLE
ABI computeTargetABI(const Triple &TT, const FeatureBitset &FeatureBits, StringRef ABIName)
This is an optimization pass for GlobalISel generic memory operations.
MCELFStreamer * createRISCVELFStreamer(MCContext &C, std::unique_ptr< MCAsmBackend > MAB, std::unique_ptr< MCObjectWriter > MOW, std::unique_ptr< MCCodeEmitter > MCE, bool RelaxAll)