]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/lib/Target/BPF/BPF.td
MFV r339640,339641,339644:
[FreeBSD/FreeBSD.git] / contrib / llvm / lib / Target / BPF / BPF.td
1 //===-- BPF.td - Describe the BPF Target Machine -----------*- tablegen -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 include "llvm/Target/Target.td"
11
12 include "BPFRegisterInfo.td"
13 include "BPFCallingConv.td"
14 include "BPFInstrInfo.td"
15
16 def BPFInstrInfo : InstrInfo;
17
18 class Proc<string Name, list<SubtargetFeature> Features>
19  : Processor<Name, NoItineraries, Features>;
20
21 def : Proc<"generic", []>;
22 def : Proc<"v1", []>;
23 def : Proc<"v2", []>;
24 def : Proc<"probe", []>;
25
26 def DummyFeature : SubtargetFeature<"dummy", "isDummyMode",
27                                     "true", "unused feature">;
28
29 def BPFInstPrinter : AsmWriter {
30   string AsmWriterClassName  = "InstPrinter";
31   bit isMCAsmWriter = 1;
32 }
33
34 def BPFAsmParser : AsmParser {
35   bit HasMnemonicFirst = 0;
36 }
37
38 def BPFAsmParserVariant : AsmParserVariant {
39   int Variant = 0;
40   string Name = "BPF";
41   string BreakCharacters = ".";
42   string TokenizingCharacters = "#()[]=:.<>!+*";
43 }
44
45 def BPF : Target {
46   let InstructionSet = BPFInstrInfo;
47   let AssemblyWriters = [BPFInstPrinter];
48   let AssemblyParsers = [BPFAsmParser];
49   let AssemblyParserVariants = [BPFAsmParserVariant];
50 }