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
|
|
|
|
2016-10-25 03:23:39 +08:00
|
|
|
MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind,
|
2016-09-16 15:33:15 +08:00
|
|
|
const TargetMachine &TM) const override;
|
2016-04-22 02:56:45 +08:00
|
|
|
|
2016-10-25 03:23:39 +08:00
|
|
|
MCSection *getExplicitSectionGlobal(const GlobalObject *GO,
|
|
|
|
SectionKind Kind,
|
2016-09-16 15:33:15 +08:00
|
|
|
const TargetMachine &TM) const override;
|
2016-04-22 02:56:45 +08:00
|
|
|
|
2016-10-25 03:23:39 +08:00
|
|
|
bool isGlobalInSmallSection(const GlobalObject *GO,
|
|
|
|
const TargetMachine &TM) const;
|
2016-04-22 02:56:45 +08:00
|
|
|
|
|
|
|
bool isSmallDataEnabled() const;
|
|
|
|
|
|
|
|
unsigned getSmallDataSize() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
MCSectionELF *SmallDataSection;
|
|
|
|
MCSectionELF *SmallBSSSection;
|
|
|
|
|
|
|
|
unsigned getSmallestAddressableSize(const Type *Ty, const GlobalValue *GV,
|
|
|
|
const TargetMachine &TM) const;
|
|
|
|
|
2016-10-25 03:23:39 +08:00
|
|
|
MCSection *selectSmallSectionForGlobal(const GlobalObject *GO,
|
2016-09-16 15:33:15 +08:00
|
|
|
SectionKind Kind,
|
|
|
|
const TargetMachine &TM) const;
|
2011-12-13 05:14:40 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace llvm
|
|
|
|
|
|
|
|
#endif
|