LLVM 20.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#include "M68kTargetMachine.h"
18
20#include "llvm/IR/DataLayout.h"
23#include "llvm/MC/MCContext.h"
27
28using namespace llvm;
29
31 "m68k-ssection-threshold", cl::Hidden,
32 cl::desc("Small data and bss section threshold size (default=8)"),
33 cl::init(8));
34
36 const TargetMachine &TM) {
38 InitializeELF(TM.Options.UseInitArray);
39
40 this->TM = &static_cast<const M68kTargetMachine &>(TM);
41
42 // FIXME do we need `.sdata` and `.sbss` explicitly?
43 SmallDataSection = getContext().getELFSection(
45
46 SmallBSSSection = getContext().getELFSection(".sbss", ELF::SHT_NOBITS,
48}
This file declares the M68k specific subclass of TargetSubtargetInfo.
This file declares the M68k specific subclass of TargetMachine.
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.
const char LLVMTargetMachineRef TM
void Initialize(MCContext &Ctx, const TargetMachine &TM) 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:551
MCContext & getContext() const
void Initialize(MCContext &Ctx, const TargetMachine &TM) override
This method must be called before any actual lowering is done.
Primary interface to the complete machine description for the target machine.
Definition: TargetMachine.h:77
@ SHT_PROGBITS
Definition: ELF.h:1089
@ SHT_NOBITS
Definition: ELF.h:1096
@ SHF_ALLOC
Definition: ELF.h:1186
@ SHF_WRITE
Definition: ELF.h:1183
initializer< Ty > init(const Ty &Val)
Definition: CommandLine.h:443
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18