27 "riscv-abi-attributes",
28 cl::desc(
"Enable emitting RISC-V ELF attributes for ABI features"),
60 HasRVC = STI.
hasFeature(RISCV::FeatureStdExtC) ||
62 HasTSO = STI.
hasFeature(RISCV::FeatureStdExtZtso);
66 bool EmitStackAlign) {
88 unsigned AtomicABITag =
static_cast<unsigned>(
89 STI.
hasFeature(RISCV::FeatureNoTrailingSeqCstFence)
102 OS <<
"\t.option\tpush\n";
106 OS <<
"\t.option\tpop\n";
110 OS <<
"\t.option\tpic\n";
114 OS <<
"\t.option\tnopic\n";
118 OS <<
"\t.option\trvc\n";
122 OS <<
"\t.option\tnorvc\n";
126 OS <<
"\t.option\trelax\n";
130 OS <<
"\t.option\tnorelax\n";
135 OS <<
"\t.option\tarch";
136 for (
const auto &Arg : Args) {
154 OS <<
"\t.variant_cc\t" << Symbol.getName() <<
"\n";
157void RISCVTargetAsmStreamer::emitAttribute(
unsigned Attribute,
unsigned Value) {
161void RISCVTargetAsmStreamer::emitTextAttribute(
unsigned Attribute,
166void RISCVTargetAsmStreamer::emitIntTextAttribute(
unsigned Attribute,
170void RISCVTargetAsmStreamer::finishAttributeSection() {}
static cl::opt< bool > RiscvAbiAttr("riscv-abi-attributes", cl::desc("Enable emitting RISC-V ELF attributes for ABI features"), cl::Hidden)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Streaming machine code generation interface.
Generic base class for all target subtargets.
bool hasFeature(unsigned Feature) const
const FeatureBitset & getFeatureBits() const
MCSymbol - Instances of this class represent a symbol name in the MC file, and MCSymbols are created ...
Target specific streamer interface.
This class represents success/failure for parsing-like operations that find it important to chain tog...
void emitDirectiveOptionPIC() override
void emitDirectiveOptionArch(ArrayRef< RISCVOptionArchArg > Args) override
void emitDirectiveOptionRelax() override
RISCVTargetAsmStreamer(MCStreamer &S, formatted_raw_ostream &OS)
void emitDirectiveOptionNoRVC() override
void emitDirectiveOptionNoPIC() override
void emitDirectiveOptionPop() override
void emitDirectiveOptionNoRelax() override
void emitDirectiveOptionRVC() override
void emitDirectiveVariantCC(MCSymbol &Symbol) override
void emitDirectiveOptionPush() override
virtual void emitDirectiveOptionPIC()
virtual void emitDirectiveOptionNoRelax()
virtual void emitAttribute(unsigned Attribute, unsigned Value)
virtual void emitTextAttribute(unsigned Attribute, StringRef String)
virtual void emitDirectiveVariantCC(MCSymbol &Symbol)
void emitTargetAttributes(const MCSubtargetInfo &STI, bool EmitStackAlign)
void setFlagsFromFeatures(const MCSubtargetInfo &STI)
virtual void emitIntTextAttribute(unsigned Attribute, unsigned IntValue, StringRef StringValue)
virtual void emitDirectiveOptionPop()
virtual void emitDirectiveOptionNoPIC()
void setTargetABI(RISCVABI::ABI ABI)
RISCVTargetStreamer(MCStreamer &S)
virtual void emitDirectiveOptionArch(ArrayRef< RISCVOptionArchArg > Args)
virtual void finishAttributeSection()
virtual void emitDirectiveOptionPush()
virtual void emitDirectiveOptionRelax()
virtual void emitDirectiveOptionNoRVC()
virtual void emitDirectiveOptionRVC()
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.
llvm::Expected< std::unique_ptr< RISCVISAInfo > > parseFeatureBits(bool IsRV64, const FeatureBitset &FeatureBits)
This is an optimization pass for GlobalISel generic memory operations.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.