Reapply address space patch after fixing an issue in MemCopyOptimizer.
[oota-llvm.git] / lib / Target / XCore / MCSectionXCore.h
1 //===- MCSectionXCore.h - XCore-specific section representation -*- C++ -*-===//
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 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the MCSectionXCore class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_MCSECTION_XCORE_H
15 #define LLVM_MCSECTION_XCORE_H
16
17 #include "llvm/MC/MCSectionELF.h"
18
19 namespace llvm {
20   
21 class MCSectionXCore : public MCSectionELF {
22   MCSectionXCore(const StringRef &Section, unsigned Type, unsigned Flags,
23                  SectionKind K, bool isExplicit)
24     : MCSectionELF(Section, Type, Flags, K, isExplicit) {}
25   
26 public:
27   
28   enum {
29     /// SHF_CP_SECTION - All sections with the "c" flag are grouped together
30     /// by the linker to form the constant pool and the cp register is set to
31     /// the start of the constant pool by the boot code.
32     SHF_CP_SECTION = FIRST_TARGET_DEP_FLAG,
33     
34     /// SHF_DP_SECTION - All sections with the "d" flag are grouped together
35     /// by the linker to form the data section and the dp register is set to
36     /// the start of the section by the boot code.
37     SHF_DP_SECTION = FIRST_TARGET_DEP_FLAG << 1
38   };
39   
40   static MCSectionXCore *Create(const StringRef &Section, unsigned Type,
41                                 unsigned Flags, SectionKind K,
42                                 bool isExplicit, MCContext &Ctx);
43   
44   
45   /// PrintTargetSpecificSectionFlags - This handles the XCore-specific cp/dp
46   /// section flags.
47   virtual void PrintTargetSpecificSectionFlags(const MCAsmInfo &MAI,
48                                                raw_ostream &OS) const;
49
50 };
51   
52 } // end namespace llvm
53
54 #endif