llvm-project/llvm/lib/Target/BPF/BPFInstrFormats.td

34 lines
892 B
TableGen

//===-- BPFInstrFormats.td - BPF Instruction Formats -------*- tablegen -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
class InstBPF<dag outs, dag ins, string asmstr, list<dag> pattern>
: Instruction {
field bits<64> Inst;
field bits<64> SoftFail = 0;
let Size = 8;
let Namespace = "BPF";
let DecoderNamespace = "BPF";
bits<3> BPFClass;
let Inst{58-56} = BPFClass;
dag OutOperandList = outs;
dag InOperandList = ins;
let AsmString = asmstr;
let Pattern = pattern;
}
// Pseudo instructions
class Pseudo<dag outs, dag ins, string asmstr, list<dag> pattern>
: InstBPF<outs, ins, asmstr, pattern> {
let Inst{63-0} = 0;
let isPseudo = 1;
}