Trailing whitespace.
[oota-llvm.git] / lib / Target / PTX / PTXInstrInfo.td
1 //===- PTXInstrInfo.td - PTX Instruction defs -----------------*- 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 // This file describes the PTX instructions in TableGen format.
11 //
12 //===----------------------------------------------------------------------===//
13
14 //===----------------------------------------------------------------------===//
15 // Instruction format superclass
16 //===----------------------------------------------------------------------===//
17
18 include "PTXInstrFormats.td"
19
20 //===----------------------------------------------------------------------===//
21 // PTX Specific Node Definitions
22 //===----------------------------------------------------------------------===//
23
24 def PTXexit
25   : SDNode<"PTXISD::EXIT", SDTNone, [SDNPHasChain]>;
26 def PTXret
27   : SDNode<"PTXISD::RET",  SDTNone, [SDNPHasChain]>;
28
29 //===----------------------------------------------------------------------===//
30 // Instructions
31 //===----------------------------------------------------------------------===//
32
33 ///===- Data Movement and Conversion Instructions -------------------------===//
34
35 let neverHasSideEffects = 1 in {
36   // rely on isMoveInstr to separate MOVpp, MOVrr, etc.
37   def MOVpp
38     : InstPTX<(outs Preds:$d), (ins Preds:$a), "mov.pred\t$d, $a", []>;
39   def MOVrr
40     : InstPTX<(outs RRegs32:$d), (ins RRegs32:$a), "mov.s32\t$d, $a", []>;
41 }
42
43 let isReMaterializable = 1, isAsCheapAsAMove = 1 in {
44   def MOVpi
45     : InstPTX<(outs Preds:$d), (ins i1imm:$a), "mov.pred\t$d, $a",
46               [(set Preds:$d, imm:$a)]>;
47   def MOVri
48     : InstPTX<(outs RRegs32:$d), (ins i32imm:$a), "mov.s32\t$d, $a",
49               [(set RRegs32:$d, imm:$a)]>;
50 }
51
52 ///===- Control Flow Instructions -----------------------------------------===//
53
54 let isReturn = 1, isTerminator = 1, isBarrier = 1 in {
55   def EXIT : InstPTX<(outs), (ins), "exit", [(PTXexit)]>;
56   def RET  : InstPTX<(outs), (ins), "ret",  [(PTXret)]>;
57 }