]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm-project/llvm/lib/Target/BPF/BPF.td
Merge upstream r948: fix race condition in openpam_ttyconv(3).
[FreeBSD/FreeBSD.git] / contrib / llvm-project / llvm / lib / Target / BPF / BPF.td
1 //===-- BPF.td - Describe the BPF Target Machine -----------*- tablegen -*-===//
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 include "llvm/Target/Target.td"
10
11 include "BPFRegisterInfo.td"
12 include "BPFCallingConv.td"
13 include "BPFInstrInfo.td"
14
15 def BPFInstrInfo : InstrInfo;
16
17 class Proc<string Name, list<SubtargetFeature> Features>
18  : Processor<Name, NoItineraries, Features>;
19
20 def : Proc<"generic", []>;
21 def : Proc<"v1", []>;
22 def : Proc<"v2", []>;
23 def : Proc<"v3", []>;
24 def : Proc<"probe", []>;
25
26 def DummyFeature : SubtargetFeature<"dummy", "isDummyMode",
27                                     "true", "unused feature">;
28
29 def ALU32 : SubtargetFeature<"alu32", "HasAlu32", "true",
30                              "Enable ALU32 instructions">;
31
32 def DwarfRIS: SubtargetFeature<"dwarfris", "UseDwarfRIS", "true",
33                                "Disable MCAsmInfo DwarfUsesRelocationsAcrossSections">;
34
35 def BPFInstPrinter : AsmWriter {
36   string AsmWriterClassName  = "InstPrinter";
37   bit isMCAsmWriter = 1;
38 }
39
40 def BPFAsmParser : AsmParser {
41   bit HasMnemonicFirst = 0;
42 }
43
44 def BPFAsmParserVariant : AsmParserVariant {
45   int Variant = 0;
46   string Name = "BPF";
47   string BreakCharacters = ".";
48   string TokenizingCharacters = "#()[]=:.<>!+*";
49 }
50
51 def BPF : Target {
52   let InstructionSet = BPFInstrInfo;
53   let AssemblyWriters = [BPFInstPrinter];
54   let AssemblyParsers = [BPFAsmParser];
55   let AssemblyParserVariants = [BPFAsmParserVariant];
56 }