diff options
Diffstat (limited to 'lib/Target/BPF/BPFInstrFormats.td')
-rw-r--r-- | lib/Target/BPF/BPFInstrFormats.td | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/lib/Target/BPF/BPFInstrFormats.td b/lib/Target/BPF/BPFInstrFormats.td new file mode 100644 index 000000000000..53f3ad623587 --- /dev/null +++ b/lib/Target/BPF/BPFInstrFormats.td @@ -0,0 +1,33 @@ +//===-- 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; +} |