[llvm-commits] [llvm] r53907 - in /llvm/trunk: include/llvm/Target/TargetAsmInfo.h lib/Target/TargetAsmInfo.cpp

Bruno Cardoso Lopes bruno.cardoso at gmail.com
Tue Jul 22 08:26:56 PDT 2008


Author: bruno
Date: Tue Jul 22 10:26:53 2008
New Revision: 53907

URL: http://llvm.org/viewvc/llvm-project?rev=53907&view=rev
Log:
Basic support for small sections

Modified:
    llvm/trunk/include/llvm/Target/TargetAsmInfo.h
    llvm/trunk/lib/Target/TargetAsmInfo.cpp

Modified: llvm/trunk/include/llvm/Target/TargetAsmInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetAsmInfo.h?rev=53907&r1=53906&r2=53907&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetAsmInfo.h (original)
+++ llvm/trunk/include/llvm/Target/TargetAsmInfo.h Tue Jul 22 10:26:53 2008
@@ -39,6 +39,9 @@
       ROData,           ///< Readonly data section
       RODataMergeStr,   ///< Readonly data section (mergeable strings)
       RODataMergeConst, ///< Readonly data section (mergeable constants)
+      SmallData,        ///< Small data section
+      SmallBSS,         ///< Small bss section     
+      SmallROData,      ///< Small readonly section     
       ThreadData,       ///< Initialized TLS data objects
       ThreadBSS         ///< Uninitialized TLS data objects
     };
@@ -119,6 +122,21 @@
     const char *ReadOnlySection;          // Defaults to NULL
     const Section *ReadOnlySection_;
 
+    /// SmallDataSection - This is the directive that is emitted to switch to a
+    /// small data section.
+    ///
+    const Section *SmallDataSection;      // Defaults to NULL
+
+    /// SmallBSSSection - This is the directive that is emitted to switch to a
+    /// small bss section.
+    ///
+    const Section *SmallBSSSection;       // Defaults to NULL
+
+    /// SmallRODataSection - This is the directive that is emitted to switch to 
+    /// a small read-only data section.
+    ///
+    const Section *SmallRODataSection;    // Defaults to NULL
+
     /// TLSDataSection - Section directive for Thread Local data.
     ///
     const char *TLSDataSection;// Defaults to ".section .tdata,"awT", at progbits".
@@ -549,6 +567,15 @@
     const Section *getReadOnlySection_() const {
       return ReadOnlySection_;
     }
+    const Section *getSmallDataSection() const {
+      return SmallDataSection;
+    }
+    const Section *getSmallBSSSection() const {
+      return SmallBSSSection;
+    }
+    const Section *getSmallRODataSection() const {
+      return SmallRODataSection;
+    }
     const char *getTLSDataSection() const {
       return TLSDataSection;
     }

Modified: llvm/trunk/lib/Target/TargetAsmInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetAsmInfo.cpp?rev=53907&r1=53906&r2=53907&view=diff

==============================================================================
--- llvm/trunk/lib/Target/TargetAsmInfo.cpp (original)
+++ llvm/trunk/lib/Target/TargetAsmInfo.cpp Tue Jul 22 10:26:53 2008
@@ -34,6 +34,9 @@
   BSSSection_(0),
   ReadOnlySection(0),
   ReadOnlySection_(0),
+  SmallDataSection(0),
+  SmallBSSSection(0),
+  SmallRODataSection(0),
   TLSDataSection("\t.section .tdata,\"awT\", at progbits"),
   TLSDataSection_(0),
   TLSBSSSection("\t.section .tbss,\"awT\", at nobits"),





More information about the llvm-commits mailing list