aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrFormats.td
blob: 8bbf3e9ec87be50c61fadc3f3d7ec90353a2fd21 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// WebAssemblyInstrFormats.td - WebAssembly Instruction Formats -*- tblgen -*-//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// WebAssembly instruction format definitions.
//
//===----------------------------------------------------------------------===//

// WebAssembly Instruction Format
class WebAssemblyInst<string cstr> : Instruction {
  field bits<0> Inst; // Instruction encoding.
  let Namespace   = "WebAssembly";
  let Pattern     = [];
  let Constraints = cstr;
}

// Normal instructions
class I<dag oops, dag iops, list<dag> pattern, string cstr = "">
    : WebAssemblyInst<cstr> {
  dag OutOperandList = oops;
  dag InOperandList  = iops;
  let Pattern        = pattern;
}