mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 22:28:18 +00:00
32-bit darwin targets support .literal16 too.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77191 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -34,10 +34,8 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
|
|||||||
SectionKind::MergeableConst4);
|
SectionKind::MergeableConst4);
|
||||||
EightByteConstantSection = getOrCreateSection("\t.literal8\n", true,
|
EightByteConstantSection = getOrCreateSection("\t.literal8\n", true,
|
||||||
SectionKind::MergeableConst8);
|
SectionKind::MergeableConst8);
|
||||||
|
SixteenByteConstantSection =
|
||||||
// Note: 16-byte constant section is subtarget specific and should be provided
|
getOrCreateSection("\t.literal16\n", true, SectionKind::MergeableConst16);
|
||||||
// there, if needed.
|
|
||||||
SixteenByteConstantSection = 0;
|
|
||||||
|
|
||||||
ReadOnlySection = getOrCreateSection("\t.const", true, SectionKind::ReadOnly);
|
ReadOnlySection = getOrCreateSection("\t.const", true, SectionKind::ReadOnly);
|
||||||
|
|
||||||
@@ -150,7 +148,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
|
|||||||
return FourByteConstantSection;
|
return FourByteConstantSection;
|
||||||
if (Kind.isMergeableConst8())
|
if (Kind.isMergeableConst8())
|
||||||
return EightByteConstantSection;
|
return EightByteConstantSection;
|
||||||
if (Kind.isMergeableConst16() && SixteenByteConstantSection)
|
if (Kind.isMergeableConst16())
|
||||||
return SixteenByteConstantSection;
|
return SixteenByteConstantSection;
|
||||||
return ReadOnlySection; // .const
|
return ReadOnlySection; // .const
|
||||||
}
|
}
|
||||||
@@ -196,7 +194,7 @@ DarwinTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
|
|||||||
return FourByteConstantSection;
|
return FourByteConstantSection;
|
||||||
if (Kind.isMergeableConst8())
|
if (Kind.isMergeableConst8())
|
||||||
return EightByteConstantSection;
|
return EightByteConstantSection;
|
||||||
if (Kind.isMergeableConst16() && SixteenByteConstantSection)
|
if (Kind.isMergeableConst16())
|
||||||
return SixteenByteConstantSection;
|
return SixteenByteConstantSection;
|
||||||
return ReadOnlySection; // .const
|
return ReadOnlySection; // .const
|
||||||
}
|
}
|
||||||
|
@@ -55,10 +55,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
|
|||||||
ConstantPoolSection = "\t.const_data";
|
ConstantPoolSection = "\t.const_data";
|
||||||
else
|
else
|
||||||
ConstantPoolSection = "\t.const\n";
|
ConstantPoolSection = "\t.const\n";
|
||||||
// FIXME: Why don't we always use this section?
|
|
||||||
if (is64Bit)
|
|
||||||
SixteenByteConstantSection =
|
|
||||||
getOrCreateSection("\t.literal16\n", true, SectionKind::MergeableConst16);
|
|
||||||
LCOMMDirective = "\t.lcomm\t";
|
LCOMMDirective = "\t.lcomm\t";
|
||||||
|
|
||||||
// Leopard and above support aligned common symbols.
|
// Leopard and above support aligned common symbols.
|
||||||
|
Reference in New Issue
Block a user