brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.0 KiB · 1fc364d Raw
66 lines · plain
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-exception6//7//===----------------------------------------------------------------------===//8 9include "llvm/Target/Target.td"10 11include "BPFRegisterInfo.td"12include "BPFCallingConv.td"13include "BPFInstrInfo.td"14include "GISel/BPFRegisterBanks.td"15 16 17defm : RemapAllTargetPseudoPointerOperands<GPR>;18 19def BPFInstrInfo : InstrInfo;20 21class Proc<string Name, list<SubtargetFeature> Features>22 : Processor<Name, NoItineraries, Features>;23 24def DummyFeature : SubtargetFeature<"dummy", "isDummyMode",25                                    "true", "unused feature">;26 27def ALU32 : SubtargetFeature<"alu32", "HasAlu32", "true",28                             "Enable ALU32 instructions">;29 30def DwarfRIS: SubtargetFeature<"dwarfris", "UseDwarfRIS", "true",31                               "Disable MCAsmInfo DwarfUsesRelocationsAcrossSections">;32 33def MisalignedMemAccess : SubtargetFeature<"allows-misaligned-mem-access",34                                           "AllowsMisalignedMemAccess", "true",35                                           "Allows misaligned memory access">;36 37def : Proc<"generic", []>;38def : Proc<"v1", []>;39def : Proc<"v2", []>;40def : Proc<"v3", [ALU32]>;41def : Proc<"v4", [ALU32]>;42def : Proc<"probe", []>;43 44def BPFInstPrinter : AsmWriter {45  string AsmWriterClassName  = "InstPrinter";46  bit isMCAsmWriter = 1;47}48 49def BPFAsmParser : AsmParser {50  bit HasMnemonicFirst = 0;51}52 53def BPFAsmParserVariant : AsmParserVariant {54  int Variant = 0;55  string Name = "BPF";56  string BreakCharacters = ".";57  string TokenizingCharacters = "#()[]=:.<>!+*%/";58}59 60def BPF : Target {61  let InstructionSet = BPFInstrInfo;62  let AssemblyWriters = [BPFInstPrinter];63  let AssemblyParsers = [BPFAsmParser];64  let AssemblyParserVariants = [BPFAsmParserVariant];65}66