const Section* ConstDataCoalSection;
const Section* ConstDataSection;
const Section* DataCoalSection;
+ const Section* FourByteConstantSection;
+ const Section* EightByteConstantSection;
+ const Section* SixteenByteConstantSection;
explicit DarwinTargetAsmInfo(const TargetMachine &TM);
virtual const Section* SelectSectionForGlobal(const GlobalValue *GV) const;
/// Defaults to "\t.section .dtors,\"aw\",@progbits".
const char *StaticDtorsSection;
- /// FourByteConstantSection, EightByteConstantSection,
- /// SixteenByteConstantSection - These are special sections where we place
- /// 4-, 8-, and 16- byte constant literals.
- const char *FourByteConstantSection;
- const Section *FourByteConstantSection_;
- const char *EightByteConstantSection;
- const Section *EightByteConstantSection_;
- const char *SixteenByteConstantSection;
- const Section *SixteenByteConstantSection_;
-
//===--- Global Variable Emission Directives --------------------------===//
/// GlobalDirective - This is the directive used to declare a global entity.
const char *getStaticDtorsSection() const {
return StaticDtorsSection;
}
- const char *getFourByteConstantSection() const {
- return FourByteConstantSection;
- }
- const Section *getFourByteConstantSection_() const {
- return FourByteConstantSection_;
- }
- const char *getEightByteConstantSection() const {
- return EightByteConstantSection;
- }
- const Section *getEightByteConstantSection_() const {
- return EightByteConstantSection_;
- }
- const char *getSixteenByteConstantSection() const {
- return SixteenByteConstantSection;
- }
- const Section *getSixteenByteConstantSection_() const {
- return SixteenByteConstantSection_;
- }
const char *getGlobalDirective() const {
return GlobalDirective;
}
ProtectedDirective = NULL;
JumpTableDataSection = ".const";
CStringSection = "\t.cstring";
- FourByteConstantSection = "\t.literal4\n";
- EightByteConstantSection = "\t.literal8\n";
ReadOnlySection = "\t.const\n";
HasDotTypeDotSizeDirective = false;
NeedsIndirectEncoding = true;
AbsoluteDebugSectionOffsets = true;
CStringSection = ".rodata.str";
ReadOnlySection = "\t.section\t.rodata\n";
- FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
- EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8";
- SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";
SetDirective = "\t.set\t";
CStringSection = "\t.cstring";
StaticCtorsSection = ".mod_init_func";
StaticDtorsSection = ".mod_term_func";
- FourByteConstantSection = ".const";
- SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
InlineAsmStart = "# InlineAsm Start";
InlineAsmEnd = "# InlineAsm End";
CStringSection_ = getUnnamedSection("\t.cstring",
SectionFlags::Mergeable | SectionFlags::Strings);
- FourByteConstantSection_ = getUnnamedSection("\t.literal4\n",
+ FourByteConstantSection = getUnnamedSection("\t.literal4\n",
+ SectionFlags::Mergeable);
+ EightByteConstantSection = getUnnamedSection("\t.literal8\n",
SectionFlags::Mergeable);
- EightByteConstantSection_ = getUnnamedSection("\t.literal8\n",
- SectionFlags::Mergeable);
// Note: 16-byte constant section is subtarget specific and should be provided
- // there.
+ // there, if needed.
+ SixteenByteConstantSection = 0;
ReadOnlySection_ = getUnnamedSection("\t.const\n", SectionFlags::None);
unsigned Size = TD->getABITypeSize(Ty);
if (Size == 4)
- return FourByteConstantSection_;
+ return FourByteConstantSection;
else if (Size == 8)
- return EightByteConstantSection_;
- else if (Size == 16 && SixteenByteConstantSection_)
- return SixteenByteConstantSection_;
+ return EightByteConstantSection;
+ else if (Size == 16 && SixteenByteConstantSection)
+ return SixteenByteConstantSection;
return getReadOnlySection_();
}
ZeroDirective = "\t.space\t";
BSSSection = "\t.section\t.bss";
CStringSection = ".rodata.str";
- FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
if (!Subtarget->hasABICall()) {
JumpTableDirective = "\t.word\t";
ConstantPoolSection = "\t.const\t";
JumpTableDataSection = ".const";
CStringSection = "\t.cstring";
- FourByteConstantSection = "\t.literal4\n";
- EightByteConstantSection = "\t.literal8\n";
ReadOnlySection = "\t.const\n";
if (TM.getRelocationModel() == Reloc::Static) {
StaticCtorsSection = ".constructor";
DwarfMacInfoSection = "\t.section\t.debug_macinfo,\"\",@progbits";
ReadOnlySection = "\t.section\t.rodata";
- FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
- EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8";
- SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
PCSymbol = ".";
// Set up DWARF directives
CStringSection_(0),
StaticCtorsSection("\t.section .ctors,\"aw\",@progbits"),
StaticDtorsSection("\t.section .dtors,\"aw\",@progbits"),
- FourByteConstantSection(0),
- FourByteConstantSection_(0),
- EightByteConstantSection(0),
- EightByteConstantSection_(0),
- SixteenByteConstantSection(0),
- SixteenByteConstantSection_(0),
GlobalDirective("\t.globl\t"),
SetDirective(0),
LCOMMDirective(0),
ConstantPoolSection = "\t.const\n";
JumpTableDataSection = "\t.const\n";
CStringSection = "\t.cstring";
- FourByteConstantSection = "\t.literal4\n";
- EightByteConstantSection = "\t.literal8\n";
// FIXME: Why don't always use this section?
if (is64Bit) {
- SixteenByteConstantSection = "\t.literal16\n";
- SixteenByteConstantSection_ = getUnnamedSection("\t.literal16\n",
- SectionFlags::Mergeable);
+ SixteenByteConstantSection = getUnnamedSection("\t.literal16\n",
+ SectionFlags::Mergeable);
}
ReadOnlySection = "\t.const\n";
X86TargetAsmInfo(TM), ELFTargetAsmInfo(TM) {
ReadOnlySection = ".rodata";
- FourByteConstantSection = "\t.section\t.rodata.cst4,\"aM\",@progbits,4";
- EightByteConstantSection = "\t.section\t.rodata.cst8,\"aM\",@progbits,8";
- SixteenByteConstantSection = "\t.section\t.rodata.cst16,\"aM\",@progbits,16";
CStringSection = ".rodata.str";
PrivateGlobalPrefix = ".L";
WeakRefDirective = "\t.weak\t";