2016-04-22 02:56:45 +08:00
|
|
|
//===-- HexagonTargetObjectFile.h -----------------------------------------===//
|
2011-12-13 05:14:40 +08:00
|
|
|
//
|
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
2014-08-14 00:26:38 +08:00
|
|
|
#ifndef LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
|
|
|
|
#define LLVM_LIB_TARGET_HEXAGON_HEXAGONTARGETOBJECTFILE_H
|
2011-12-13 05:14:40 +08:00
|
|
|
|
|
|
|
#include "llvm/CodeGen/TargetLoweringObjectFileImpl.h"
|
|
|
|
#include "llvm/MC/MCSectionELF.h"
|
|
|
|
|
|
|
|
namespace llvm {
|
|
|
|
|
|
|
|
class HexagonTargetObjectFile : public TargetLoweringObjectFileELF {
|
|
|
|
public:
|
2014-03-02 17:09:27 +08:00
|
|
|
void Initialize(MCContext &Ctx, const TargetMachine &TM) override;
|
2011-12-13 05:14:40 +08:00
|
|
|
|
2015-05-22 03:20:38 +08:00
|
|
|
MCSection *SelectSectionForGlobal(const GlobalValue *GV, SectionKind Kind,
|
2016-04-22 02:56:45 +08:00
|
|
|
Mangler &Mang, const TargetMachine &TM) const override;
|
|
|
|
|
|
|
|
MCSection *getExplicitSectionGlobal(const GlobalValue *GV, SectionKind Kind,
|
|
|
|
Mangler &Mang, const TargetMachine &TM) const override;
|
|
|
|
|
|
|
|
bool isGlobalInSmallSection(const GlobalValue *GV, const TargetMachine &TM)
|
|
|
|
const;
|
|
|
|
|
|
|
|
bool isSmallDataEnabled() const;
|
|
|
|
|
|
|
|
unsigned getSmallDataSize() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
MCSectionELF *SmallDataSection;
|
|
|
|
MCSectionELF *SmallBSSSection;
|
|
|
|
|
|
|
|
unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV,
|
|
|
|
const TargetMachine &TM) const;
|
|
|
|
|
|
|
|
MCSection *selectSmallSectionForGlobal(const GlobalValue *GV,
|
|
|
|
SectionKind Kind, Mangler &Mang, const TargetMachine &TM) const;
|
2011-12-13 05:14:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|