WebAssembly: basic instructions todo, and basic register info.
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyInstrFormats.td
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 /// \file
11 /// \brief WebAssembly instruction format definitions.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 // WebAssembly Instruction Format
16 class WebAssemblyInst<string cstr> : Instruction {
17   field bits<0> Inst; // Instruction encoding.
18   let Namespace   = "WebAssembly";
19   let Pattern     = [];
20   let Constraints = cstr;
21 }
22
23 // Normal instructions
24 class I<dag oops, dag iops, list<dag> pattern, string cstr = "">
25     : WebAssemblyInst<cstr> {
26   dag OutOperandList = oops;
27   dag InOperandList  = iops;
28   let Pattern        = pattern;
29 }