LLVM 24.0.0git
BPFMCAsmInfo.h
Go to the documentation of this file.
1//===-- BPFMCAsmInfo.h - BPF asm properties -------------------*- 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// This file contains the declaration of the BPFMCAsmInfo class.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
14#define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
15
18
19namespace llvm {
20
21class BPFMCAsmInfo : public MCAsmInfoELF {
22public:
23 explicit BPFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options)
25 if (TT.getArch() == Triple::bpfeb)
26 IsLittleEndian = false;
27
29 WeakRefDirective = "\t.weak\t";
30
34 HasIdentDirective = false;
35
38
39 // the default is 4 and it only affects dwarf elf output
40 // so if not set correctly, the dwarf data will be
41 // messed up in random places by 4 bytes. .debug_line
42 // section will be parsable, but with odd offsets and
43 // line numbers, etc.
45 }
46
50
51 MCSection *getStackSection(MCContext &Ctx, bool Exec) const override {
52 return nullptr;
53 }
54};
55}
56
57#endif
static LVOptions Options
Definition LVOptions.cpp:25
MCSection * getStackSection(MCContext &Ctx, bool Exec) const override
Targets can implement this method to specify a section to switch to depending on whether the translat...
BPFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options)
void setDwarfUsesRelocationsAcrossSections(bool enable)
MCAsmInfoELF(const MCTargetOptions &Options)
StringRef InternalSymbolPrefix
For internal use by compiler and assembler, not meant to be visible externally.
Definition MCAsmInfo.h:159
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition MCAsmInfo.h:122
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition MCAsmInfo.h:326
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition MCAsmInfo.h:307
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition MCAsmInfo.h:261
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition MCAsmInfo.h:357
bool HasIdentDirective
True if the target has a .ident directive, this is true for ELF targets.
Definition MCAsmInfo.h:315
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
Definition MCAsmInfo.h:369
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition MCAsmInfo.h:311
bool IsLittleEndian
True if target is little endian. Default is true.
Definition MCAsmInfo.h:93
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition MCAsmInfo.h:86
Context object for machine code objects.
Definition MCContext.h:83
Instances of this class represent a uniqued identifier for a section in the current translation unit.
Definition MCSection.h:580
Triple - Helper class for working with autoconf configuration names.
Definition Triple.h:48
This is an optimization pass for GlobalISel generic memory operations.