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 {
23 let Inst{7-0} = offset0;
24 let Inst{15-8} = offset1;
27 let Inst{31-26} = 0x36; //encoding
28 let Inst{39-32} = addr;
29 let Inst{47-40} = data0;
30 let Inst{55-48} = data1;
31 let Inst{63-56} = vdst;
34 class MUBUFe_vi <bits<7> op> : Enc64 {
47 let Inst{11-0} = offset;
54 let Inst{31-26} = 0x38; //encoding
55 let Inst{39-32} = vaddr;
56 let Inst{47-40} = vdata;
57 let Inst{52-48} = srsrc{6-2};
59 let Inst{63-56} = soffset;
62 class MTBUFe_vi <bits<4> op> : Enc64 {
76 let Inst{11-0} = offset;
81 let Inst{22-19} = dfmt;
82 let Inst{25-23} = nfmt;
83 let Inst{31-26} = 0x3a; //encoding
84 let Inst{39-32} = vaddr;
85 let Inst{47-40} = vdata;
86 let Inst{52-48} = srsrc{6-2};
89 let Inst{63-56} = soffset;
92 class SMEMe_vi <bits<8> op, bit imm> : Enc64 {
98 let Inst{5-0} = sbase{6-1};
99 let Inst{12-6} = sdata;
102 let Inst{25-18} = op;
103 let Inst{31-26} = 0x30; //encoding
104 let Inst{51-32} = offset;
107 class VOP3e_vi <bits<10> op> : Enc64 {
109 bits<2> src0_modifiers;
111 bits<2> src1_modifiers;
113 bits<2> src2_modifiers;
118 let Inst{7-0} = vdst;
119 let Inst{8} = src0_modifiers{1};
120 let Inst{9} = src1_modifiers{1};
121 let Inst{10} = src2_modifiers{1};
122 let Inst{15} = clamp;
123 let Inst{25-16} = op;
124 let Inst{31-26} = 0x34; //encoding
125 let Inst{40-32} = src0;
126 let Inst{49-41} = src1;
127 let Inst{58-50} = src2;
128 let Inst{60-59} = omod;
129 let Inst{61} = src0_modifiers{0};
130 let Inst{62} = src1_modifiers{0};
131 let Inst{63} = src2_modifiers{0};
134 class VOP3be_vi <bits<10> op> : Enc64 {
136 bits<2> src0_modifiers;
138 bits<2> src1_modifiers;
140 bits<2> src2_modifiers;
146 let Inst{7-0} = vdst;
147 let Inst{14-8} = sdst;
148 let Inst{15} = clamp;
149 let Inst{25-16} = op;
150 let Inst{31-26} = 0x34; //encoding
151 let Inst{40-32} = src0;
152 let Inst{49-41} = src1;
153 let Inst{58-50} = src2;
154 let Inst{60-59} = omod;
155 let Inst{61} = src0_modifiers{0};
156 let Inst{62} = src1_modifiers{0};
157 let Inst{63} = src2_modifiers{0};
160 class EXPe_vi : EXPe {
161 let Inst{31-26} = 0x31; //encoding
164 class VINTRPe_vi <bits<2> op> : VINTRPe <op> {
165 let Inst{31-26} = 0x35; // encoding