LLVM API Documentation

MCSectionXCore.h

Go to the documentation of this file.
00001 //===- MCSectionXCore.h - XCore-specific section representation -*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file declares the MCSectionXCore class.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 
00014 #ifndef LLVM_MCSECTION_XCORE_H
00015 #define LLVM_MCSECTION_XCORE_H
00016 
00017 #include "llvm/MC/MCSectionELF.h"
00018 
00019 namespace llvm {
00020   
00021 class MCSectionXCore : public MCSectionELF {
00022   MCSectionXCore(const StringRef &Section, unsigned Type, unsigned Flags,
00023                  SectionKind K, bool isExplicit)
00024     : MCSectionELF(Section, Type, Flags, K, isExplicit) {}
00025   
00026 public:
00027   
00028   enum {
00029     /// SHF_CP_SECTION - All sections with the "c" flag are grouped together
00030     /// by the linker to form the constant pool and the cp register is set to
00031     /// the start of the constant pool by the boot code.
00032     SHF_CP_SECTION = FIRST_TARGET_DEP_FLAG,
00033     
00034     /// SHF_DP_SECTION - All sections with the "d" flag are grouped together
00035     /// by the linker to form the data section and the dp register is set to
00036     /// the start of the section by the boot code.
00037     SHF_DP_SECTION = FIRST_TARGET_DEP_FLAG << 1
00038   };
00039   
00040   static MCSectionXCore *Create(const StringRef &Section, unsigned Type,
00041                                 unsigned Flags, SectionKind K,
00042                                 bool isExplicit, MCContext &Ctx);
00043   
00044   
00045   /// PrintTargetSpecificSectionFlags - This handles the XCore-specific cp/dp
00046   /// section flags.
00047   virtual void PrintTargetSpecificSectionFlags(const TargetAsmInfo &TAI,
00048                                                raw_ostream &OS) const;
00049 
00050 };
00051   
00052 } // end namespace llvm
00053 
00054 #endif