1 //===-- VIInstrFormats.td - VI Instruction Encodings ----------------------===//
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 // VI Instruction format definitions.
12 //===----------------------------------------------------------------------===//
14 class DSe_vi <bits<8> op> : Enc64 {
24 let Inst{7-0} = offset0;
25 let Inst{15-8} = offset1;
28 let Inst{31-26} = 0x36; //encoding
29 let Inst{39-32} = addr;
30 let Inst{47-40} = data0;
31 let Inst{55-48} = data1;
32 let Inst{63-56} = vdst;
35 class MUBUFe_vi <bits<7> op> : Enc64 {
49 let Inst{11-0} = offset;
56 let Inst{31-26} = 0x38; //encoding
57 let Inst{39-32} = vaddr;
58 let Inst{47-40} = vdata;
59 let Inst{52-48} = srsrc{6-2};
61 let Inst{63-56} = soffset;
64 class MTBUFe_vi <bits<4> op> : Enc64 {
79 let Inst{11-0} = offset;
84 let Inst{22-19} = dfmt;
85 let Inst{25-23} = nfmt;
86 let Inst{31-26} = 0x3a; //encoding
87 let Inst{39-32} = vaddr;
88 let Inst{47-40} = vdata;
89 let Inst{52-48} = srsrc{6-2};
92 let Inst{63-56} = soffset;
95 class SMEMe_vi <bits<8> op, bit imm> : Enc64 {
102 let Inst{5-0} = sbase{6-1};
103 let Inst{12-6} = sdata;
106 let Inst{25-18} = op;
107 let Inst{31-26} = 0x30; //encoding
108 let Inst{51-32} = offset;
111 class VOP3e_vi <bits<10> op> : Enc64 {
114 bits<2> src0_modifiers;
116 bits<2> src1_modifiers;
118 bits<2> src2_modifiers;
124 let Inst{8} = src0_modifiers{1};
125 let Inst{9} = src1_modifiers{1};
126 let Inst{10} = src2_modifiers{1};
127 let Inst{15} = clamp;
128 let Inst{25-16} = op;
129 let Inst{31-26} = 0x34; //encoding
130 let Inst{40-32} = src0;
131 let Inst{49-41} = src1;
132 let Inst{58-50} = src2;
133 let Inst{60-59} = omod;
134 let Inst{61} = src0_modifiers{0};
135 let Inst{62} = src1_modifiers{0};
136 let Inst{63} = src2_modifiers{0};
139 class VOP3be_vi <bits<10> op> : Enc64 {
141 bits<2> src0_modifiers;
143 bits<2> src1_modifiers;
145 bits<2> src2_modifiers;
151 let Inst{7-0} = vdst;
152 let Inst{14-8} = sdst;
153 let Inst{15} = clamp;
154 let Inst{25-16} = op;
155 let Inst{31-26} = 0x34; //encoding
156 let Inst{40-32} = src0;
157 let Inst{49-41} = src1;
158 let Inst{58-50} = src2;
159 let Inst{60-59} = omod;
160 let Inst{61} = src0_modifiers{0};
161 let Inst{62} = src1_modifiers{0};
162 let Inst{63} = src2_modifiers{0};
165 class EXPe_vi : EXPe {
166 let Inst{31-26} = 0x31; //encoding
169 class VINTRPe_vi <bits<2> op> : VINTRPe <op> {
170 let Inst{31-26} = 0x35; // encoding