39 OS << Name <<
" CATTR ";
40 OS <<
"ALIGN(" <<
static_cast<unsigned>(Alignment) <<
"),"
41 <<
"FILL(" <<
static_cast<unsigned>(FillByteValue) <<
")";
42 switch (LoadBehavior) {
57 OS <<
",NOTEXECUTABLE";
83 OS <<
",PRIORITY(" << SortKey <<
")";
84 if (!PartName.
empty())
85 OS <<
",PART(" << PartName <<
")";
94 OS << Name <<
" XATTR ";
98 OS << Sep <<
"REFERENCE("
101 OS << Sep <<
"PSECT(" << ADA->
getName() <<
")";
103 OS << Sep <<
"SCOPE(";
104 switch (BindingScope) {
125void MCAsmInfoGOFF::printSwitchToSection(
const MCSection &Section,
126 uint32_t Subsection,
const Triple &
T,
129 const_cast<MCSectionGOFF &
>(
static_cast<const MCSectionGOFF &
>(
Section));
130 auto EmitExternalName = [&Sec, &OS]() {
131 if (Sec.hasExternalName())
132 OS << Sec.getName() <<
" ALIAS C'" << Sec.getExternalName() <<
"'\n";
134 switch (Sec.SymbolType) {
136 OS << Sec.getName() <<
" CSECT\n";
142 printSwitchToSection(*Sec.getParent(), Subsection,
T, OS);
144 emitCATTR(OS, Sec.getName(), Sec.EDAttributes.Rmode,
145 Sec.EDAttributes.Alignment, Sec.EDAttributes.LoadBehavior,
147 Sec.EDAttributes.FillByteValue, StringRef());
148 if (
auto *BeginSym =
static_cast<MCSymbolGOFF *
>(Sec.getBeginSymbol())) {
149 if (BeginSym->getADA())
150 emitXATTR(OS, BeginSym->getName(), BeginSym->getADA(),
157 OS << Sec.getName() <<
" CATTR\n";
161 MCSectionGOFF *ED = Sec.getParent();
162 printSwitchToSection(*ED->
getParent(), Subsection,
T, OS);
170 Sec.getBeginSymbol() !=
nullptr
171 ?
static_cast<MCSymbolGOFF *
>(Sec.getBeginSymbol())->getADA()
173 emitXATTR(OS, Sec.getName(), ADA, Sec.PRAttributes.Linkage,
174 Sec.PRAttributes.Executable, Sec.PRAttributes.BindingScope);
179 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.
StringRef PrivateLabelPrefix
This prefix is used for labels for basic blocks. Defaults to "L".
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