LLVM 24.0.0git
M68kTargetObjectFile.cpp
Go to the documentation of this file.
1//===-- M68kELFTargetObjectFile.cpp - M68k Object Files ---------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8///
9/// \file
10/// This file contains definitions for M68k ELF object file lowering.
11///
12//===----------------------------------------------------------------------===//
13
15
16#include "M68kSubtarget.h"
17
19#include "llvm/IR/DataLayout.h"
22#include "llvm/MC/MCContext.h"
26
27using namespace llvm;
28
30 "m68k-ssection-threshold", cl::Hidden,
31 cl::desc("Small data and bss section threshold size (default=8)"),
32 cl::init(8));
33
35 const TargetMachine &TM,
36 const Module &M) {
38 InitializeELF(TM.Options.UseInitArray);
39
40 // FIXME do we need `.sdata` and `.sbss` explicitly?
41 SmallDataSection = getContext().getELFSection(
43
44 SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS,
46}
This file declares the M68k specific subclass of TargetSubtargetInfo.
static cl::opt< unsigned > SSThreshold("m68k-ssection-threshold", cl::Hidden, cl::desc("Small data and bss section threshold size (default=8)"), cl::init(8))
This file contains declarations for M68k ELF object file lowering.
void initialize(MCContext &Ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
Context object for machine code objects.
Definition MCContext.h:83
MCSectionELF * getELFSection(const Twine &Section, unsigned Type, unsigned Flags)
Definition MCContext.h:550
MCContext & getContext() const
A Module instance is used to store all the information related to an LLVM module.
Definition Module.h:68
void initialize(MCContext &Ctx, const TargetMachine &TM, const Module &M) override
This method must be called before any actual lowering is done.
Primary interface to the complete machine description for the target machine.
@ SHF_ALLOC
Definition ELF.h:1259
@ SHF_WRITE
Definition ELF.h:1256
@ SHT_PROGBITS
Definition ELF.h:1157
@ SHT_NOBITS
Definition ELF.h:1164
initializer< Ty > init(const Ty &Val)
This is an optimization pass for GlobalISel generic memory operations.