38 OS << Name <<
" CATTR ";
39 OS <<
"ALIGN(" <<
static_cast<unsigned>(Alignment) <<
"),"
40 <<
"FILL(" <<
static_cast<unsigned>(FillByteValue) <<
")";
41 switch (LoadBehavior) {
56 OS <<
",NOTEXECUTABLE";
82 OS <<
",PRIORITY(" << SortKey <<
")";
83 if (!PartName.
empty())
84 OS <<
",PART(" << PartName <<
")";
93 OS << Name <<
" XATTR ";
97 OS << Sep <<
"REFERENCE("
100 OS << Sep <<
"PSECT(" << ADA->
getName() <<
")";
102 OS << Sep <<
"SCOPE(";
103 switch (BindingScope) {
124void MCAsmInfoGOFF::printSwitchToSection(
const MCSection &Section,
125 uint32_t Subsection,
const Triple &
T,
128 const_cast<MCSectionGOFF &
>(
static_cast<const MCSectionGOFF &
>(
Section));
129 auto EmitExternalName = [&Sec, &OS]() {
130 if (Sec.hasExternalName())
131 OS << Sec.getName() <<
" ALIAS C'" << Sec.getExternalName() <<
"'\n";
133 switch (Sec.SymbolType) {
135 OS << Sec.getName() <<
" CSECT\n";
141 printSwitchToSection(*Sec.getParent(), Subsection,
T, OS);
143 emitCATTR(OS, Sec.getName(), Sec.EDAttributes.Rmode,
144 Sec.EDAttributes.Alignment, Sec.EDAttributes.LoadBehavior,
146 Sec.EDAttributes.FillByteValue, StringRef());
147 if (
auto *BeginSym =
static_cast<MCSymbolGOFF *
>(Sec.getBeginSymbol())) {
148 if (BeginSym->getADA())
149 emitXATTR(OS, BeginSym->getName(), BeginSym->getADA(),
156 OS << Sec.getName() <<
" CATTR\n";
160 MCSectionGOFF *ED = Sec.getParent();
161 printSwitchToSection(*ED->
getParent(), Subsection,
T, OS);
169 Sec.getBeginSymbol() !=
nullptr
170 ?
static_cast<MCSymbolGOFF *
>(Sec.getBeginSymbol())->getADA()
172 emitXATTR(OS, Sec.getName(), ADA, Sec.PRAttributes.Linkage,
173 Sec.PRAttributes.Executable, Sec.PRAttributes.BindingScope);
178 OS << ED->
getName() <<
" CATTR PART(" << Sec.getName() <<
")\n";
static void emitCATTR(raw_ostream &OS, StringRef Name, GOFF::ESDRmode Rmode, GOFF::ESDAlignment Alignment, GOFF::ESDLoadingBehavior LoadBehavior, GOFF::ESDExecutable Executable, bool IsReadOnly, uint32_t SortKey, uint8_t FillByteValue, StringRef PartName)
static void emitXATTR(raw_ostream &OS, StringRef Name, MCSectionGOFF *ADA, GOFF::ESDLinkageType Linkage, GOFF::ESDExecutable Executable, GOFF::ESDBindingScope BindingScope)
This file defines certain target specific asm properties for GOFF (z/OS) based targets.
This file declares the MCSectionGOFF class, which contains all of the necessary machine code sections...
This file contains the MCSymbolGOFF class.
A helper class to return the specified delimiter string after the first invocation of operator String...
MCAsmInfoGOFF(const MCTargetOptions &Options)
StringRef InternalSymbolPrefix
For internal use by compiler and assembler, not meant to be visible externally.
const char * Data64bitsDirective
MCAsmInfo(const MCTargetOptions &Options)
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
const char * ZeroDirective
This should be set to the directive used to get some number of zero (and non-zero if supported by the...
GOFF::EDAttr getEDAttributes() const
GOFF::EDAttr EDAttributes
MCSectionGOFF * getParent() const
Instances of this class represent a uniqued identifier for a section in the current translation unit.
StringRef getName() const
Represent a constant reference to a string, i.e.
constexpr bool empty() const
Check if the string is empty.
Triple - Helper class for working with autoconf configuration names.
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ ESD_ST_ElementDefinition
@ ESD_ST_SectionDefinition
This is an optimization pass for GlobalISel generic memory operations.
GOFF::ESDAlignment Alignment
GOFF::ESDLoadingBehavior LoadBehavior