1 //===- PTXInstrInfo.td - PTX Instruction defs -----------------*- tblgen-*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file describes the PTX instructions in TableGen format.
12 //===----------------------------------------------------------------------===//
14 //===----------------------------------------------------------------------===//
15 // Instruction format superclass
16 //===----------------------------------------------------------------------===//
18 include "PTXInstrFormats.td"
20 //===----------------------------------------------------------------------===//
21 // PTX Specific Node Definitions
22 //===----------------------------------------------------------------------===//
25 : SDNode<"PTXISD::EXIT", SDTNone, [SDNPHasChain]>;
27 : SDNode<"PTXISD::RET", SDTNone, [SDNPHasChain]>;
29 //===----------------------------------------------------------------------===//
31 //===----------------------------------------------------------------------===//
33 ///===- Data Movement and Conversion Instructions -------------------------===//
35 let neverHasSideEffects = 1 in {
36 // rely on isMoveInstr to separate MOVpp, MOVrr, etc.
38 : InstPTX<(outs Preds:$d), (ins Preds:$a), "mov.pred\t$d, $a", []>;
40 : InstPTX<(outs RRegs32:$d), (ins RRegs32:$a), "mov.s32\t$d, $a", []>;
43 let isReMaterializable = 1, isAsCheapAsAMove = 1 in {
45 : InstPTX<(outs Preds:$d), (ins i1imm:$a), "mov.pred\t$d, $a",
46 [(set Preds:$d, imm:$a)]>;
48 : InstPTX<(outs RRegs32:$d), (ins i32imm:$a), "mov.s32\t$d, $a",
49 [(set RRegs32:$d, imm:$a)]>;
52 ///===- Control Flow Instructions -----------------------------------------===//
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)]>;