10b57cec5SDimitry Andric //===-- llvm/Target/MipsTargetObjectFile.h - Mips Object Info ---*- C++ -*-===// 20b57cec5SDimitry Andric // 30b57cec5SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 40b57cec5SDimitry Andric // See https://llvm.org/LICENSE.txt for license information. 50b57cec5SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 60b57cec5SDimitry Andric // 70b57cec5SDimitry Andric //===----------------------------------------------------------------------===// 80b57cec5SDimitry Andric 90b57cec5SDimitry Andric #ifndef LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H 100b57cec5SDimitry Andric #define LLVM_LIB_TARGET_MIPS_MIPSTARGETOBJECTFILE_H 110b57cec5SDimitry Andric 120b57cec5SDimitry Andric #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" 130b57cec5SDimitry Andric 140b57cec5SDimitry Andric namespace llvm { 150b57cec5SDimitry Andric class MipsTargetMachine; 160b57cec5SDimitry Andric class MipsTargetObjectFile : public TargetLoweringObjectFileELF { 170b57cec5SDimitry Andric MCSection *SmallDataSection; 180b57cec5SDimitry Andric MCSection *SmallBSSSection; 190b57cec5SDimitry Andric const MipsTargetMachine *TM; 200b57cec5SDimitry Andric 210b57cec5SDimitry Andric bool IsGlobalInSmallSection(const GlobalObject *GO, const TargetMachine &TM, 220b57cec5SDimitry Andric SectionKind Kind) const; 230b57cec5SDimitry Andric bool IsGlobalInSmallSectionImpl(const GlobalObject *GO, 240b57cec5SDimitry Andric const TargetMachine &TM) const; 250b57cec5SDimitry Andric public: 260b57cec5SDimitry Andric 270b57cec5SDimitry Andric void Initialize(MCContext &Ctx, const TargetMachine &TM) override; 280b57cec5SDimitry Andric 290b57cec5SDimitry Andric /// Return true if this global address should be placed into small data/bss 300b57cec5SDimitry Andric /// section. 310b57cec5SDimitry Andric bool IsGlobalInSmallSection(const GlobalObject *GO, 320b57cec5SDimitry Andric const TargetMachine &TM) const; 330b57cec5SDimitry Andric 340b57cec5SDimitry Andric MCSection *SelectSectionForGlobal(const GlobalObject *GO, SectionKind Kind, 350b57cec5SDimitry Andric const TargetMachine &TM) const override; 360b57cec5SDimitry Andric 370b57cec5SDimitry Andric /// Return true if this constant should be placed into small data section. 380b57cec5SDimitry Andric bool IsConstantInSmallSection(const DataLayout &DL, const Constant *CN, 390b57cec5SDimitry Andric const TargetMachine &TM) const; 400b57cec5SDimitry Andric 410b57cec5SDimitry Andric MCSection *getSectionForConstant(const DataLayout &DL, SectionKind Kind, 420b57cec5SDimitry Andric const Constant *C, 43*5ffd83dbSDimitry Andric Align &Alignment) const override; 440b57cec5SDimitry Andric /// Describe a TLS variable address within debug info. 450b57cec5SDimitry Andric const MCExpr *getDebugThreadLocalSymbol(const MCSymbol *Sym) const override; 460b57cec5SDimitry Andric }; 470b57cec5SDimitry Andric } // end namespace llvm 480b57cec5SDimitry Andric 490b57cec5SDimitry Andric #endif 50