1 //===- PTXInstrFormats.td - PTX Instruction Formats ----------*- 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 //===----------------------------------------------------------------------===//
11 // Rounding Mode Specifier
12 /*class RoundingMode<bits<3> val> {
16 def RndDefault : RoundingMode<0>;
17 def RndNearestEven : RoundingMode<1>;
18 def RndNearestZero : RoundingMode<2>;
19 def RndNegInf : RoundingMode<3>;
20 def RndPosInf : RoundingMode<4>;
21 def RndApprox : RoundingMode<5>;*/
24 // Rounding Mode Operand
25 def RndMode : Operand<i32> {
26 let PrintMethod = "printRoundingMode";
29 def RndDefault : PatLeaf<(i32 0)>;
31 // PTX Predicate operand, default to (0, 0) = (zero-reg, none).
32 // Leave PrintMethod empty; predicate printing is defined elsewhere.
33 def pred : PredicateOperand<OtherVT, (ops RegPred, i32imm),
34 (ops (i1 zero_reg), (i32 2))>;
36 def RndModeOperand : Operand<OtherVT> {
37 let MIOperandInfo = (ops i32imm);
41 let Namespace = "PTX" in {
43 class InstPTX<dag oops, dag iops, string asmstr, list<dag> pattern>
45 dag OutOperandList = oops;
46 dag InOperandList = !con(iops, (ins pred:$_p));
47 let AsmString = asmstr; // Predicate printing is defined elsewhere.
48 let Pattern = pattern;