WebAssembly: print basic integer assembly.
[oota-llvm.git] / lib / Target / WebAssembly / WebAssemblyInstrControl.td
1 //===- WebAssemblyInstrControl.td-WebAssembly control-flow ------*- tablegen -*-
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 control-flow code-gen constructs.
12 ///
13 //===----------------------------------------------------------------------===//
14
15 /*
16  * TODO(jfb): Add the following.
17  *
18  * block: a fixed-length sequence of statements
19  * if: if statement
20  * do_while: do while statement, basically a loop with a conditional branch
21  * forever: infinite loop statement (like while (1)), basically an unconditional
22  *          branch (back to the top of the loop)
23  * continue: continue to start of nested loop
24  * break: break to end from nested loop or block
25  * switch: switch statement with fallthrough
26  */
27
28 let hasSideEffects = 1, isReturn = 1, isTerminator = 1, hasCtrlDep = 1,
29     isBarrier = 1 in {
30 //FIXME return more than just int32.
31 def RETURN : I<(outs), (ins Int32:$val), [(WebAssemblyreturn Int32:$val)]>;
32 } // hasSideEffects = 1, isReturn = 1, isTerminator = 1, hasCtrlDep = 1,
33   // isBarrier = 1