Fix a FIXME :)
authorAnton Korobeynikov <asl@math.spbu.ru>
Sat, 19 Jul 2008 13:15:46 +0000 (13:15 +0000)
committerAnton Korobeynikov <asl@math.spbu.ru>
Sat, 19 Jul 2008 13:15:46 +0000 (13:15 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53789 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 971623d5334975a8a3144afca3899c64c2e4566f..311126d01134a4d06ef12efe43855a9007d2128f 100644 (file)
@@ -32,9 +32,9 @@ DarwinTargetAsmInfo::DarwinTargetAsmInfo(const TargetMachine &TM) {
                                                SectionFlags::Mergeable);
   EightByteConstantSection_ = getUnnamedSection("\t.literal8\n",
                                                 SectionFlags::Mergeable);
-  // FIXME: Check for 64 bit
-  SixteenByteConstantSection_ = getUnnamedSection("\t.literal16\n",
-                                                  SectionFlags::Mergeable);
+  // Note: 16-byte constant section is subtarget specific and should be provided
+  // there.
+
   ReadOnlySection_ = getUnnamedSection("\t.const\n", SectionFlags::None);
 
   // FIXME: These should be named sections, really.
@@ -114,9 +114,8 @@ DarwinTargetAsmInfo::MergeableConstSection(const GlobalVariable *GV) const {
     return FourByteConstantSection_;
   else if (Size == 8)
     return EightByteConstantSection_;
-  // FIXME: 64 bit
-  /*else if (Size == 16 && DTM->getSubtarget<X86Subtarget>().is64Bit())
-    return SixteenByteConstantSection_;*/
+  else if (Size == 16 && SixteenByteConstantSection_)
+    return SixteenByteConstantSection_;
 
   return getReadOnlySection_();
 }
index 0e634c6eb9fa2f2a9e0767d646e3c8492f8e9278..f7443c31f777bb5473fb65ae8f63cfe3e2fbd284 100644 (file)
@@ -148,6 +148,8 @@ X86DarwinTargetAsmInfo::X86DarwinTargetAsmInfo(const X86TargetMachine &TM):
   // FIXME: Why don't always use this section?
   if (is64Bit) {
     SixteenByteConstantSection = "\t.literal16\n";
+    SixteenByteConstantSection_ = getUnnamedSection("\t.literal16\n",
+                                                    SectionFlags::Mergeable);
   }
   ReadOnlySection = "\t.const\n";