Akira Hatanaka | 0bf3dfb | 2011-04-15 21:00:26 +0000 | [diff] [blame^] | 1 | //===-- llvm/Target/MipsTargetObjectFile.h - Mips Object Info --*- C++ -*-===// |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
Akira Hatanaka | 0bf3dfb | 2011-04-15 21:00:26 +0000 | [diff] [blame^] | 8 | //===---------------------------------------------------------------------===// |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 9 | |
| 10 | #ifndef LLVM_TARGET_MIPS_TARGETOBJECTFILE_H |
| 11 | #define LLVM_TARGET_MIPS_TARGETOBJECTFILE_H |
| 12 | |
Anton Korobeynikov | 362dd0b | 2010-02-15 22:37:53 +0000 | [diff] [blame] | 13 | #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 14 | |
| 15 | namespace llvm { |
| 16 | |
| 17 | class MipsTargetObjectFile : public TargetLoweringObjectFileELF { |
| 18 | const MCSection *SmallDataSection; |
| 19 | const MCSection *SmallBSSSection; |
| 20 | public: |
Bruno Cardoso Lopes | 81092dc | 2011-03-04 17:51:39 +0000 | [diff] [blame] | 21 | |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 22 | void Initialize(MCContext &Ctx, const TargetMachine &TM); |
| 23 | |
Bruno Cardoso Lopes | 81092dc | 2011-03-04 17:51:39 +0000 | [diff] [blame] | 24 | |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 25 | /// IsGlobalInSmallSection - Return true if this global address should be |
| 26 | /// placed into small data/bss section. |
| 27 | bool IsGlobalInSmallSection(const GlobalValue *GV, |
Akira Hatanaka | 0bf3dfb | 2011-04-15 21:00:26 +0000 | [diff] [blame^] | 28 | const TargetMachine &TM, |
| 29 | SectionKind Kind) const; |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 30 | bool IsGlobalInSmallSection(const GlobalValue *GV, |
Bruno Cardoso Lopes | 81092dc | 2011-03-04 17:51:39 +0000 | [diff] [blame] | 31 | const TargetMachine &TM) const; |
| 32 | |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 33 | const MCSection *SelectSectionForGlobal(const GlobalValue *GV, |
| 34 | SectionKind Kind, |
| 35 | Mangler *Mang, |
| 36 | const TargetMachine &TM) const; |
Bruno Cardoso Lopes | 81092dc | 2011-03-04 17:51:39 +0000 | [diff] [blame] | 37 | |
Chris Lattner | b71b909 | 2009-08-13 06:28:06 +0000 | [diff] [blame] | 38 | // TODO: Classify globals as mips wishes. |
| 39 | }; |
| 40 | } // end namespace llvm |
| 41 | |
| 42 | #endif |