1 //===-- BPF.td - Describe the BPF Target Machine -----------*- tablegen -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 include "llvm/Target/Target.td"
12 include "BPFRegisterInfo.td"
13 include "BPFCallingConv.td"
14 include "BPFInstrInfo.td"
16 def BPFInstrInfo : InstrInfo;
18 class Proc<string Name, list<SubtargetFeature> Features>
19 : Processor<Name, NoItineraries, Features>;
21 def : Proc<"generic", []>;
24 def : Proc<"probe", []>;
26 def DummyFeature : SubtargetFeature<"dummy", "isDummyMode",
27 "true", "unused feature">;
29 def ALU32 : SubtargetFeature<"alu32", "HasAlu32", "true",
30 "Enable ALU32 instructions">;
32 def DwarfRIS: SubtargetFeature<"dwarfris", "UseDwarfRIS", "true",
33 "Disable MCAsmInfo DwarfUsesRelocationsAcrossSections">;
35 def BPFInstPrinter : AsmWriter {
36 string AsmWriterClassName = "InstPrinter";
37 bit isMCAsmWriter = 1;
40 def BPFAsmParser : AsmParser {
41 bit HasMnemonicFirst = 0;
44 def BPFAsmParserVariant : AsmParserVariant {
47 string BreakCharacters = ".";
48 string TokenizingCharacters = "#()[]=:.<>!+*";
52 let InstructionSet = BPFInstrInfo;
53 let AssemblyWriters = [BPFInstPrinter];
54 let AssemblyParsers = [BPFAsmParser];
55 let AssemblyParserVariants = [BPFAsmParserVariant];