WebAssemblyInstrFormats.td revision 285163
1// WebAssemblyInstrFormats.td - WebAssembly Instruction Formats -*- tblgen -*-//
2//
3//                     The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//
9//
10// WebAssembly instruction format definitions.
11//
12//===----------------------------------------------------------------------===//
13
14// WebAssembly Instruction Format
15class WebAssemblyInst<string cstr> : Instruction {
16  field bits<0> Inst; // Instruction encoding.
17  let Namespace   = "WebAssembly";
18  let Pattern     = [];
19  let Constraints = cstr;
20}
21
22// Normal instructions
23class I<dag oops, dag iops, list<dag> pattern, string cstr = "">
24    : WebAssemblyInst<cstr> {
25  dag OutOperandList = oops;
26  dag InOperandList  = iops;
27  let Pattern        = pattern;
28}
29