LLVM  14.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 
16 #include "llvm/ADT/Triple.h"
17 #include "llvm/MC/MCAsmInfo.h"
18 
19 namespace llvm {
20 
21 class BPFMCAsmInfo : public MCAsmInfo {
22 public:
23  explicit BPFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options) {
24  if (TT.getArch() == Triple::bpfeb)
25  IsLittleEndian = false;
26 
27  PrivateGlobalPrefix = ".L";
28  WeakRefDirective = "\t.weak\t";
29 
33 
36  MinInstAlignment = 8;
37 
38  // the default is 4 and it only affects dwarf elf output
39  // so if not set correctly, the dwarf data will be
40  // messed up in random places by 4 bytes. .debug_line
41  // section will be parsable, but with odd offsets and
42  // line numbers, etc.
43  CodePointerSize = 8;
44 
45  UseIntegratedAssembler = false;
46  }
47 
50  }
51 };
52 }
53 
54 #endif
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
llvm::Triple::bpfeb
@ bpfeb
Definition: Triple.h:58
llvm::MCAsmInfo
This class is intended to be used as a base class for asm properties and features specific to the tar...
Definition: MCAsmInfo.h:56
llvm::MCAsmInfo::SupportsDebugInformation
bool SupportsDebugInformation
True if target supports emission of debugging information.
Definition: MCAsmInfo.h:445
llvm::Triple
Triple - Helper class for working with autoconf configuration names.
Definition: Triple.h:45
llvm::MCAsmInfo::UsesELFSectionDirectiveForBSS
bool UsesELFSectionDirectiveForBSS
This is true if this target uses ELF '.section' directive before the '.bss' one.
Definition: MCAsmInfo.h:319
llvm::BPFMCAsmInfo
Definition: BPFMCAsmInfo.h:21
llvm::MCAsmInfo::DwarfUsesRelocationsAcrossSections
bool DwarfUsesRelocationsAcrossSections
True if Dwarf2 output generally uses relocations for references to other .debug_* sections.
Definition: MCAsmInfo.h:459
llvm::MCAsmInfo::PrivateGlobalPrefix
StringRef PrivateGlobalPrefix
This prefix is used for globals like constant pool entries that are completely private to the ....
Definition: MCAsmInfo.h:168
llvm::MCAsmInfo::HasSingleParameterDotFile
bool HasSingleParameterDotFile
True if the target has a single parameter .file directive, this is true for ELF targets.
Definition: MCAsmInfo.h:391
llvm::MCAsmInfo::MinInstAlignment
unsigned MinInstAlignment
Every possible instruction length is a multiple of this value.
Definition: MCAsmInfo.h:115
Options
const char LLVMTargetMachineRef LLVMPassBuilderOptionsRef Options
Definition: PassBuilderBindings.cpp:48
llvm::MCAsmInfo::UseIntegratedAssembler
bool UseIntegratedAssembler
Should we use the integrated assembler? The integrated assembler should be enabled by default (by the...
Definition: MCAsmInfo.h:502
llvm::MCAsmInfo::HasDotTypeDotSizeDirective
bool HasDotTypeDotSizeDirective
True if the target has .type and .size directives, this is true for most ELF targets.
Definition: MCAsmInfo.h:387
llvm::MCAsmInfo::WeakRefDirective
const char * WeakRefDirective
This directive, if non-null, is used to declare a global as being a weak undefined symbol.
Definition: MCAsmInfo.h:414
llvm::MCAsmInfo::CodePointerSize
unsigned CodePointerSize
Code pointer size in bytes. Default is 4.
Definition: MCAsmInfo.h:72
llvm::MCTargetOptions
Definition: MCTargetOptions.h:36
Triple.h
llvm::BPFMCAsmInfo::BPFMCAsmInfo
BPFMCAsmInfo(const Triple &TT, const MCTargetOptions &Options)
Definition: BPFMCAsmInfo.h:23
llvm::BPFMCAsmInfo::setDwarfUsesRelocationsAcrossSections
void setDwarfUsesRelocationsAcrossSections(bool enable)
Definition: BPFMCAsmInfo.h:48
MCAsmInfo.h
llvm::MCAsmInfo::ExceptionsType
ExceptionHandling ExceptionsType
Exception handling format for the target. Defaults to None.
Definition: MCAsmInfo.h:448
llvm::ExceptionHandling::DwarfCFI
@ DwarfCFI
DWARF-like instruction based exceptions.
llvm::MCAsmInfo::IsLittleEndian
bool IsLittleEndian
True if target is little endian. Default is true.
Definition: MCAsmInfo.h:79