32-bit darwin targets support .literal16 too.
authorChris Lattner <sabre@nondot.org>
Mon, 27 Jul 2009 15:44:04 +0000 (15:44 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 27 Jul 2009 15:44:04 +0000 (15:44 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77191 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/DarwinTargetAsmInfo.cpp
lib/Target/X86/X86TargetAsmInfo.cpp

index 4ac9eae94bc73a11a2a6a6ccbd31acd09dffc2c4..244b689a552e377cc8714733b70cd357497d0b60 100644 (file)
@@ -34,10 +34,8 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM)
                                                SectionKind::MergeableConst4);
   EightByteConstantSection = getOrCreateSection("\t.literal8\n", true,
                                                 SectionKind::MergeableConst8);
-
-  // Note: 16-byte constant section is subtarget specific and should be provided
-  // there, if needed.
-  SixteenByteConstantSection = 0;
+  SixteenByteConstantSection = 
+    getOrCreateSection("\t.literal16\n", true, SectionKind::MergeableConst16);
 
   ReadOnlySection = getOrCreateSection("\t.const", true, SectionKind::ReadOnly);
 
@@ -150,7 +148,7 @@ DarwinTargetAsmInfo::SelectSectionForGlobal(const GlobalValue *GV,
       return FourByteConstantSection;
     if (Kind.isMergeableConst8())
       return EightByteConstantSection;
-    if (Kind.isMergeableConst16() && SixteenByteConstantSection)
+    if (Kind.isMergeableConst16())
       return SixteenByteConstantSection;
     return ReadOnlySection;  // .const
   }
@@ -196,7 +194,7 @@ DarwinTargetAsmInfo::getSectionForMergeableConstant(SectionKind Kind) const {
     return FourByteConstantSection;
   if (Kind.isMergeableConst8())
     return EightByteConstantSection;
-  if (Kind.isMergeableConst16() && SixteenByteConstantSection)
+  if (Kind.isMergeableConst16())
     return SixteenByteConstantSection;
   return ReadOnlySection;  // .const
 }
index c2ac9f2ff4cd686f7708058029b204d4befa9c4b..06f5a0b986ecf730647f6e33144276fa0d0e56a4 100644 (file)
@@ -55,10 +55,6 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
     ConstantPoolSection = "\t.const_data";
   else
     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";
 
   // Leopard and above support aligned common symbols.