[InstCombine] Signed saturation patterns
[llvm-complete.git] / lib / Target / BPF / MCTargetDesc / BPFMCAsmInfo.h
blob04a6a87cebc9e908428449c934a892299f1d77eb
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.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
14 #define LLVM_LIB_TARGET_BPF_MCTARGETDESC_BPFMCASMINFO_H
16 #include "llvm/ADT/Triple.h"
17 #include "llvm/MC/MCAsmInfo.h"
19 namespace llvm {
20 class Target;
22 class BPFMCAsmInfo : public MCAsmInfo {
23 public:
24 explicit BPFMCAsmInfo(const Triple &TT) {
25 if (TT.getArch() == Triple::bpfeb)
26 IsLittleEndian = false;
28 PrivateGlobalPrefix = ".L";
29 WeakRefDirective = "\t.weak\t";
31 UsesELFSectionDirectiveForBSS = true;
32 HasSingleParameterDotFile = true;
33 HasDotTypeDotSizeDirective = true;
35 SupportsDebugInformation = true;
36 ExceptionsType = ExceptionHandling::DwarfCFI;
37 MinInstAlignment = 8;
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.
44 CodePointerSize = 8;
47 void setDwarfUsesRelocationsAcrossSections(bool enable) {
48 DwarfUsesRelocationsAcrossSections = enable;
53 #endif