diff options
| author | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-07-22 15:26:53 +0000 |
|---|---|---|
| committer | Bruno Cardoso Lopes <bruno.cardoso@gmail.com> | 2008-07-22 15:26:53 +0000 |
| commit | 9cfd2f8e577789cf9ddf4792ceee0d2ccd825921 (patch) | |
| tree | a1842af56409c54b12ed62d07f18161fb4df497b /llvm | |
| parent | 6bb53303e196a052bd1f4aa5a55521f2d2150e18 (diff) | |
| download | bcm5719-llvm-9cfd2f8e577789cf9ddf4792ceee0d2ccd825921.tar.gz bcm5719-llvm-9cfd2f8e577789cf9ddf4792ceee0d2ccd825921.zip | |
Basic support for small sections
llvm-svn: 53907
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/include/llvm/Target/TargetAsmInfo.h | 27 | ||||
| -rw-r--r-- | llvm/lib/Target/TargetAsmInfo.cpp | 3 |
2 files changed, 30 insertions, 0 deletions
diff --git a/llvm/include/llvm/Target/TargetAsmInfo.h b/llvm/include/llvm/Target/TargetAsmInfo.h index 1bde72e2d01..98247e8d801 100644 --- a/llvm/include/llvm/Target/TargetAsmInfo.h +++ b/llvm/include/llvm/Target/TargetAsmInfo.h @@ -39,6 +39,9 @@ namespace llvm { 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 @@ namespace llvm { 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",@progbits". @@ -549,6 +567,15 @@ namespace llvm { 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; } diff --git a/llvm/lib/Target/TargetAsmInfo.cpp b/llvm/lib/Target/TargetAsmInfo.cpp index 2be9440f3b4..9125546ff40 100644 --- a/llvm/lib/Target/TargetAsmInfo.cpp +++ b/llvm/lib/Target/TargetAsmInfo.cpp @@ -34,6 +34,9 @@ TargetAsmInfo::TargetAsmInfo() : BSSSection_(0), ReadOnlySection(0), ReadOnlySection_(0), + SmallDataSection(0), + SmallBSSSection(0), + SmallRODataSection(0), TLSDataSection("\t.section .tdata,\"awT\",@progbits"), TLSDataSection_(0), TLSBSSSection("\t.section .tbss,\"awT\",@nobits"), |

