35 uint16_t Discriminator,
37 bool HasAddressDiversity) {
53 ConstantPools->emitForCurrentSection(
Streamer);
63 if (CLOpts.mark_bti_property)
68 uint64_t PAuthABIPlatform,
69 uint64_t PAuthABIVersion) {
75 if (PAuthABIPlatform !=
uint64_t(-1))
76 DescSz += 4 + 4 + 8 * 2;
87 Context.reportWarning(
89 "The .note.gnu.property is not emitted because it is already present.");
111 if (PAuthABIPlatform !=
uint64_t(-1)) {
128 for (
char &
C : Buffer) {
140 if (TT.isOSBinFormatELF())
142 if (TT.isOSBinFormatCOFF())
157 if (VendorName == SubSection.VendorName) {
171std::unique_ptr<MCELFStreamer::AttributeSubSection>
174 if (SubSection.IsActive) {
175 return std::make_unique<MCELFStreamer::AttributeSubSection>(SubSection);
181std::unique_ptr<MCELFStreamer::AttributeSubSection>
184 if (Name == SubSection.VendorName) {
185 return std::make_unique<MCELFStreamer::AttributeSubSection>(SubSection);
195 assert(0 &&
"Arguments error");
200 "Can not add AArch64 build attribute: no AArch64 subsection exists");
205 if (VendorName == SubSection.VendorName) {
206 if (!SubSection.IsActive) {
208 "Can not add AArch64 build attribute: subsection is not active");
222 if (
unsigned(-1) !=
Value)
232 assert(0 &&
"Can not add AArch64 build attribute: required subsection does "
238 if (VendorName == SubSection.VendorName) {
239 SubSection.IsActive =
true;
241 SubSection.IsActive =
false;
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static const AArch64AuthMCExpr * create(const MCExpr *Expr, uint16_t Discriminator, AArch64PACKey::ID Key, bool HasAddressDiversity, MCContext &Ctx, SMLoc Loc=SMLoc())
AArch64TargetStreamer(MCStreamer &S)
virtual void emitAttributesSubsection(StringRef VendorName, AArch64BuildAttributes::SubsectionOptional IsOptional, AArch64BuildAttributes::SubsectionType ParameterType)
Build attributes implementation.
void activateAttributesSubsection(StringRef VendorName)
std::unique_ptr< MCELFStreamer::AttributeSubSection > getActiveAttributesSubsection()
void emitConstantPools() override
const MCExpr * addConstantPoolEntry(const MCExpr *, unsigned Size, SMLoc Loc)
Callback used to implement the ldr= pseudo.
~AArch64TargetStreamer() override
SmallVector< MCELFStreamer::AttributeSubSection, 64 > AttributeSubSections
std::unique_ptr< MCELFStreamer::AttributeSubSection > getAttributesSubsectionByName(StringRef Name)
void emitNoteSection(unsigned Flags, uint64_t PAuthABIPlatform=-1, uint64_t PAuthABIVersion=-1)
Callback used to implement the .note.gnu.property section.
void emitAuthValue(const MCExpr *Expr, uint16_t Discriminator, AArch64PACKey::ID Key, bool HasAddressDiversity)
Callback used to emit AUTH expressions (e.g.
virtual void emitAttribute(StringRef VendorName, unsigned Tag, unsigned Value, std::string String)
void emitCurrentConstantPool()
Callback used to implement the .ltorg directive.
virtual void emitInst(uint32_t Inst)
Callback used to implement the .inst directive.
Context object for machine code objects.
Base class for the full range of assembler expressions which are needed for parsing.
This represents a section on linux, lots of unix variants and some bare metal systems.
Instances of this class represent a uniqued identifier for a section in the current translation unit.
bool isRegistered() const
Streaming machine code generation interface.
MCContext & getContext() const
virtual void emitValueToAlignment(Align Alignment, int64_t Fill=0, uint8_t FillLen=1, unsigned MaxBytesToEmit=0)
Emit some number of copies of Value until the byte alignment ByteAlignment is reached.
virtual void emitIntValue(uint64_t Value, unsigned Size)
Special case of EmitValue that avoids the client having to pass in a MCExpr for constant integers.
MCSymbol * endSection(MCSection *Section)
virtual void switchSection(MCSection *Section, uint32_t Subsec=0)
Set the current section where code is being emitted to Section.
MCSection * getCurrentSectionOnly() const
virtual void emitBytes(StringRef Data)
Emit the bytes in Data into the output.
Generic base class for all target subtargets.
const Triple & getTargetTriple() const
Target specific streamer interface.
MCStreamer & getStreamer()
MCTargetStreamer(MCStreamer &S)
Represents a location in source code.
Represent a constant reference to a string, i.e.
Triple - Helper class for working with autoconf configuration names.
LLVM Value Representation.
@ GNU_PROPERTY_AARCH64_FEATURE_1_BTI
@ GNU_PROPERTY_AARCH64_FEATURE_PAUTH
@ GNU_PROPERTY_AARCH64_FEATURE_1_AND
This is an optimization pass for GlobalISel generic memory operations.
MCTargetStreamer * createAArch64NullTargetStreamer(MCStreamer &S)
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key
@ Global
Append to llvm.global_dtors.
MCTargetStreamer * createAArch64ObjectTargetStreamer(MCStreamer &S, const MCSubtargetInfo &STI)
This struct is a compact representation of a valid (non-zero power of two) alignment.
ELF object attributes section emission support.
enum llvm::MCELFStreamer::AttributeItem::Types Type
ELF object attributes subsection support.