[mips][msa] Added support for matching slli, srai, and srli from normal IR (i.e....
[oota-llvm.git] / lib / Target / Mips / MipsMSAInstrInfo.td
1 //===- MipsMSAInstrInfo.td - MSA ASE instructions -*- tablegen ------------*-=//
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 Mips MSA ASE instructions.
11 //
12 //===----------------------------------------------------------------------===//
13
14 def SDT_MipsSplat : SDTypeProfile<1, 1, [SDTCisVec<0>, SDTCisInt<1>]>;
15 def SDT_MipsVecCond : SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisVec<1>]>;
16
17 def MipsVAllNonZero : SDNode<"MipsISD::VALL_NONZERO", SDT_MipsVecCond>;
18 def MipsVAnyNonZero : SDNode<"MipsISD::VANY_NONZERO", SDT_MipsVecCond>;
19 def MipsVAllZero : SDNode<"MipsISD::VALL_ZERO", SDT_MipsVecCond>;
20 def MipsVAnyZero : SDNode<"MipsISD::VANY_ZERO", SDT_MipsVecCond>;
21 def MipsVSplat  : SDNode<"MipsISD::VSPLAT", SDT_MipsSplat>;
22 def MipsVSplatD : SDNode<"MipsISD::VSPLATD", SDT_MipsSplat>;
23 def MipsVNOR : SDNode<"MipsISD::VNOR", SDTIntBinOp,
24                       [SDNPCommutative, SDNPAssociative]>;
25
26 def MipsVExtractSExt : SDNode<"MipsISD::VEXTRACT_SEXT_ELT",
27     SDTypeProfile<1, 3, [SDTCisPtrTy<2>]>, []>;
28 def MipsVExtractZExt : SDNode<"MipsISD::VEXTRACT_ZEXT_ELT",
29     SDTypeProfile<1, 3, [SDTCisPtrTy<2>]>, []>;
30
31 // Pattern fragments
32 def vextract_sext_i8  : PatFrag<(ops node:$vec, node:$idx),
33                                 (MipsVExtractSExt node:$vec, node:$idx, i8)>;
34 def vextract_sext_i16 : PatFrag<(ops node:$vec, node:$idx),
35                                 (MipsVExtractSExt node:$vec, node:$idx, i16)>;
36 def vextract_sext_i32 : PatFrag<(ops node:$vec, node:$idx),
37                                 (MipsVExtractSExt node:$vec, node:$idx, i32)>;
38
39 def vextract_zext_i8  : PatFrag<(ops node:$vec, node:$idx),
40                                 (MipsVExtractZExt node:$vec, node:$idx, i8)>;
41 def vextract_zext_i16 : PatFrag<(ops node:$vec, node:$idx),
42                                 (MipsVExtractZExt node:$vec, node:$idx, i16)>;
43 def vextract_zext_i32 : PatFrag<(ops node:$vec, node:$idx),
44                                 (MipsVExtractZExt node:$vec, node:$idx, i32)>;
45
46 def vinsert_v16i8 : PatFrag<(ops node:$vec, node:$val, node:$idx),
47     (v16i8 (vector_insert node:$vec, node:$val, node:$idx))>;
48 def vinsert_v8i16 : PatFrag<(ops node:$vec, node:$val, node:$idx),
49     (v8i16 (vector_insert node:$vec, node:$val, node:$idx))>;
50 def vinsert_v4i32 : PatFrag<(ops node:$vec, node:$val, node:$idx),
51     (v4i32 (vector_insert node:$vec, node:$val, node:$idx))>;
52
53 def vsplati8  : PatFrag<(ops node:$in), (v16i8 (MipsVSplat (i32 node:$in)))>;
54 def vsplati16 : PatFrag<(ops node:$in), (v8i16 (MipsVSplat (i32 node:$in)))>;
55 def vsplati32 : PatFrag<(ops node:$in), (v4i32 (MipsVSplat (i32 node:$in)))>;
56 def vsplati64 : PatFrag<(ops node:$in), (v2i64 (MipsVSplatD (i32 node:$in)))>;
57
58 // Immediates
59 def immSExt5 : ImmLeaf<i32, [{return isInt<5>(Imm);}]>;
60 def immSExt10: ImmLeaf<i32, [{return isInt<10>(Imm);}]>;
61
62 def uimm3 : Operand<i32> {
63   let PrintMethod = "printUnsignedImm";
64 }
65
66 def uimm4 : Operand<i32> {
67   let PrintMethod = "printUnsignedImm";
68 }
69
70 def uimm8 : Operand<i32> {
71   let PrintMethod = "printUnsignedImm";
72 }
73
74 def simm5 : Operand<i32>;
75
76 def simm10 : Operand<i32>;
77
78 // Instruction encoding.
79 class ADD_A_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010000>;
80 class ADD_A_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010000>;
81 class ADD_A_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010000>;
82 class ADD_A_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010000>;
83
84 class ADDS_A_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010000>;
85 class ADDS_A_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010000>;
86 class ADDS_A_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010000>;
87 class ADDS_A_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010000>;
88
89 class ADDS_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010000>;
90 class ADDS_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010000>;
91 class ADDS_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010000>;
92 class ADDS_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010000>;
93
94 class ADDS_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b010000>;
95 class ADDS_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010000>;
96 class ADDS_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010000>;
97 class ADDS_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010000>;
98
99 class ADDV_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b001110>;
100 class ADDV_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b001110>;
101 class ADDV_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b001110>;
102 class ADDV_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b001110>;
103
104 class ADDVI_B_ENC : MSA_I5_FMT<0b000, 0b00, 0b000110>;
105 class ADDVI_H_ENC : MSA_I5_FMT<0b000, 0b01, 0b000110>;
106 class ADDVI_W_ENC : MSA_I5_FMT<0b000, 0b10, 0b000110>;
107 class ADDVI_D_ENC : MSA_I5_FMT<0b000, 0b11, 0b000110>;
108
109 class AND_V_ENC : MSA_VEC_FMT<0b00000, 0b011110>;
110
111 class ANDI_B_ENC : MSA_I8_FMT<0b00, 0b000000>;
112
113 class ASUB_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010001>;
114 class ASUB_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010001>;
115 class ASUB_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010001>;
116 class ASUB_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010001>;
117
118 class ASUB_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010001>;
119 class ASUB_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010001>;
120 class ASUB_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010001>;
121 class ASUB_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010001>;
122
123 class AVE_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010000>;
124 class AVE_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010000>;
125 class AVE_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010000>;
126 class AVE_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010000>;
127
128 class AVE_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010000>;
129 class AVE_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010000>;
130 class AVE_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010000>;
131 class AVE_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010000>;
132
133 class AVER_S_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b010000>;
134 class AVER_S_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010000>;
135 class AVER_S_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010000>;
136 class AVER_S_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010000>;
137
138 class AVER_U_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b010000>;
139 class AVER_U_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010000>;
140 class AVER_U_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010000>;
141 class AVER_U_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010000>;
142
143 class BCLR_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b001101>;
144 class BCLR_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b001101>;
145 class BCLR_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b001101>;
146 class BCLR_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b001101>;
147
148 class BCLRI_B_ENC : MSA_BIT_B_FMT<0b011, 0b001001>;
149 class BCLRI_H_ENC : MSA_BIT_H_FMT<0b011, 0b001001>;
150 class BCLRI_W_ENC : MSA_BIT_W_FMT<0b011, 0b001001>;
151 class BCLRI_D_ENC : MSA_BIT_D_FMT<0b011, 0b001001>;
152
153 class BINSL_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b001101>;
154 class BINSL_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b001101>;
155 class BINSL_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b001101>;
156 class BINSL_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b001101>;
157
158 class BINSLI_B_ENC : MSA_BIT_B_FMT<0b110, 0b001001>;
159 class BINSLI_H_ENC : MSA_BIT_H_FMT<0b110, 0b001001>;
160 class BINSLI_W_ENC : MSA_BIT_W_FMT<0b110, 0b001001>;
161 class BINSLI_D_ENC : MSA_BIT_D_FMT<0b110, 0b001001>;
162
163 class BINSR_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b001101>;
164 class BINSR_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b001101>;
165 class BINSR_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b001101>;
166 class BINSR_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b001101>;
167
168 class BINSRI_B_ENC : MSA_BIT_B_FMT<0b111, 0b001001>;
169 class BINSRI_H_ENC : MSA_BIT_H_FMT<0b111, 0b001001>;
170 class BINSRI_W_ENC : MSA_BIT_W_FMT<0b111, 0b001001>;
171 class BINSRI_D_ENC : MSA_BIT_D_FMT<0b111, 0b001001>;
172
173 class BMNZ_V_ENC : MSA_VEC_FMT<0b00100, 0b011110>;
174
175 class BMNZI_B_ENC : MSA_I8_FMT<0b00, 0b000001>;
176
177 class BMZ_V_ENC : MSA_VEC_FMT<0b00101, 0b011110>;
178
179 class BMZI_B_ENC : MSA_I8_FMT<0b01, 0b000001>;
180
181 class BNEG_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b001101>;
182 class BNEG_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b001101>;
183 class BNEG_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b001101>;
184 class BNEG_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b001101>;
185
186 class BNEGI_B_ENC : MSA_BIT_B_FMT<0b101, 0b001001>;
187 class BNEGI_H_ENC : MSA_BIT_H_FMT<0b101, 0b001001>;
188 class BNEGI_W_ENC : MSA_BIT_W_FMT<0b101, 0b001001>;
189 class BNEGI_D_ENC : MSA_BIT_D_FMT<0b101, 0b001001>;
190
191 class BNZ_B_ENC : MSA_I10_FMT<0b000, 0b00, 0b001100>;
192 class BNZ_H_ENC : MSA_I10_FMT<0b000, 0b01, 0b001100>;
193 class BNZ_W_ENC : MSA_I10_FMT<0b000, 0b10, 0b001100>;
194 class BNZ_D_ENC : MSA_I10_FMT<0b000, 0b11, 0b001100>;
195
196 class BNZ_V_ENC : MSA_VEC_FMT<0b01000, 0b011110>;
197
198 class BSEL_V_ENC : MSA_VECS10_FMT<0b00110, 0b011110>;
199
200 class BSELI_B_ENC : MSA_I8_FMT<0b10, 0b000001>;
201
202 class BSET_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b001101>;
203 class BSET_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b001101>;
204 class BSET_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b001101>;
205 class BSET_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b001101>;
206
207 class BSETI_B_ENC : MSA_BIT_B_FMT<0b100, 0b001001>;
208 class BSETI_H_ENC : MSA_BIT_H_FMT<0b100, 0b001001>;
209 class BSETI_W_ENC : MSA_BIT_W_FMT<0b100, 0b001001>;
210 class BSETI_D_ENC : MSA_BIT_D_FMT<0b100, 0b001001>;
211
212 class BZ_B_ENC : MSA_I10_FMT<0b001, 0b00, 0b001100>;
213 class BZ_H_ENC : MSA_I10_FMT<0b001, 0b01, 0b001100>;
214 class BZ_W_ENC : MSA_I10_FMT<0b001, 0b10, 0b001100>;
215 class BZ_D_ENC : MSA_I10_FMT<0b001, 0b11, 0b001100>;
216
217 class BZ_V_ENC : MSA_VECS10_FMT<0b01001, 0b011110>;
218
219 class CEQ_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b001111>;
220 class CEQ_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b001111>;
221 class CEQ_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b001111>;
222 class CEQ_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b001111>;
223
224 class CEQI_B_ENC : MSA_I5_FMT<0b000, 0b00, 0b000111>;
225 class CEQI_H_ENC : MSA_I5_FMT<0b000, 0b01, 0b000111>;
226 class CEQI_W_ENC : MSA_I5_FMT<0b000, 0b10, 0b000111>;
227 class CEQI_D_ENC : MSA_I5_FMT<0b000, 0b11, 0b000111>;
228
229 class CFCMSA_ENC : MSA_ELM_FMT<0b0001111110, 0b011001>;
230
231 class CLE_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b001111>;
232 class CLE_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b001111>;
233 class CLE_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b001111>;
234 class CLE_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b001111>;
235
236 class CLE_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b001111>;
237 class CLE_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b001111>;
238 class CLE_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b001111>;
239 class CLE_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b001111>;
240
241 class CLEI_S_B_ENC : MSA_I5_FMT<0b100, 0b00, 0b000111>;
242 class CLEI_S_H_ENC : MSA_I5_FMT<0b100, 0b01, 0b000111>;
243 class CLEI_S_W_ENC : MSA_I5_FMT<0b100, 0b10, 0b000111>;
244 class CLEI_S_D_ENC : MSA_I5_FMT<0b100, 0b11, 0b000111>;
245
246 class CLEI_U_B_ENC : MSA_I5_FMT<0b101, 0b00, 0b000111>;
247 class CLEI_U_H_ENC : MSA_I5_FMT<0b101, 0b01, 0b000111>;
248 class CLEI_U_W_ENC : MSA_I5_FMT<0b101, 0b10, 0b000111>;
249 class CLEI_U_D_ENC : MSA_I5_FMT<0b101, 0b11, 0b000111>;
250
251 class CLT_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b001111>;
252 class CLT_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b001111>;
253 class CLT_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b001111>;
254 class CLT_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b001111>;
255
256 class CLT_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b001111>;
257 class CLT_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b001111>;
258 class CLT_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b001111>;
259 class CLT_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b001111>;
260
261 class CLTI_S_B_ENC : MSA_I5_FMT<0b010, 0b00, 0b000111>;
262 class CLTI_S_H_ENC : MSA_I5_FMT<0b010, 0b01, 0b000111>;
263 class CLTI_S_W_ENC : MSA_I5_FMT<0b010, 0b10, 0b000111>;
264 class CLTI_S_D_ENC : MSA_I5_FMT<0b010, 0b11, 0b000111>;
265
266 class CLTI_U_B_ENC : MSA_I5_FMT<0b011, 0b00, 0b000111>;
267 class CLTI_U_H_ENC : MSA_I5_FMT<0b011, 0b01, 0b000111>;
268 class CLTI_U_W_ENC : MSA_I5_FMT<0b011, 0b10, 0b000111>;
269 class CLTI_U_D_ENC : MSA_I5_FMT<0b011, 0b11, 0b000111>;
270
271 class COPY_S_B_ENC : MSA_ELM_B_FMT<0b0010, 0b011001>;
272 class COPY_S_H_ENC : MSA_ELM_H_FMT<0b0010, 0b011001>;
273 class COPY_S_W_ENC : MSA_ELM_W_FMT<0b0010, 0b011001>;
274
275 class COPY_U_B_ENC : MSA_ELM_B_FMT<0b0011, 0b011001>;
276 class COPY_U_H_ENC : MSA_ELM_H_FMT<0b0011, 0b011001>;
277 class COPY_U_W_ENC : MSA_ELM_W_FMT<0b0011, 0b011001>;
278
279 class CTCMSA_ENC : MSA_ELM_FMT<0b0000111110, 0b011001>;
280
281 class DIV_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010010>;
282 class DIV_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010010>;
283 class DIV_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010010>;
284 class DIV_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010010>;
285
286 class DIV_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010010>;
287 class DIV_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010010>;
288 class DIV_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010010>;
289 class DIV_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010010>;
290
291 class DOTP_S_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010011>;
292 class DOTP_S_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010011>;
293 class DOTP_S_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010011>;
294
295 class DOTP_U_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010011>;
296 class DOTP_U_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010011>;
297 class DOTP_U_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010011>;
298
299 class DPADD_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010011>;
300 class DPADD_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010011>;
301 class DPADD_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010011>;
302
303 class DPADD_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010011>;
304 class DPADD_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010011>;
305 class DPADD_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010011>;
306
307 class DPSUB_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010011>;
308 class DPSUB_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010011>;
309 class DPSUB_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010011>;
310
311 class DPSUB_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010011>;
312 class DPSUB_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010011>;
313 class DPSUB_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010011>;
314
315 class FADD_W_ENC : MSA_3RF_FMT<0b0000, 0b0, 0b011011>;
316 class FADD_D_ENC : MSA_3RF_FMT<0b0000, 0b1, 0b011011>;
317
318 class FCAF_W_ENC : MSA_3RF_FMT<0b0000, 0b0, 0b011010>;
319 class FCAF_D_ENC : MSA_3RF_FMT<0b0000, 0b1, 0b011010>;
320
321 class FCEQ_W_ENC : MSA_3RF_FMT<0b0010, 0b0, 0b011010>;
322 class FCEQ_D_ENC : MSA_3RF_FMT<0b0010, 0b1, 0b011010>;
323
324 class FCLASS_W_ENC : MSA_2RF_FMT<0b110010000, 0b0, 0b011110>;
325 class FCLASS_D_ENC : MSA_2RF_FMT<0b110010000, 0b1, 0b011110>;
326
327 class FCLE_W_ENC : MSA_3RF_FMT<0b0110, 0b0, 0b011010>;
328 class FCLE_D_ENC : MSA_3RF_FMT<0b0110, 0b1, 0b011010>;
329
330 class FCLT_W_ENC : MSA_3RF_FMT<0b0100, 0b0, 0b011010>;
331 class FCLT_D_ENC : MSA_3RF_FMT<0b0100, 0b1, 0b011010>;
332
333 class FCNE_W_ENC : MSA_3RF_FMT<0b0011, 0b0, 0b011100>;
334 class FCNE_D_ENC : MSA_3RF_FMT<0b0011, 0b1, 0b011100>;
335
336 class FCOR_W_ENC : MSA_3RF_FMT<0b0001, 0b0, 0b011100>;
337 class FCOR_D_ENC : MSA_3RF_FMT<0b0001, 0b1, 0b011100>;
338
339 class FCUEQ_W_ENC : MSA_3RF_FMT<0b0011, 0b0, 0b011010>;
340 class FCUEQ_D_ENC : MSA_3RF_FMT<0b0011, 0b1, 0b011010>;
341
342 class FCULE_W_ENC : MSA_3RF_FMT<0b0111, 0b0, 0b011010>;
343 class FCULE_D_ENC : MSA_3RF_FMT<0b0111, 0b1, 0b011010>;
344
345 class FCULT_W_ENC : MSA_3RF_FMT<0b0101, 0b0, 0b011010>;
346 class FCULT_D_ENC : MSA_3RF_FMT<0b0101, 0b1, 0b011010>;
347
348 class FCUN_W_ENC : MSA_3RF_FMT<0b0001, 0b0, 0b011010>;
349 class FCUN_D_ENC : MSA_3RF_FMT<0b0001, 0b1, 0b011010>;
350
351 class FCUNE_W_ENC : MSA_3RF_FMT<0b0010, 0b0, 0b011100>;
352 class FCUNE_D_ENC : MSA_3RF_FMT<0b0010, 0b1, 0b011100>;
353
354 class FDIV_W_ENC : MSA_3RF_FMT<0b0011, 0b0, 0b011011>;
355 class FDIV_D_ENC : MSA_3RF_FMT<0b0011, 0b1, 0b011011>;
356
357 class FEXDO_H_ENC : MSA_3RF_FMT<0b1000, 0b0, 0b011011>;
358 class FEXDO_W_ENC : MSA_3RF_FMT<0b1000, 0b1, 0b011011>;
359
360 class FEXP2_W_ENC : MSA_3RF_FMT<0b0111, 0b0, 0b011011>;
361 class FEXP2_D_ENC : MSA_3RF_FMT<0b0111, 0b1, 0b011011>;
362
363 class FEXUPL_W_ENC : MSA_2RF_FMT<0b110011000, 0b0, 0b011110>;
364 class FEXUPL_D_ENC : MSA_2RF_FMT<0b110011000, 0b1, 0b011110>;
365
366 class FEXUPR_W_ENC : MSA_2RF_FMT<0b110011001, 0b0, 0b011110>;
367 class FEXUPR_D_ENC : MSA_2RF_FMT<0b110011001, 0b1, 0b011110>;
368
369 class FFINT_S_W_ENC : MSA_2RF_FMT<0b110011110, 0b0, 0b011110>;
370 class FFINT_S_D_ENC : MSA_2RF_FMT<0b110011110, 0b1, 0b011110>;
371
372 class FFINT_U_W_ENC : MSA_2RF_FMT<0b110011111, 0b0, 0b011110>;
373 class FFINT_U_D_ENC : MSA_2RF_FMT<0b110011111, 0b1, 0b011110>;
374
375 class FFQL_W_ENC : MSA_2RF_FMT<0b110011010, 0b0, 0b011110>;
376 class FFQL_D_ENC : MSA_2RF_FMT<0b110011010, 0b1, 0b011110>;
377
378 class FFQR_W_ENC : MSA_2RF_FMT<0b110011011, 0b0, 0b011110>;
379 class FFQR_D_ENC : MSA_2RF_FMT<0b110011011, 0b1, 0b011110>;
380
381 class FILL_B_ENC : MSA_2R_FMT<0b11000000, 0b00, 0b011110>;
382 class FILL_H_ENC : MSA_2R_FMT<0b11000000, 0b01, 0b011110>;
383 class FILL_W_ENC : MSA_2R_FMT<0b11000000, 0b10, 0b011110>;
384
385 class FLOG2_W_ENC : MSA_2RF_FMT<0b110010111, 0b0, 0b011110>;
386 class FLOG2_D_ENC : MSA_2RF_FMT<0b110010111, 0b1, 0b011110>;
387
388 class FMADD_W_ENC : MSA_3RF_FMT<0b0100, 0b0, 0b011011>;
389 class FMADD_D_ENC : MSA_3RF_FMT<0b0100, 0b1, 0b011011>;
390
391 class FMAX_W_ENC : MSA_3RF_FMT<0b1110, 0b0, 0b011011>;
392 class FMAX_D_ENC : MSA_3RF_FMT<0b1110, 0b1, 0b011011>;
393
394 class FMAX_A_W_ENC : MSA_3RF_FMT<0b1111, 0b0, 0b011011>;
395 class FMAX_A_D_ENC : MSA_3RF_FMT<0b1111, 0b1, 0b011011>;
396
397 class FMIN_W_ENC : MSA_3RF_FMT<0b1100, 0b0, 0b011011>;
398 class FMIN_D_ENC : MSA_3RF_FMT<0b1100, 0b1, 0b011011>;
399
400 class FMIN_A_W_ENC : MSA_3RF_FMT<0b1101, 0b0, 0b011011>;
401 class FMIN_A_D_ENC : MSA_3RF_FMT<0b1101, 0b1, 0b011011>;
402
403 class FMSUB_W_ENC : MSA_3RF_FMT<0b0101, 0b0, 0b011011>;
404 class FMSUB_D_ENC : MSA_3RF_FMT<0b0101, 0b1, 0b011011>;
405
406 class FMUL_W_ENC : MSA_3RF_FMT<0b0010, 0b0, 0b011011>;
407 class FMUL_D_ENC : MSA_3RF_FMT<0b0010, 0b1, 0b011011>;
408
409 class FRINT_W_ENC : MSA_2RF_FMT<0b110010110, 0b0, 0b011110>;
410 class FRINT_D_ENC : MSA_2RF_FMT<0b110010110, 0b1, 0b011110>;
411
412 class FRCP_W_ENC : MSA_2RF_FMT<0b110010101, 0b0, 0b011110>;
413 class FRCP_D_ENC : MSA_2RF_FMT<0b110010101, 0b1, 0b011110>;
414
415 class FRSQRT_W_ENC : MSA_2RF_FMT<0b110010100, 0b0, 0b011110>;
416 class FRSQRT_D_ENC : MSA_2RF_FMT<0b110010100, 0b1, 0b011110>;
417
418 class FSAF_W_ENC : MSA_3RF_FMT<0b1000, 0b0, 0b011010>;
419 class FSAF_D_ENC : MSA_3RF_FMT<0b1000, 0b1, 0b011010>;
420
421 class FSEQ_W_ENC : MSA_3RF_FMT<0b1010, 0b0, 0b011010>;
422 class FSEQ_D_ENC : MSA_3RF_FMT<0b1010, 0b1, 0b011010>;
423
424 class FSLE_W_ENC : MSA_3RF_FMT<0b1110, 0b0, 0b011010>;
425 class FSLE_D_ENC : MSA_3RF_FMT<0b1110, 0b1, 0b011010>;
426
427 class FSLT_W_ENC : MSA_3RF_FMT<0b1100, 0b0, 0b011010>;
428 class FSLT_D_ENC : MSA_3RF_FMT<0b1100, 0b1, 0b011010>;
429
430 class FSNE_W_ENC : MSA_3RF_FMT<0b1011, 0b0, 0b011100>;
431 class FSNE_D_ENC : MSA_3RF_FMT<0b1011, 0b1, 0b011100>;
432
433 class FSOR_W_ENC : MSA_3RF_FMT<0b1001, 0b0, 0b011100>;
434 class FSOR_D_ENC : MSA_3RF_FMT<0b1001, 0b1, 0b011100>;
435
436 class FSQRT_W_ENC : MSA_2RF_FMT<0b110010011, 0b0, 0b011110>;
437 class FSQRT_D_ENC : MSA_2RF_FMT<0b110010011, 0b1, 0b011110>;
438
439 class FSUB_W_ENC : MSA_3RF_FMT<0b0001, 0b0, 0b011011>;
440 class FSUB_D_ENC : MSA_3RF_FMT<0b0001, 0b1, 0b011011>;
441
442 class FSUEQ_W_ENC : MSA_3RF_FMT<0b1011, 0b0, 0b011010>;
443 class FSUEQ_D_ENC : MSA_3RF_FMT<0b1011, 0b1, 0b011010>;
444
445 class FSULE_W_ENC : MSA_3RF_FMT<0b1111, 0b0, 0b011010>;
446 class FSULE_D_ENC : MSA_3RF_FMT<0b1111, 0b1, 0b011010>;
447
448 class FSULT_W_ENC : MSA_3RF_FMT<0b1101, 0b0, 0b011010>;
449 class FSULT_D_ENC : MSA_3RF_FMT<0b1101, 0b1, 0b011010>;
450
451 class FSUN_W_ENC : MSA_3RF_FMT<0b1001, 0b0, 0b011010>;
452 class FSUN_D_ENC : MSA_3RF_FMT<0b1001, 0b1, 0b011010>;
453
454 class FSUNE_W_ENC : MSA_3RF_FMT<0b1010, 0b0, 0b011100>;
455 class FSUNE_D_ENC : MSA_3RF_FMT<0b1010, 0b1, 0b011100>;
456
457 class FTRUNC_S_W_ENC : MSA_2RF_FMT<0b110100000, 0b0, 0b011110>;
458 class FTRUNC_S_D_ENC : MSA_2RF_FMT<0b110100000, 0b1, 0b011110>;
459
460 class FTRUNC_U_W_ENC : MSA_2RF_FMT<0b110100001, 0b0, 0b011110>;
461 class FTRUNC_U_D_ENC : MSA_2RF_FMT<0b110100001, 0b1, 0b011110>;
462
463 class FTINT_S_W_ENC : MSA_2RF_FMT<0b110011100, 0b0, 0b011110>;
464 class FTINT_S_D_ENC : MSA_2RF_FMT<0b110011100, 0b1, 0b011110>;
465
466 class FTINT_U_W_ENC : MSA_2RF_FMT<0b110011101, 0b0, 0b011110>;
467 class FTINT_U_D_ENC : MSA_2RF_FMT<0b110011101, 0b1, 0b011110>;
468
469 class FTQ_H_ENC : MSA_3RF_FMT<0b1010, 0b0, 0b011011>;
470 class FTQ_W_ENC : MSA_3RF_FMT<0b1010, 0b1, 0b011011>;
471
472 class HADD_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010101>;
473 class HADD_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010101>;
474 class HADD_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010101>;
475
476 class HADD_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010101>;
477 class HADD_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010101>;
478 class HADD_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010101>;
479
480 class HSUB_S_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010101>;
481 class HSUB_S_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010101>;
482 class HSUB_S_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010101>;
483
484 class HSUB_U_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010101>;
485 class HSUB_U_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010101>;
486 class HSUB_U_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010101>;
487
488 class ILVEV_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b010100>;
489 class ILVEV_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010100>;
490 class ILVEV_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010100>;
491 class ILVEV_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010100>;
492
493 class ILVL_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010100>;
494 class ILVL_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010100>;
495 class ILVL_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010100>;
496 class ILVL_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010100>;
497
498 class ILVOD_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b010100>;
499 class ILVOD_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010100>;
500 class ILVOD_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010100>;
501 class ILVOD_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010100>;
502
503 class ILVR_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010100>;
504 class ILVR_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010100>;
505 class ILVR_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010100>;
506 class ILVR_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010100>;
507
508 class INSERT_B_ENC : MSA_ELM_B_FMT<0b0100, 0b011001>;
509 class INSERT_H_ENC : MSA_ELM_H_FMT<0b0100, 0b011001>;
510 class INSERT_W_ENC : MSA_ELM_W_FMT<0b0100, 0b011001>;
511
512 class INSVE_B_ENC : MSA_ELM_B_FMT<0b0101, 0b011001>;
513 class INSVE_H_ENC : MSA_ELM_H_FMT<0b0101, 0b011001>;
514 class INSVE_W_ENC : MSA_ELM_W_FMT<0b0101, 0b011001>;
515 class INSVE_D_ENC : MSA_ELM_D_FMT<0b0101, 0b011001>;
516
517 class LD_B_ENC   : MSA_I5_FMT<0b110, 0b00, 0b000111>;
518 class LD_H_ENC   : MSA_I5_FMT<0b110, 0b01, 0b000111>;
519 class LD_W_ENC   : MSA_I5_FMT<0b110, 0b10, 0b000111>;
520 class LD_D_ENC   : MSA_I5_FMT<0b110, 0b11, 0b000111>;
521
522 class LDI_B_ENC  : MSA_I10_FMT<0b010, 0b00, 0b001100>;
523 class LDI_H_ENC  : MSA_I10_FMT<0b010, 0b01, 0b001100>;
524 class LDI_W_ENC  : MSA_I10_FMT<0b010, 0b10, 0b001100>;
525 class LDI_D_ENC  : MSA_I10_FMT<0b010, 0b11, 0b001100>;
526
527 class LDX_B_ENC  : MSA_3R_FMT<0b110, 0b00, 0b001111>;
528 class LDX_H_ENC  : MSA_3R_FMT<0b110, 0b01, 0b001111>;
529 class LDX_W_ENC  : MSA_3R_FMT<0b110, 0b10, 0b001111>;
530 class LDX_D_ENC  : MSA_3R_FMT<0b110, 0b11, 0b001111>;
531
532 class MADD_Q_H_ENC : MSA_3RF_FMT<0b0101, 0b0, 0b011100>;
533 class MADD_Q_W_ENC : MSA_3RF_FMT<0b0101, 0b1, 0b011100>;
534
535 class MADDR_Q_H_ENC : MSA_3RF_FMT<0b1101, 0b0, 0b011100>;
536 class MADDR_Q_W_ENC : MSA_3RF_FMT<0b1101, 0b1, 0b011100>;
537
538 class MADDV_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010010>;
539 class MADDV_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010010>;
540 class MADDV_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010010>;
541 class MADDV_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010010>;
542
543 class MAX_A_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b001110>;
544 class MAX_A_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b001110>;
545 class MAX_A_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b001110>;
546 class MAX_A_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b001110>;
547
548 class MAX_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b001110>;
549 class MAX_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b001110>;
550 class MAX_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b001110>;
551 class MAX_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b001110>;
552
553 class MAX_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b001110>;
554 class MAX_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b001110>;
555 class MAX_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b001110>;
556 class MAX_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b001110>;
557
558 class MAXI_S_B_ENC : MSA_I5_FMT<0b010, 0b00, 0b000110>;
559 class MAXI_S_H_ENC : MSA_I5_FMT<0b010, 0b01, 0b000110>;
560 class MAXI_S_W_ENC : MSA_I5_FMT<0b010, 0b10, 0b000110>;
561 class MAXI_S_D_ENC : MSA_I5_FMT<0b010, 0b11, 0b000110>;
562
563 class MAXI_U_B_ENC : MSA_I5_FMT<0b011, 0b00, 0b000110>;
564 class MAXI_U_H_ENC : MSA_I5_FMT<0b011, 0b01, 0b000110>;
565 class MAXI_U_W_ENC : MSA_I5_FMT<0b011, 0b10, 0b000110>;
566 class MAXI_U_D_ENC : MSA_I5_FMT<0b011, 0b11, 0b000110>;
567
568 class MIN_A_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b001110>;
569 class MIN_A_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b001110>;
570 class MIN_A_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b001110>;
571 class MIN_A_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b001110>;
572
573 class MIN_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b001110>;
574 class MIN_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b001110>;
575 class MIN_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b001110>;
576 class MIN_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b001110>;
577
578 class MIN_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b001110>;
579 class MIN_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b001110>;
580 class MIN_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b001110>;
581 class MIN_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b001110>;
582
583 class MINI_S_B_ENC : MSA_I5_FMT<0b100, 0b00, 0b000110>;
584 class MINI_S_H_ENC : MSA_I5_FMT<0b100, 0b01, 0b000110>;
585 class MINI_S_W_ENC : MSA_I5_FMT<0b100, 0b10, 0b000110>;
586 class MINI_S_D_ENC : MSA_I5_FMT<0b100, 0b11, 0b000110>;
587
588 class MINI_U_B_ENC : MSA_I5_FMT<0b101, 0b00, 0b000110>;
589 class MINI_U_H_ENC : MSA_I5_FMT<0b101, 0b01, 0b000110>;
590 class MINI_U_W_ENC : MSA_I5_FMT<0b101, 0b10, 0b000110>;
591 class MINI_U_D_ENC : MSA_I5_FMT<0b101, 0b11, 0b000110>;
592
593 class MOD_S_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b010010>;
594 class MOD_S_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010010>;
595 class MOD_S_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010010>;
596 class MOD_S_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010010>;
597
598 class MOD_U_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b010010>;
599 class MOD_U_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010010>;
600 class MOD_U_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010010>;
601 class MOD_U_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010010>;
602
603 class MOVE_V_ENC : MSA_ELM_FMT<0b0010111110, 0b011001>;
604
605 class MSUB_Q_H_ENC : MSA_3RF_FMT<0b0110, 0b0, 0b011100>;
606 class MSUB_Q_W_ENC : MSA_3RF_FMT<0b0110, 0b1, 0b011100>;
607
608 class MSUBR_Q_H_ENC : MSA_3RF_FMT<0b1110, 0b0, 0b011100>;
609 class MSUBR_Q_W_ENC : MSA_3RF_FMT<0b1110, 0b1, 0b011100>;
610
611 class MSUBV_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010010>;
612 class MSUBV_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010010>;
613 class MSUBV_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010010>;
614 class MSUBV_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010010>;
615
616 class MUL_Q_H_ENC : MSA_3RF_FMT<0b0000, 0b0, 0b011100>;
617 class MUL_Q_W_ENC : MSA_3RF_FMT<0b0000, 0b1, 0b011100>;
618
619 class MULR_Q_H_ENC : MSA_3RF_FMT<0b1100, 0b0, 0b011100>;
620 class MULR_Q_W_ENC : MSA_3RF_FMT<0b1100, 0b1, 0b011100>;
621
622 class MULV_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010010>;
623 class MULV_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010010>;
624 class MULV_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010010>;
625 class MULV_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010010>;
626
627 class NLOC_B_ENC : MSA_2R_FMT<0b11000010, 0b00, 0b011110>;
628 class NLOC_H_ENC : MSA_2R_FMT<0b11000010, 0b01, 0b011110>;
629 class NLOC_W_ENC : MSA_2R_FMT<0b11000010, 0b10, 0b011110>;
630 class NLOC_D_ENC : MSA_2R_FMT<0b11000010, 0b11, 0b011110>;
631
632 class NLZC_B_ENC : MSA_2R_FMT<0b11000011, 0b00, 0b011110>;
633 class NLZC_H_ENC : MSA_2R_FMT<0b11000011, 0b01, 0b011110>;
634 class NLZC_W_ENC : MSA_2R_FMT<0b11000011, 0b10, 0b011110>;
635 class NLZC_D_ENC : MSA_2R_FMT<0b11000011, 0b11, 0b011110>;
636
637 class NOR_V_ENC : MSA_VEC_FMT<0b00010, 0b011110>;
638
639 class NORI_B_ENC : MSA_I8_FMT<0b10, 0b000000>;
640
641 class OR_V_ENC : MSA_VEC_FMT<0b00001, 0b011110>;
642
643 class ORI_B_ENC  : MSA_I8_FMT<0b01, 0b000000>;
644
645 class PCKEV_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010100>;
646 class PCKEV_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010100>;
647 class PCKEV_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010100>;
648 class PCKEV_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010100>;
649
650 class PCKOD_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b010100>;
651 class PCKOD_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010100>;
652 class PCKOD_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010100>;
653 class PCKOD_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010100>;
654
655 class PCNT_B_ENC : MSA_2R_FMT<0b11000001, 0b00, 0b011110>;
656 class PCNT_H_ENC : MSA_2R_FMT<0b11000001, 0b01, 0b011110>;
657 class PCNT_W_ENC : MSA_2R_FMT<0b11000001, 0b10, 0b011110>;
658 class PCNT_D_ENC : MSA_2R_FMT<0b11000001, 0b11, 0b011110>;
659
660 class SAT_S_B_ENC : MSA_BIT_B_FMT<0b000, 0b001010>;
661 class SAT_S_H_ENC : MSA_BIT_H_FMT<0b000, 0b001010>;
662 class SAT_S_W_ENC : MSA_BIT_W_FMT<0b000, 0b001010>;
663 class SAT_S_D_ENC : MSA_BIT_D_FMT<0b000, 0b001010>;
664
665 class SAT_U_B_ENC : MSA_BIT_B_FMT<0b001, 0b001010>;
666 class SAT_U_H_ENC : MSA_BIT_H_FMT<0b001, 0b001010>;
667 class SAT_U_W_ENC : MSA_BIT_W_FMT<0b001, 0b001010>;
668 class SAT_U_D_ENC : MSA_BIT_D_FMT<0b001, 0b001010>;
669
670 class SHF_B_ENC  : MSA_I8_FMT<0b00, 0b000010>;
671 class SHF_H_ENC  : MSA_I8_FMT<0b01, 0b000010>;
672 class SHF_W_ENC  : MSA_I8_FMT<0b10, 0b000010>;
673
674 class SLD_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010100>;
675 class SLD_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010100>;
676 class SLD_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010100>;
677 class SLD_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010100>;
678
679 class SLDI_B_ENC : MSA_ELM_B_FMT<0b0000, 0b011001>;
680 class SLDI_H_ENC : MSA_ELM_H_FMT<0b0000, 0b011001>;
681 class SLDI_W_ENC : MSA_ELM_W_FMT<0b0000, 0b011001>;
682 class SLDI_D_ENC : MSA_ELM_D_FMT<0b0000, 0b011001>;
683
684 class SLL_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b001101>;
685 class SLL_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b001101>;
686 class SLL_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b001101>;
687 class SLL_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b001101>;
688
689 class SLLI_B_ENC : MSA_BIT_B_FMT<0b000, 0b001001>;
690 class SLLI_H_ENC : MSA_BIT_H_FMT<0b000, 0b001001>;
691 class SLLI_W_ENC : MSA_BIT_W_FMT<0b000, 0b001001>;
692 class SLLI_D_ENC : MSA_BIT_D_FMT<0b000, 0b001001>;
693
694 class SPLAT_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010100>;
695 class SPLAT_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010100>;
696 class SPLAT_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010100>;
697 class SPLAT_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010100>;
698
699 class SPLATI_B_ENC : MSA_ELM_B_FMT<0b0001, 0b011001>;
700 class SPLATI_H_ENC : MSA_ELM_H_FMT<0b0001, 0b011001>;
701 class SPLATI_W_ENC : MSA_ELM_W_FMT<0b0001, 0b011001>;
702 class SPLATI_D_ENC : MSA_ELM_D_FMT<0b0001, 0b011001>;
703
704 class SRA_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b001101>;
705 class SRA_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b001101>;
706 class SRA_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b001101>;
707 class SRA_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b001101>;
708
709 class SRAI_B_ENC : MSA_BIT_B_FMT<0b001, 0b001001>;
710 class SRAI_H_ENC : MSA_BIT_H_FMT<0b001, 0b001001>;
711 class SRAI_W_ENC : MSA_BIT_W_FMT<0b001, 0b001001>;
712 class SRAI_D_ENC : MSA_BIT_D_FMT<0b001, 0b001001>;
713
714 class SRAR_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010101>;
715 class SRAR_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010101>;
716 class SRAR_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010101>;
717 class SRAR_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010101>;
718
719 class SRARI_B_ENC : MSA_BIT_B_FMT<0b010, 0b001010>;
720 class SRARI_H_ENC : MSA_BIT_H_FMT<0b010, 0b001010>;
721 class SRARI_W_ENC : MSA_BIT_W_FMT<0b010, 0b001010>;
722 class SRARI_D_ENC : MSA_BIT_D_FMT<0b010, 0b001010>;
723
724 class SRL_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b001101>;
725 class SRL_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b001101>;
726 class SRL_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b001101>;
727 class SRL_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b001101>;
728
729 class SRLI_B_ENC : MSA_BIT_B_FMT<0b010, 0b001001>;
730 class SRLI_H_ENC : MSA_BIT_H_FMT<0b010, 0b001001>;
731 class SRLI_W_ENC : MSA_BIT_W_FMT<0b010, 0b001001>;
732 class SRLI_D_ENC : MSA_BIT_D_FMT<0b010, 0b001001>;
733
734 class SRLR_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010101>;
735 class SRLR_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010101>;
736 class SRLR_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010101>;
737 class SRLR_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010101>;
738
739 class SRLRI_B_ENC : MSA_BIT_B_FMT<0b011, 0b001010>;
740 class SRLRI_H_ENC : MSA_BIT_H_FMT<0b011, 0b001010>;
741 class SRLRI_W_ENC : MSA_BIT_W_FMT<0b011, 0b001010>;
742 class SRLRI_D_ENC : MSA_BIT_D_FMT<0b011, 0b001010>;
743
744 class ST_B_ENC   : MSA_I5_FMT<0b111, 0b00, 0b000111>;
745 class ST_H_ENC   : MSA_I5_FMT<0b111, 0b01, 0b000111>;
746 class ST_W_ENC   : MSA_I5_FMT<0b111, 0b10, 0b000111>;
747 class ST_D_ENC   : MSA_I5_FMT<0b111, 0b11, 0b000111>;
748
749 class STX_B_ENC  : MSA_3R_FMT<0b111, 0b00, 0b001111>;
750 class STX_H_ENC  : MSA_3R_FMT<0b111, 0b01, 0b001111>;
751 class STX_W_ENC  : MSA_3R_FMT<0b111, 0b10, 0b001111>;
752 class STX_D_ENC  : MSA_3R_FMT<0b111, 0b11, 0b001111>;
753
754 class SUBS_S_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010001>;
755 class SUBS_S_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010001>;
756 class SUBS_S_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010001>;
757 class SUBS_S_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010001>;
758
759 class SUBS_U_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010001>;
760 class SUBS_U_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010001>;
761 class SUBS_U_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010001>;
762 class SUBS_U_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010001>;
763
764 class SUBSUS_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b010001>;
765 class SUBSUS_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010001>;
766 class SUBSUS_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010001>;
767 class SUBSUS_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010001>;
768
769 class SUBSUU_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010001>;
770 class SUBSUU_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010001>;
771 class SUBSUU_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010001>;
772 class SUBSUU_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010001>;
773
774 class SUBV_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b001110>;
775 class SUBV_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b001110>;
776 class SUBV_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b001110>;
777 class SUBV_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b001110>;
778
779 class SUBVI_B_ENC : MSA_I5_FMT<0b001, 0b00, 0b000110>;
780 class SUBVI_H_ENC : MSA_I5_FMT<0b001, 0b01, 0b000110>;
781 class SUBVI_W_ENC : MSA_I5_FMT<0b001, 0b10, 0b000110>;
782 class SUBVI_D_ENC : MSA_I5_FMT<0b001, 0b11, 0b000110>;
783
784 class VSHF_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010101>;
785 class VSHF_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010101>;
786 class VSHF_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010101>;
787 class VSHF_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010101>;
788
789 class XOR_V_ENC : MSA_VEC_FMT<0b00011, 0b011110>;
790
791 class XORI_B_ENC : MSA_I8_FMT<0b11, 0b000000>;
792
793 // Instruction desc.
794 class MSA_BIT_B_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
795                           RegisterClass RCWD, RegisterClass RCWS = RCWD,
796                           InstrItinClass itin = NoItinerary> {
797   dag OutOperandList = (outs RCWD:$wd);
798   dag InOperandList = (ins RCWS:$ws, uimm3:$u3);
799   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u3");
800   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immZExt3:$u3))];
801   InstrItinClass Itinerary = itin;
802 }
803
804 class MSA_BIT_H_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
805                           RegisterClass RCWD, RegisterClass RCWS = RCWD,
806                           InstrItinClass itin = NoItinerary> {
807   dag OutOperandList = (outs RCWD:$wd);
808   dag InOperandList = (ins RCWS:$ws, uimm4:$u4);
809   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u4");
810   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immZExt4:$u4))];
811   InstrItinClass Itinerary = itin;
812 }
813
814 class MSA_BIT_W_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
815                           RegisterClass RCWD, RegisterClass RCWS = RCWD,
816                           InstrItinClass itin = NoItinerary> {
817   dag OutOperandList = (outs RCWD:$wd);
818   dag InOperandList = (ins RCWS:$ws, uimm5:$u5);
819   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u5");
820   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immZExt5:$u5))];
821   InstrItinClass Itinerary = itin;
822 }
823
824 class MSA_BIT_D_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
825                           RegisterClass RCWD, RegisterClass RCWS = RCWD,
826                           InstrItinClass itin = NoItinerary> {
827   dag OutOperandList = (outs RCWD:$wd);
828   dag InOperandList = (ins RCWS:$ws, uimm6:$u6);
829   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u6");
830   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immZExt6:$u6))];
831   InstrItinClass Itinerary = itin;
832 }
833
834 class MSA_BIT_SPLATB_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
835                                RegisterClass RCWD, RegisterClass RCWS = RCWD,
836                                InstrItinClass itin = NoItinerary> {
837   dag OutOperandList = (outs RCWD:$wd);
838   dag InOperandList = (ins RCWS:$ws, uimm3:$u3);
839   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u3");
840   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws,
841                                               (vsplati8 immZExt3:$u3)))];
842   InstrItinClass Itinerary = itin;
843 }
844
845 class MSA_BIT_SPLATH_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
846                                RegisterClass RCWD, RegisterClass RCWS = RCWD,
847                                InstrItinClass itin = NoItinerary> {
848   dag OutOperandList = (outs RCWD:$wd);
849   dag InOperandList = (ins RCWS:$ws, uimm4:$u4);
850   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u4");
851   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws,
852                                               (vsplati16 immZExt4:$u4)))];
853   InstrItinClass Itinerary = itin;
854 }
855
856 class MSA_BIT_SPLATW_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
857                                RegisterClass RCWD, RegisterClass RCWS = RCWD,
858                                InstrItinClass itin = NoItinerary> {
859   dag OutOperandList = (outs RCWD:$wd);
860   dag InOperandList = (ins RCWS:$ws, uimm5:$u5);
861   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u5");
862   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws,
863                                               (vsplati32 immZExt5:$u5)))];
864   InstrItinClass Itinerary = itin;
865 }
866
867 class MSA_BIT_SPLATD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
868                                RegisterClass RCWD, RegisterClass RCWS = RCWD,
869                                InstrItinClass itin = NoItinerary> {
870   dag OutOperandList = (outs RCWD:$wd);
871   dag InOperandList = (ins RCWS:$ws, uimm6:$u6);
872   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u6");
873   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws,
874                                               (vsplati64 immZExt6:$u6)))];
875   InstrItinClass Itinerary = itin;
876 }
877
878 class MSA_COPY_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
879                          ValueType VecTy, RegisterClass RCD, RegisterClass RCWS,
880                          InstrItinClass itin = NoItinerary> {
881   dag OutOperandList = (outs RCD:$rd);
882   dag InOperandList = (ins RCWS:$ws, uimm4:$n);
883   string AsmString = !strconcat(instr_asm, "\t$rd, $ws[$n]");
884   list<dag> Pattern = [(set RCD:$rd, (OpNode (VecTy RCWS:$ws), immZExt4:$n))];
885   InstrItinClass Itinerary = itin;
886 }
887
888 class MSA_I5_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
889                        SDPatternOperator SplatNode, RegisterClass RCWD,
890                        RegisterClass RCWS = RCWD,
891                        InstrItinClass itin = NoItinerary> {
892   dag OutOperandList = (outs RCWD:$wd);
893   dag InOperandList = (ins RCWS:$ws, uimm5:$u5);
894   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u5");
895   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws,
896                                               (SplatNode immZExt5:$u5)))];
897   InstrItinClass Itinerary = itin;
898 }
899
900 // This class is deprecated and will be removed in the next few changes
901 class MSA_I5_X_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
902                          RegisterClass RCWD, RegisterClass RCWS = RCWD,
903                          InstrItinClass itin = NoItinerary> {
904   dag OutOperandList = (outs RCWD:$wd);
905   dag InOperandList = (ins RCWS:$ws, uimm5:$u5);
906   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u5");
907   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immZExt5:$u5))];
908   InstrItinClass Itinerary = itin;
909 }
910
911 class MSA_SI5_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
912                        RegisterClass RCWD, RegisterClass RCWS = RCWD,
913                        InstrItinClass itin = NoItinerary> {
914   dag OutOperandList = (outs RCWD:$wd);
915   dag InOperandList = (ins RCWS:$ws, simm5:$s5);
916   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $s5");
917   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immSExt5:$s5))];
918   InstrItinClass Itinerary = itin;
919 }
920
921 class MSA_I8_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
922                        RegisterClass RCWD, RegisterClass RCWS = RCWD,
923                        InstrItinClass itin = NoItinerary> {
924   dag OutOperandList = (outs RCWD:$wd);
925   dag InOperandList = (ins RCWS:$ws, uimm8:$u8);
926   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u8");
927   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, immZExt8:$u8))];
928   InstrItinClass Itinerary = itin;
929 }
930
931 class MSA_I10_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
932                         RegisterClass RCWD,
933                         InstrItinClass itin = NoItinerary> {
934   dag OutOperandList = (outs RCWD:$wd);
935   dag InOperandList = (ins simm10:$i10);
936   string AsmString = !strconcat(instr_asm, "\t$wd, $i10");
937   list<dag> Pattern = [(set RCWD:$wd, (OpNode immSExt10:$i10))];
938   InstrItinClass Itinerary = itin;
939 }
940
941 class MSA_2R_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
942                        RegisterClass RCWD, RegisterClass RCWS = RCWD,
943                        InstrItinClass itin = NoItinerary> {
944   dag OutOperandList = (outs RCWD:$wd);
945   dag InOperandList = (ins RCWS:$ws);
946   string AsmString = !strconcat(instr_asm, "\t$wd, $ws");
947   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws))];
948   InstrItinClass Itinerary = itin;
949 }
950
951 class MSA_2RF_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
952                         RegisterClass RCWD, RegisterClass RCWS = RCWD,
953                         InstrItinClass itin = NoItinerary> :
954   MSA_2R_DESC_BASE<instr_asm, OpNode, RCWD, RCWS, itin>;
955
956
957 class MSA_3R_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
958                        RegisterClass RCWD, RegisterClass RCWS = RCWD,
959                        RegisterClass RCWT = RCWD,
960                        InstrItinClass itin = NoItinerary> {
961   dag OutOperandList = (outs RCWD:$wd);
962   dag InOperandList = (ins RCWS:$ws, RCWT:$wt);
963   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
964   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, RCWT:$wt))];
965   InstrItinClass Itinerary = itin;
966 }
967
968 class MSA_3R_4R_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
969                           RegisterClass RCWD, RegisterClass RCWS = RCWD,
970                           RegisterClass RCWT = RCWD,
971                           InstrItinClass itin = NoItinerary> {
972   dag OutOperandList = (outs RCWD:$wd);
973   dag InOperandList = (ins RCWD:$wd_in, RCWS:$ws, RCWT:$wt);
974   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
975   list<dag> Pattern = [(set RCWD:$wd,
976                        (OpNode RCWD:$wd_in, RCWS:$ws, RCWT:$wt))];
977   InstrItinClass Itinerary = itin;
978   string Constraints = "$wd = $wd_in";
979 }
980
981 class MSA_3RF_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
982                         RegisterClass RCWD, RegisterClass RCWS = RCWD,
983                         RegisterClass RCWT = RCWD,
984                         InstrItinClass itin = NoItinerary> :
985   MSA_3R_DESC_BASE<instr_asm, OpNode, RCWD, RCWS, RCWT, itin>;
986
987 class MSA_3RF_4RF_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
988                             RegisterClass RCWD, RegisterClass RCWS = RCWD,
989                             RegisterClass RCWT = RCWD,
990                             InstrItinClass itin = NoItinerary> :
991   MSA_3R_4R_DESC_BASE<instr_asm, OpNode, RCWD, RCWS, RCWT, itin>;
992
993 class MSA_CBRANCH_DESC_BASE<string instr_asm, RegisterClass RCWD> {
994   dag OutOperandList = (outs);
995   dag InOperandList = (ins RCWD:$wd, brtarget:$offset);
996   string AsmString = !strconcat(instr_asm, "\t$wd, $offset");
997   list<dag> Pattern = [];
998   InstrItinClass Itinerary = IIBranch;
999   bit isBranch = 1;
1000   bit isTerminator = 1;
1001   bit hasDelaySlot = 1;
1002   list<Register> Defs = [AT];
1003 }
1004
1005 class MSA_INSERT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1006                            RegisterClass RCD, RegisterClass RCWS,
1007                            InstrItinClass itin = NoItinerary> {
1008   dag OutOperandList = (outs RCD:$wd);
1009   dag InOperandList = (ins RCD:$wd_in, RCWS:$rs, uimm6:$n);
1010   string AsmString = !strconcat(instr_asm, "\t$wd[$n], $rs");
1011   list<dag> Pattern = [(set RCD:$wd, (OpNode RCD:$wd_in,
1012                                              RCWS:$rs,
1013                                              immZExt6:$n))];
1014   InstrItinClass Itinerary = itin;
1015   string Constraints = "$wd = $wd_in";
1016 }
1017
1018 class MSA_INSVE_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1019                           RegisterClass RCWD, RegisterClass RCWS = RCWD,
1020                           InstrItinClass itin = NoItinerary> {
1021   dag OutOperandList = (outs RCWD:$wd);
1022   dag InOperandList = (ins RCWD:$wd_in, uimm6:$n, RCWS:$ws);
1023   string AsmString = !strconcat(instr_asm, "\t$wd[$n], $ws[0]");
1024   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWD:$wd_in,
1025                                               immZExt6:$n,
1026                                               RCWS:$ws))];
1027   InstrItinClass Itinerary = itin;
1028   string Constraints = "$wd = $wd_in";
1029 }
1030
1031 class MSA_VEC_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1032                         RegisterClass RCWD, RegisterClass RCWS = RCWD,
1033                         RegisterClass RCWT = RCWD,
1034                         InstrItinClass itin = NoItinerary> {
1035   dag OutOperandList = (outs RCWD:$wd);
1036   dag InOperandList = (ins RCWS:$ws, RCWT:$wt);
1037   string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
1038   list<dag> Pattern = [(set RCWD:$wd, (OpNode RCWS:$ws, RCWT:$wt))];
1039   InstrItinClass Itinerary = itin;
1040 }
1041
1042 class MSA_VEC_PSEUDO_BASE<SDPatternOperator OpNode, RegisterClass RCWD,
1043                           RegisterClass RCWS = RCWD,
1044                           RegisterClass RCWT = RCWD> :
1045       MipsPseudo<(outs RCWD:$wd), (ins RCWS:$ws, RCWT:$wt),
1046                  [(set RCWD:$wd, (OpNode RCWS:$ws, RCWT:$wt))]>;
1047
1048 class ADD_A_B_DESC : MSA_3R_DESC_BASE<"add_a.b", int_mips_add_a_b, MSA128B>,
1049                      IsCommutable;
1050 class ADD_A_H_DESC : MSA_3R_DESC_BASE<"add_a.h", int_mips_add_a_h, MSA128H>,
1051                      IsCommutable;
1052 class ADD_A_W_DESC : MSA_3R_DESC_BASE<"add_a.w", int_mips_add_a_w, MSA128W>,
1053                      IsCommutable;
1054 class ADD_A_D_DESC : MSA_3R_DESC_BASE<"add_a.d", int_mips_add_a_d, MSA128D>,
1055                      IsCommutable;
1056
1057 class ADDS_A_B_DESC : MSA_3R_DESC_BASE<"adds_a.b", int_mips_adds_a_b, MSA128B>,
1058                       IsCommutable;
1059 class ADDS_A_H_DESC : MSA_3R_DESC_BASE<"adds_a.h", int_mips_adds_a_h, MSA128H>,
1060                       IsCommutable;
1061 class ADDS_A_W_DESC : MSA_3R_DESC_BASE<"adds_a.w", int_mips_adds_a_w, MSA128W>,
1062                       IsCommutable;
1063 class ADDS_A_D_DESC : MSA_3R_DESC_BASE<"adds_a.d", int_mips_adds_a_d, MSA128D>,
1064                       IsCommutable;
1065
1066 class ADDS_S_B_DESC : MSA_3R_DESC_BASE<"adds_s.b", int_mips_adds_s_b, MSA128B>,
1067                       IsCommutable;
1068 class ADDS_S_H_DESC : MSA_3R_DESC_BASE<"adds_s.h", int_mips_adds_s_h, MSA128H>,
1069                       IsCommutable;
1070 class ADDS_S_W_DESC : MSA_3R_DESC_BASE<"adds_s.w", int_mips_adds_s_w, MSA128W>,
1071                       IsCommutable;
1072 class ADDS_S_D_DESC : MSA_3R_DESC_BASE<"adds_s.d", int_mips_adds_s_d, MSA128D>,
1073                       IsCommutable;
1074
1075 class ADDS_U_B_DESC : MSA_3R_DESC_BASE<"adds_u.b", int_mips_adds_u_b, MSA128B>,
1076                       IsCommutable;
1077 class ADDS_U_H_DESC : MSA_3R_DESC_BASE<"adds_u.h", int_mips_adds_u_h, MSA128H>,
1078                       IsCommutable;
1079 class ADDS_U_W_DESC : MSA_3R_DESC_BASE<"adds_u.w", int_mips_adds_u_w, MSA128W>,
1080                       IsCommutable;
1081 class ADDS_U_D_DESC : MSA_3R_DESC_BASE<"adds_u.d", int_mips_adds_u_d, MSA128D>,
1082                       IsCommutable;
1083
1084 class ADDV_B_DESC : MSA_3R_DESC_BASE<"addv.b", add, MSA128B>, IsCommutable;
1085 class ADDV_H_DESC : MSA_3R_DESC_BASE<"addv.h", add, MSA128H>, IsCommutable;
1086 class ADDV_W_DESC : MSA_3R_DESC_BASE<"addv.w", add, MSA128W>, IsCommutable;
1087 class ADDV_D_DESC : MSA_3R_DESC_BASE<"addv.d", add, MSA128D>, IsCommutable;
1088
1089 class ADDVI_B_DESC : MSA_I5_DESC_BASE<"addvi.b", add, vsplati8,  MSA128B>;
1090 class ADDVI_H_DESC : MSA_I5_DESC_BASE<"addvi.h", add, vsplati16, MSA128H>;
1091 class ADDVI_W_DESC : MSA_I5_DESC_BASE<"addvi.w", add, vsplati32, MSA128W>;
1092 class ADDVI_D_DESC : MSA_I5_DESC_BASE<"addvi.d", add, vsplati64, MSA128D>;
1093
1094 class AND_V_DESC : MSA_VEC_DESC_BASE<"and.v", and, MSA128B>;
1095 class AND_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<and, MSA128H>;
1096 class AND_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<and, MSA128W>;
1097 class AND_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<and, MSA128D>;
1098
1099 class ANDI_B_DESC : MSA_I8_DESC_BASE<"andi.b", int_mips_andi_b, MSA128B>;
1100
1101 class ASUB_S_B_DESC : MSA_3R_DESC_BASE<"asub_s.b", int_mips_asub_s_b, MSA128B>;
1102 class ASUB_S_H_DESC : MSA_3R_DESC_BASE<"asub_s.h", int_mips_asub_s_h, MSA128H>;
1103 class ASUB_S_W_DESC : MSA_3R_DESC_BASE<"asub_s.w", int_mips_asub_s_w, MSA128W>;
1104 class ASUB_S_D_DESC : MSA_3R_DESC_BASE<"asub_s.d", int_mips_asub_s_d, MSA128D>;
1105
1106 class ASUB_U_B_DESC : MSA_3R_DESC_BASE<"asub_u.b", int_mips_asub_u_b, MSA128B>;
1107 class ASUB_U_H_DESC : MSA_3R_DESC_BASE<"asub_u.h", int_mips_asub_u_h, MSA128H>;
1108 class ASUB_U_W_DESC : MSA_3R_DESC_BASE<"asub_u.w", int_mips_asub_u_w, MSA128W>;
1109 class ASUB_U_D_DESC : MSA_3R_DESC_BASE<"asub_u.d", int_mips_asub_u_d, MSA128D>;
1110
1111 class AVE_S_B_DESC : MSA_3R_DESC_BASE<"ave_s.b", int_mips_ave_s_b, MSA128B>,
1112                      IsCommutable;
1113 class AVE_S_H_DESC : MSA_3R_DESC_BASE<"ave_s.h", int_mips_ave_s_h, MSA128H>,
1114                      IsCommutable;
1115 class AVE_S_W_DESC : MSA_3R_DESC_BASE<"ave_s.w", int_mips_ave_s_w, MSA128W>,
1116                      IsCommutable;
1117 class AVE_S_D_DESC : MSA_3R_DESC_BASE<"ave_s.d", int_mips_ave_s_d, MSA128D>,
1118                      IsCommutable;
1119
1120 class AVE_U_B_DESC : MSA_3R_DESC_BASE<"ave_u.b", int_mips_ave_u_b, MSA128B>,
1121                      IsCommutable;
1122 class AVE_U_H_DESC : MSA_3R_DESC_BASE<"ave_u.h", int_mips_ave_u_h, MSA128H>,
1123                      IsCommutable;
1124 class AVE_U_W_DESC : MSA_3R_DESC_BASE<"ave_u.w", int_mips_ave_u_w, MSA128W>,
1125                      IsCommutable;
1126 class AVE_U_D_DESC : MSA_3R_DESC_BASE<"ave_u.d", int_mips_ave_u_d, MSA128D>,
1127                      IsCommutable;
1128
1129 class AVER_S_B_DESC : MSA_3R_DESC_BASE<"aver_s.b", int_mips_aver_s_b, MSA128B>,
1130                       IsCommutable;
1131 class AVER_S_H_DESC : MSA_3R_DESC_BASE<"aver_s.h", int_mips_aver_s_h, MSA128H>,
1132                       IsCommutable;
1133 class AVER_S_W_DESC : MSA_3R_DESC_BASE<"aver_s.w", int_mips_aver_s_w, MSA128W>,
1134                       IsCommutable;
1135 class AVER_S_D_DESC : MSA_3R_DESC_BASE<"aver_s.d", int_mips_aver_s_d, MSA128D>,
1136                       IsCommutable;
1137
1138 class AVER_U_B_DESC : MSA_3R_DESC_BASE<"aver_u.b", int_mips_aver_u_b, MSA128B>,
1139                       IsCommutable;
1140 class AVER_U_H_DESC : MSA_3R_DESC_BASE<"aver_u.h", int_mips_aver_u_h, MSA128H>,
1141                       IsCommutable;
1142 class AVER_U_W_DESC : MSA_3R_DESC_BASE<"aver_u.w", int_mips_aver_u_w, MSA128W>,
1143                       IsCommutable;
1144 class AVER_U_D_DESC : MSA_3R_DESC_BASE<"aver_u.d", int_mips_aver_u_d, MSA128D>,
1145                       IsCommutable;
1146
1147 class BCLR_B_DESC : MSA_3R_DESC_BASE<"bclr.b", int_mips_bclr_b, MSA128B>;
1148 class BCLR_H_DESC : MSA_3R_DESC_BASE<"bclr.h", int_mips_bclr_h, MSA128H>;
1149 class BCLR_W_DESC : MSA_3R_DESC_BASE<"bclr.w", int_mips_bclr_w, MSA128W>;
1150 class BCLR_D_DESC : MSA_3R_DESC_BASE<"bclr.d", int_mips_bclr_d, MSA128D>;
1151
1152 class BCLRI_B_DESC : MSA_BIT_B_DESC_BASE<"bclri.b", int_mips_bclri_b, MSA128B>;
1153 class BCLRI_H_DESC : MSA_BIT_H_DESC_BASE<"bclri.h", int_mips_bclri_h, MSA128H>;
1154 class BCLRI_W_DESC : MSA_BIT_W_DESC_BASE<"bclri.w", int_mips_bclri_w, MSA128W>;
1155 class BCLRI_D_DESC : MSA_BIT_D_DESC_BASE<"bclri.d", int_mips_bclri_d, MSA128D>;
1156
1157 class BINSL_B_DESC : MSA_3R_DESC_BASE<"binsl.b", int_mips_binsl_b, MSA128B>;
1158 class BINSL_H_DESC : MSA_3R_DESC_BASE<"binsl.h", int_mips_binsl_h, MSA128H>;
1159 class BINSL_W_DESC : MSA_3R_DESC_BASE<"binsl.w", int_mips_binsl_w, MSA128W>;
1160 class BINSL_D_DESC : MSA_3R_DESC_BASE<"binsl.d", int_mips_binsl_d, MSA128D>;
1161
1162 class BINSLI_B_DESC : MSA_BIT_B_DESC_BASE<"binsli.b", int_mips_binsli_b,
1163                                           MSA128B>;
1164 class BINSLI_H_DESC : MSA_BIT_H_DESC_BASE<"binsli.h", int_mips_binsli_h,
1165                                           MSA128H>;
1166 class BINSLI_W_DESC : MSA_BIT_W_DESC_BASE<"binsli.w", int_mips_binsli_w,
1167                                           MSA128W>;
1168 class BINSLI_D_DESC : MSA_BIT_D_DESC_BASE<"binsli.d", int_mips_binsli_d,
1169                                           MSA128D>;
1170
1171 class BINSR_B_DESC : MSA_3R_DESC_BASE<"binsr.b", int_mips_binsr_b, MSA128B>;
1172 class BINSR_H_DESC : MSA_3R_DESC_BASE<"binsr.h", int_mips_binsr_h, MSA128H>;
1173 class BINSR_W_DESC : MSA_3R_DESC_BASE<"binsr.w", int_mips_binsr_w, MSA128W>;
1174 class BINSR_D_DESC : MSA_3R_DESC_BASE<"binsr.d", int_mips_binsr_d, MSA128D>;
1175
1176 class BINSRI_B_DESC : MSA_BIT_B_DESC_BASE<"binsri.b", int_mips_binsri_b,
1177                                           MSA128B>;
1178 class BINSRI_H_DESC : MSA_BIT_H_DESC_BASE<"binsri.h", int_mips_binsri_h,
1179                                           MSA128H>;
1180 class BINSRI_W_DESC : MSA_BIT_W_DESC_BASE<"binsri.w", int_mips_binsri_w,
1181                                           MSA128W>;
1182 class BINSRI_D_DESC : MSA_BIT_D_DESC_BASE<"binsri.d", int_mips_binsri_d,
1183                                           MSA128D>;
1184
1185 class BMNZ_V_DESC : MSA_VEC_DESC_BASE<"bmnz.v", int_mips_bmnz_v, MSA128B>;
1186
1187 class BMNZI_B_DESC : MSA_I8_DESC_BASE<"bmnzi.b", int_mips_bmnzi_b, MSA128B>;
1188
1189 class BMZ_V_DESC : MSA_VEC_DESC_BASE<"bmz.v", int_mips_bmz_v, MSA128B>;
1190
1191 class BMZI_B_DESC : MSA_I8_DESC_BASE<"bmzi.b", int_mips_bmzi_b, MSA128B>;
1192
1193 class BNEG_B_DESC : MSA_3R_DESC_BASE<"bneg.b", int_mips_bneg_b, MSA128B>;
1194 class BNEG_H_DESC : MSA_3R_DESC_BASE<"bneg.h", int_mips_bneg_h, MSA128H>;
1195 class BNEG_W_DESC : MSA_3R_DESC_BASE<"bneg.w", int_mips_bneg_w, MSA128W>;
1196 class BNEG_D_DESC : MSA_3R_DESC_BASE<"bneg.d", int_mips_bneg_d, MSA128D>;
1197
1198 class BNEGI_B_DESC : MSA_BIT_B_DESC_BASE<"bnegi.b", int_mips_bnegi_b, MSA128B>;
1199 class BNEGI_H_DESC : MSA_BIT_H_DESC_BASE<"bnegi.h", int_mips_bnegi_h, MSA128H>;
1200 class BNEGI_W_DESC : MSA_BIT_W_DESC_BASE<"bnegi.w", int_mips_bnegi_w, MSA128W>;
1201 class BNEGI_D_DESC : MSA_BIT_D_DESC_BASE<"bnegi.d", int_mips_bnegi_d, MSA128D>;
1202
1203 class BNZ_B_DESC : MSA_CBRANCH_DESC_BASE<"bnz.b", MSA128B>;
1204 class BNZ_H_DESC : MSA_CBRANCH_DESC_BASE<"bnz.h", MSA128H>;
1205 class BNZ_W_DESC : MSA_CBRANCH_DESC_BASE<"bnz.w", MSA128W>;
1206 class BNZ_D_DESC : MSA_CBRANCH_DESC_BASE<"bnz.d", MSA128D>;
1207
1208 class BNZ_V_DESC : MSA_CBRANCH_DESC_BASE<"bnz.v", MSA128B>;
1209
1210 class BSEL_V_DESC : MSA_VEC_DESC_BASE<"bsel.v", int_mips_bsel_v, MSA128B>;
1211
1212 class BSELI_B_DESC : MSA_I8_DESC_BASE<"bseli.b", int_mips_bseli_b, MSA128B>;
1213
1214 class BSET_B_DESC : MSA_3R_DESC_BASE<"bset.b", int_mips_bset_b, MSA128B>;
1215 class BSET_H_DESC : MSA_3R_DESC_BASE<"bset.h", int_mips_bset_h, MSA128H>;
1216 class BSET_W_DESC : MSA_3R_DESC_BASE<"bset.w", int_mips_bset_w, MSA128W>;
1217 class BSET_D_DESC : MSA_3R_DESC_BASE<"bset.d", int_mips_bset_d, MSA128D>;
1218
1219 class BSETI_B_DESC : MSA_BIT_B_DESC_BASE<"bseti.b", int_mips_bseti_b, MSA128B>;
1220 class BSETI_H_DESC : MSA_BIT_H_DESC_BASE<"bseti.h", int_mips_bseti_h, MSA128H>;
1221 class BSETI_W_DESC : MSA_BIT_W_DESC_BASE<"bseti.w", int_mips_bseti_w, MSA128W>;
1222 class BSETI_D_DESC : MSA_BIT_D_DESC_BASE<"bseti.d", int_mips_bseti_d, MSA128D>;
1223
1224 class BZ_B_DESC : MSA_CBRANCH_DESC_BASE<"bz.b", MSA128B>;
1225 class BZ_H_DESC : MSA_CBRANCH_DESC_BASE<"bz.h", MSA128H>;
1226 class BZ_W_DESC : MSA_CBRANCH_DESC_BASE<"bz.w", MSA128W>;
1227 class BZ_D_DESC : MSA_CBRANCH_DESC_BASE<"bz.d", MSA128D>;
1228
1229 class BZ_V_DESC : MSA_CBRANCH_DESC_BASE<"bz.v", MSA128B>;
1230
1231 class CEQ_B_DESC : MSA_3R_DESC_BASE<"ceq.b", int_mips_ceq_b, MSA128B>,
1232                    IsCommutable;
1233 class CEQ_H_DESC : MSA_3R_DESC_BASE<"ceq.h", int_mips_ceq_h, MSA128H>,
1234                    IsCommutable;
1235 class CEQ_W_DESC : MSA_3R_DESC_BASE<"ceq.w", int_mips_ceq_w, MSA128W>,
1236                    IsCommutable;
1237 class CEQ_D_DESC : MSA_3R_DESC_BASE<"ceq.d", int_mips_ceq_d, MSA128D>,
1238                    IsCommutable;
1239
1240 class CEQI_B_DESC : MSA_SI5_DESC_BASE<"ceqi.b", int_mips_ceqi_b, MSA128B>;
1241 class CEQI_H_DESC : MSA_SI5_DESC_BASE<"ceqi.h", int_mips_ceqi_h, MSA128H>;
1242 class CEQI_W_DESC : MSA_SI5_DESC_BASE<"ceqi.w", int_mips_ceqi_w, MSA128W>;
1243 class CEQI_D_DESC : MSA_SI5_DESC_BASE<"ceqi.d", int_mips_ceqi_d, MSA128D>;
1244
1245 class CFCMSA_DESC {
1246   dag OutOperandList = (outs GPR32:$rd);
1247   dag InOperandList = (ins MSACtrl:$cs);
1248   string AsmString = "cfcmsa\t$rd, $cs";
1249   InstrItinClass Itinerary = NoItinerary;
1250   bit hasSideEffects = 1;
1251 }
1252
1253 class CLE_S_B_DESC : MSA_3R_DESC_BASE<"cle_s.b", int_mips_cle_s_b, MSA128B>;
1254 class CLE_S_H_DESC : MSA_3R_DESC_BASE<"cle_s.h", int_mips_cle_s_h, MSA128H>;
1255 class CLE_S_W_DESC : MSA_3R_DESC_BASE<"cle_s.w", int_mips_cle_s_w, MSA128W>;
1256 class CLE_S_D_DESC : MSA_3R_DESC_BASE<"cle_s.d", int_mips_cle_s_d, MSA128D>;
1257
1258 class CLE_U_B_DESC : MSA_3R_DESC_BASE<"cle_u.b", int_mips_cle_u_b, MSA128B>;
1259 class CLE_U_H_DESC : MSA_3R_DESC_BASE<"cle_u.h", int_mips_cle_u_h, MSA128H>;
1260 class CLE_U_W_DESC : MSA_3R_DESC_BASE<"cle_u.w", int_mips_cle_u_w, MSA128W>;
1261 class CLE_U_D_DESC : MSA_3R_DESC_BASE<"cle_u.d", int_mips_cle_u_d, MSA128D>;
1262
1263 class CLEI_S_B_DESC : MSA_SI5_DESC_BASE<"clei_s.b", int_mips_clei_s_b,
1264                                         MSA128B>;
1265 class CLEI_S_H_DESC : MSA_SI5_DESC_BASE<"clei_s.h", int_mips_clei_s_h,
1266                                         MSA128H>;
1267 class CLEI_S_W_DESC : MSA_SI5_DESC_BASE<"clei_s.w", int_mips_clei_s_w,
1268                                         MSA128W>;
1269 class CLEI_S_D_DESC : MSA_SI5_DESC_BASE<"clei_s.d", int_mips_clei_s_d,
1270                                         MSA128D>;
1271
1272 class CLEI_U_B_DESC : MSA_SI5_DESC_BASE<"clei_u.b", int_mips_clei_u_b,
1273                                         MSA128B>;
1274 class CLEI_U_H_DESC : MSA_SI5_DESC_BASE<"clei_u.h", int_mips_clei_u_h,
1275                                         MSA128H>;
1276 class CLEI_U_W_DESC : MSA_SI5_DESC_BASE<"clei_u.w", int_mips_clei_u_w,
1277                                         MSA128W>;
1278 class CLEI_U_D_DESC : MSA_SI5_DESC_BASE<"clei_u.d", int_mips_clei_u_d,
1279                                         MSA128D>;
1280
1281 class CLT_S_B_DESC : MSA_3R_DESC_BASE<"clt_s.b", int_mips_clt_s_b, MSA128B>;
1282 class CLT_S_H_DESC : MSA_3R_DESC_BASE<"clt_s.h", int_mips_clt_s_h, MSA128H>;
1283 class CLT_S_W_DESC : MSA_3R_DESC_BASE<"clt_s.w", int_mips_clt_s_w, MSA128W>;
1284 class CLT_S_D_DESC : MSA_3R_DESC_BASE<"clt_s.d", int_mips_clt_s_d, MSA128D>;
1285
1286 class CLT_U_B_DESC : MSA_3R_DESC_BASE<"clt_u.b", int_mips_clt_u_b, MSA128B>;
1287 class CLT_U_H_DESC : MSA_3R_DESC_BASE<"clt_u.h", int_mips_clt_u_h, MSA128H>;
1288 class CLT_U_W_DESC : MSA_3R_DESC_BASE<"clt_u.w", int_mips_clt_u_w, MSA128W>;
1289 class CLT_U_D_DESC : MSA_3R_DESC_BASE<"clt_u.d", int_mips_clt_u_d, MSA128D>;
1290
1291 class CLTI_S_B_DESC : MSA_SI5_DESC_BASE<"clti_s.b", int_mips_clti_s_b,
1292                                         MSA128B>;
1293 class CLTI_S_H_DESC : MSA_SI5_DESC_BASE<"clti_s.h", int_mips_clti_s_h,
1294                                         MSA128H>;
1295 class CLTI_S_W_DESC : MSA_SI5_DESC_BASE<"clti_s.w", int_mips_clti_s_w,
1296                                         MSA128W>;
1297 class CLTI_S_D_DESC : MSA_SI5_DESC_BASE<"clti_s.d", int_mips_clti_s_d,
1298                                         MSA128D>;
1299
1300 class CLTI_U_B_DESC : MSA_SI5_DESC_BASE<"clti_u.b", int_mips_clti_u_b,
1301                                         MSA128B>;
1302 class CLTI_U_H_DESC : MSA_SI5_DESC_BASE<"clti_u.h", int_mips_clti_u_h,
1303                                         MSA128H>;
1304 class CLTI_U_W_DESC : MSA_SI5_DESC_BASE<"clti_u.w", int_mips_clti_u_w,
1305                                         MSA128W>;
1306 class CLTI_U_D_DESC : MSA_SI5_DESC_BASE<"clti_u.d", int_mips_clti_u_d,
1307                                         MSA128D>;
1308
1309 class COPY_S_B_DESC : MSA_COPY_DESC_BASE<"copy_s.b", vextract_sext_i8,  v16i8,
1310                                          GPR32, MSA128B>;
1311 class COPY_S_H_DESC : MSA_COPY_DESC_BASE<"copy_s.h", vextract_sext_i16, v8i16,
1312                                          GPR32, MSA128H>;
1313 class COPY_S_W_DESC : MSA_COPY_DESC_BASE<"copy_s.w", vextract_sext_i32, v4i32,
1314                                          GPR32, MSA128W>;
1315
1316 class COPY_U_B_DESC : MSA_COPY_DESC_BASE<"copy_u.b", vextract_zext_i8,  v16i8,
1317                                          GPR32, MSA128B>;
1318 class COPY_U_H_DESC : MSA_COPY_DESC_BASE<"copy_u.h", vextract_zext_i16, v8i16,
1319                                          GPR32, MSA128H>;
1320 class COPY_U_W_DESC : MSA_COPY_DESC_BASE<"copy_u.w", vextract_zext_i32, v4i32,
1321                                          GPR32, MSA128W>;
1322
1323 class CTCMSA_DESC {
1324   dag OutOperandList = (outs);
1325   dag InOperandList = (ins MSACtrl:$cd, GPR32:$rs);
1326   string AsmString = "ctcmsa\t$cd, $rs";
1327   InstrItinClass Itinerary = NoItinerary;
1328   bit hasSideEffects = 1;
1329 }
1330
1331 class DIV_S_B_DESC : MSA_3R_DESC_BASE<"div_s.b", sdiv, MSA128B>;
1332 class DIV_S_H_DESC : MSA_3R_DESC_BASE<"div_s.h", sdiv, MSA128H>;
1333 class DIV_S_W_DESC : MSA_3R_DESC_BASE<"div_s.w", sdiv, MSA128W>;
1334 class DIV_S_D_DESC : MSA_3R_DESC_BASE<"div_s.d", sdiv, MSA128D>;
1335
1336 class DIV_U_B_DESC : MSA_3R_DESC_BASE<"div_u.b", udiv, MSA128B>;
1337 class DIV_U_H_DESC : MSA_3R_DESC_BASE<"div_u.h", udiv, MSA128H>;
1338 class DIV_U_W_DESC : MSA_3R_DESC_BASE<"div_u.w", udiv, MSA128W>;
1339 class DIV_U_D_DESC : MSA_3R_DESC_BASE<"div_u.d", udiv, MSA128D>;
1340
1341 class DOTP_S_H_DESC : MSA_3R_DESC_BASE<"dotp_s.h", int_mips_dotp_s_h, MSA128H,
1342                                        MSA128B, MSA128B>, IsCommutable;
1343 class DOTP_S_W_DESC : MSA_3R_DESC_BASE<"dotp_s.w", int_mips_dotp_s_w, MSA128W,
1344                                        MSA128H, MSA128H>, IsCommutable;
1345 class DOTP_S_D_DESC : MSA_3R_DESC_BASE<"dotp_s.d", int_mips_dotp_s_d, MSA128D,
1346                                        MSA128W, MSA128W>, IsCommutable;
1347
1348 class DOTP_U_H_DESC : MSA_3R_DESC_BASE<"dotp_u.h", int_mips_dotp_u_h, MSA128H,
1349                                        MSA128B, MSA128B>, IsCommutable;
1350 class DOTP_U_W_DESC : MSA_3R_DESC_BASE<"dotp_u.w", int_mips_dotp_u_w, MSA128W,
1351                                        MSA128H, MSA128H>, IsCommutable;
1352 class DOTP_U_D_DESC : MSA_3R_DESC_BASE<"dotp_u.d", int_mips_dotp_u_d, MSA128D,
1353                                        MSA128W, MSA128W>, IsCommutable;
1354
1355 class DPADD_S_H_DESC : MSA_3R_4R_DESC_BASE<"dpadd_s.h", int_mips_dpadd_s_h,
1356                                            MSA128H, MSA128B, MSA128B>,
1357                        IsCommutable;
1358 class DPADD_S_W_DESC : MSA_3R_4R_DESC_BASE<"dpadd_s.w", int_mips_dpadd_s_w,
1359                                            MSA128W, MSA128H, MSA128H>,
1360                        IsCommutable;
1361 class DPADD_S_D_DESC : MSA_3R_4R_DESC_BASE<"dpadd_s.d", int_mips_dpadd_s_d,
1362                                            MSA128D, MSA128W, MSA128W>,
1363                        IsCommutable;
1364
1365 class DPADD_U_H_DESC : MSA_3R_4R_DESC_BASE<"dpadd_u.h", int_mips_dpadd_u_h,
1366                                            MSA128H, MSA128B, MSA128B>,
1367                        IsCommutable;
1368 class DPADD_U_W_DESC : MSA_3R_4R_DESC_BASE<"dpadd_u.w", int_mips_dpadd_u_w,
1369                                            MSA128W, MSA128H, MSA128H>,
1370                        IsCommutable;
1371 class DPADD_U_D_DESC : MSA_3R_4R_DESC_BASE<"dpadd_u.d", int_mips_dpadd_u_d,
1372                                            MSA128D, MSA128W, MSA128W>,
1373                        IsCommutable;
1374
1375 class DPSUB_S_H_DESC : MSA_3R_4R_DESC_BASE<"dpsub_s.h", int_mips_dpsub_s_h,
1376                                            MSA128H, MSA128B, MSA128B>;
1377 class DPSUB_S_W_DESC : MSA_3R_4R_DESC_BASE<"dpsub_s.w", int_mips_dpsub_s_w,
1378                                            MSA128W, MSA128H, MSA128H>;
1379 class DPSUB_S_D_DESC : MSA_3R_4R_DESC_BASE<"dpsub_s.d", int_mips_dpsub_s_d,
1380                                            MSA128D, MSA128W, MSA128W>;
1381
1382 class DPSUB_U_H_DESC : MSA_3R_4R_DESC_BASE<"dpsub_u.h", int_mips_dpsub_u_h,
1383                                            MSA128H, MSA128B, MSA128B>;
1384 class DPSUB_U_W_DESC : MSA_3R_4R_DESC_BASE<"dpsub_u.w", int_mips_dpsub_u_w,
1385                                            MSA128W, MSA128H, MSA128H>;
1386 class DPSUB_U_D_DESC : MSA_3R_4R_DESC_BASE<"dpsub_u.d", int_mips_dpsub_u_d,
1387                                            MSA128D, MSA128W, MSA128W>;
1388
1389 class FADD_W_DESC : MSA_3RF_DESC_BASE<"fadd.w", fadd, MSA128W>, IsCommutable;
1390 class FADD_D_DESC : MSA_3RF_DESC_BASE<"fadd.d", fadd, MSA128D>, IsCommutable;
1391
1392 class FCAF_W_DESC : MSA_3RF_DESC_BASE<"fcaf.w", int_mips_fcaf_w, MSA128W>,
1393                     IsCommutable;
1394 class FCAF_D_DESC : MSA_3RF_DESC_BASE<"fcaf.d", int_mips_fcaf_d, MSA128D>,
1395                     IsCommutable;
1396
1397 class FCEQ_W_DESC : MSA_3RF_DESC_BASE<"fceq.w", int_mips_fceq_w, MSA128W>,
1398                     IsCommutable;
1399 class FCEQ_D_DESC : MSA_3RF_DESC_BASE<"fceq.d", int_mips_fceq_d, MSA128D>,
1400                     IsCommutable;
1401
1402 class FCLASS_W_DESC : MSA_2RF_DESC_BASE<"fclass.w", int_mips_fclass_w,
1403                                         MSA128W>;
1404 class FCLASS_D_DESC : MSA_2RF_DESC_BASE<"fclass.d", int_mips_fclass_d,
1405                                         MSA128D>;
1406
1407 class FCLE_W_DESC : MSA_3RF_DESC_BASE<"fcle.w", int_mips_fcle_w, MSA128W>;
1408 class FCLE_D_DESC : MSA_3RF_DESC_BASE<"fcle.d", int_mips_fcle_d, MSA128D>;
1409
1410 class FCLT_W_DESC : MSA_3RF_DESC_BASE<"fclt.w", int_mips_fclt_w, MSA128W>;
1411 class FCLT_D_DESC : MSA_3RF_DESC_BASE<"fclt.d", int_mips_fclt_d, MSA128D>;
1412
1413 class FCNE_W_DESC : MSA_3RF_DESC_BASE<"fcne.w", int_mips_fcne_w, MSA128W>,
1414                     IsCommutable;
1415 class FCNE_D_DESC : MSA_3RF_DESC_BASE<"fcne.d", int_mips_fcne_d, MSA128D>,
1416                     IsCommutable;
1417
1418 class FCOR_W_DESC : MSA_3RF_DESC_BASE<"fcor.w", int_mips_fcor_w, MSA128W>,
1419                     IsCommutable;
1420 class FCOR_D_DESC : MSA_3RF_DESC_BASE<"fcor.d", int_mips_fcor_d, MSA128D>,
1421                     IsCommutable;
1422
1423 class FCUEQ_W_DESC : MSA_3RF_DESC_BASE<"fcueq.w", int_mips_fcueq_w, MSA128W>,
1424                      IsCommutable;
1425 class FCUEQ_D_DESC : MSA_3RF_DESC_BASE<"fcueq.d", int_mips_fcueq_d, MSA128D>,
1426                      IsCommutable;
1427
1428 class FCULE_W_DESC : MSA_3RF_DESC_BASE<"fcule.w", int_mips_fcule_w, MSA128W>,
1429                      IsCommutable;
1430 class FCULE_D_DESC : MSA_3RF_DESC_BASE<"fcule.d", int_mips_fcule_d, MSA128D>,
1431                      IsCommutable;
1432
1433 class FCULT_W_DESC : MSA_3RF_DESC_BASE<"fcult.w", int_mips_fcult_w, MSA128W>,
1434                      IsCommutable;
1435 class FCULT_D_DESC : MSA_3RF_DESC_BASE<"fcult.d", int_mips_fcult_d, MSA128D>,
1436                      IsCommutable;
1437
1438 class FCUN_W_DESC : MSA_3RF_DESC_BASE<"fcun.w", int_mips_fcun_w, MSA128W>,
1439                     IsCommutable;
1440 class FCUN_D_DESC : MSA_3RF_DESC_BASE<"fcun.d", int_mips_fcun_d, MSA128D>,
1441                     IsCommutable;
1442
1443 class FCUNE_W_DESC : MSA_3RF_DESC_BASE<"fcune.w", int_mips_fcune_w, MSA128W>,
1444                      IsCommutable;
1445 class FCUNE_D_DESC : MSA_3RF_DESC_BASE<"fcune.d", int_mips_fcune_d, MSA128D>,
1446                      IsCommutable;
1447
1448 class FDIV_W_DESC : MSA_3RF_DESC_BASE<"fdiv.w", fdiv, MSA128W>;
1449 class FDIV_D_DESC : MSA_3RF_DESC_BASE<"fdiv.d", fdiv, MSA128D>;
1450
1451 class FEXDO_H_DESC : MSA_3RF_DESC_BASE<"fexdo.h", int_mips_fexdo_h,
1452                                        MSA128H, MSA128W, MSA128W>;
1453 class FEXDO_W_DESC : MSA_3RF_DESC_BASE<"fexdo.w", int_mips_fexdo_w,
1454                                        MSA128W, MSA128D, MSA128D>;
1455
1456 class FEXP2_W_DESC : MSA_3RF_DESC_BASE<"fexp2.w", int_mips_fexp2_w, MSA128W>;
1457 class FEXP2_D_DESC : MSA_3RF_DESC_BASE<"fexp2.d", int_mips_fexp2_d, MSA128D>;
1458
1459 class FEXUPL_W_DESC : MSA_2RF_DESC_BASE<"fexupl.w", int_mips_fexupl_w,
1460                                         MSA128W, MSA128H>;
1461 class FEXUPL_D_DESC : MSA_2RF_DESC_BASE<"fexupl.d", int_mips_fexupl_d,
1462                                         MSA128D, MSA128W>;
1463
1464 class FEXUPR_W_DESC : MSA_2RF_DESC_BASE<"fexupr.w", int_mips_fexupr_w,
1465                                         MSA128W, MSA128H>;
1466 class FEXUPR_D_DESC : MSA_2RF_DESC_BASE<"fexupr.d", int_mips_fexupr_d,
1467                                         MSA128D, MSA128W>;
1468
1469 class FFINT_S_W_DESC : MSA_2RF_DESC_BASE<"ffint_s.w", int_mips_ffint_s_w,
1470                                          MSA128W>;
1471 class FFINT_S_D_DESC : MSA_2RF_DESC_BASE<"ffint_s.d", int_mips_ffint_s_d,
1472                                          MSA128D>;
1473
1474 class FFINT_U_W_DESC : MSA_2RF_DESC_BASE<"ffint_u.w", int_mips_ffint_u_w,
1475                                          MSA128W>;
1476 class FFINT_U_D_DESC : MSA_2RF_DESC_BASE<"ffint_u.d", int_mips_ffint_u_d,
1477                                          MSA128D>;
1478
1479 class FFQL_W_DESC : MSA_2RF_DESC_BASE<"ffql.w", int_mips_ffql_w,
1480                                       MSA128W, MSA128H>;
1481 class FFQL_D_DESC : MSA_2RF_DESC_BASE<"ffql.d", int_mips_ffql_d,
1482                                       MSA128D, MSA128W>;
1483
1484 class FFQR_W_DESC : MSA_2RF_DESC_BASE<"ffqr.w", int_mips_ffqr_w,
1485                                       MSA128W, MSA128H>;
1486 class FFQR_D_DESC : MSA_2RF_DESC_BASE<"ffqr.d", int_mips_ffqr_d,
1487                                       MSA128D, MSA128W>;
1488
1489 class FILL_B_DESC : MSA_2R_DESC_BASE<"fill.b", vsplati8,  MSA128B, GPR32>;
1490 class FILL_H_DESC : MSA_2R_DESC_BASE<"fill.h", vsplati16, MSA128H, GPR32>;
1491 class FILL_W_DESC : MSA_2R_DESC_BASE<"fill.w", vsplati32, MSA128W, GPR32>;
1492
1493 class FLOG2_W_DESC : MSA_2RF_DESC_BASE<"flog2.w", flog2, MSA128W>;
1494 class FLOG2_D_DESC : MSA_2RF_DESC_BASE<"flog2.d", flog2, MSA128D>;
1495
1496 class FMADD_W_DESC : MSA_3RF_4RF_DESC_BASE<"fmadd.w", int_mips_fmadd_w,
1497                                            MSA128W>;
1498 class FMADD_D_DESC : MSA_3RF_4RF_DESC_BASE<"fmadd.d", int_mips_fmadd_d,
1499                                            MSA128D>;
1500
1501 class FMAX_W_DESC : MSA_3RF_DESC_BASE<"fmax.w", int_mips_fmax_w, MSA128W>;
1502 class FMAX_D_DESC : MSA_3RF_DESC_BASE<"fmax.d", int_mips_fmax_d, MSA128D>;
1503
1504 class FMAX_A_W_DESC : MSA_3RF_DESC_BASE<"fmax_a.w", int_mips_fmax_a_w,
1505                                         MSA128W>;
1506 class FMAX_A_D_DESC : MSA_3RF_DESC_BASE<"fmax_a.d", int_mips_fmax_a_d,
1507                                         MSA128D>;
1508
1509 class FMIN_W_DESC : MSA_3RF_DESC_BASE<"fmin.w", int_mips_fmin_w, MSA128W>;
1510 class FMIN_D_DESC : MSA_3RF_DESC_BASE<"fmin.d", int_mips_fmin_d, MSA128D>;
1511
1512 class FMIN_A_W_DESC : MSA_3RF_DESC_BASE<"fmin_a.w", int_mips_fmin_a_w,
1513                                         MSA128W>;
1514 class FMIN_A_D_DESC : MSA_3RF_DESC_BASE<"fmin_a.d", int_mips_fmin_a_d,
1515                                         MSA128D>;
1516
1517 class FMSUB_W_DESC : MSA_3RF_4RF_DESC_BASE<"fmsub.w", int_mips_fmsub_w,
1518                                            MSA128W>;
1519 class FMSUB_D_DESC : MSA_3RF_4RF_DESC_BASE<"fmsub.d", int_mips_fmsub_d,
1520                                            MSA128D>;
1521
1522 class FMUL_W_DESC : MSA_3RF_DESC_BASE<"fmul.w", fmul, MSA128W>;
1523 class FMUL_D_DESC : MSA_3RF_DESC_BASE<"fmul.d", fmul, MSA128D>;
1524
1525 class FRINT_W_DESC : MSA_2RF_DESC_BASE<"frint.w", frint, MSA128W>;
1526 class FRINT_D_DESC : MSA_2RF_DESC_BASE<"frint.d", frint, MSA128D>;
1527
1528 class FRCP_W_DESC : MSA_2RF_DESC_BASE<"frcp.w", int_mips_frcp_w, MSA128W>;
1529 class FRCP_D_DESC : MSA_2RF_DESC_BASE<"frcp.d", int_mips_frcp_d, MSA128D>;
1530
1531 class FRSQRT_W_DESC : MSA_2RF_DESC_BASE<"frsqrt.w", int_mips_frsqrt_w,
1532                                         MSA128W>;
1533 class FRSQRT_D_DESC : MSA_2RF_DESC_BASE<"frsqrt.d", int_mips_frsqrt_d,
1534                                         MSA128D>;
1535
1536 class FSAF_W_DESC : MSA_3RF_DESC_BASE<"fsaf.w", int_mips_fsaf_w, MSA128W>;
1537 class FSAF_D_DESC : MSA_3RF_DESC_BASE<"fsaf.d", int_mips_fsaf_d, MSA128D>;
1538
1539 class FSEQ_W_DESC : MSA_3RF_DESC_BASE<"fseq.w", int_mips_fseq_w, MSA128W>;
1540 class FSEQ_D_DESC : MSA_3RF_DESC_BASE<"fseq.d", int_mips_fseq_d, MSA128D>;
1541
1542 class FSLE_W_DESC : MSA_3RF_DESC_BASE<"fsle.w", int_mips_fsle_w, MSA128W>;
1543 class FSLE_D_DESC : MSA_3RF_DESC_BASE<"fsle.d", int_mips_fsle_d, MSA128D>;
1544
1545 class FSLT_W_DESC : MSA_3RF_DESC_BASE<"fslt.w", int_mips_fslt_w, MSA128W>;
1546 class FSLT_D_DESC : MSA_3RF_DESC_BASE<"fslt.d", int_mips_fslt_d, MSA128D>;
1547
1548 class FSNE_W_DESC : MSA_3RF_DESC_BASE<"fsne.w", int_mips_fsne_w, MSA128W>;
1549 class FSNE_D_DESC : MSA_3RF_DESC_BASE<"fsne.d", int_mips_fsne_d, MSA128D>;
1550
1551 class FSOR_W_DESC : MSA_3RF_DESC_BASE<"fsor.w", int_mips_fsor_w, MSA128W>;
1552 class FSOR_D_DESC : MSA_3RF_DESC_BASE<"fsor.d", int_mips_fsor_d, MSA128D>;
1553
1554 class FSQRT_W_DESC : MSA_2RF_DESC_BASE<"fsqrt.w", fsqrt, MSA128W>;
1555 class FSQRT_D_DESC : MSA_2RF_DESC_BASE<"fsqrt.d", fsqrt, MSA128D>;
1556
1557 class FSUB_W_DESC : MSA_3RF_DESC_BASE<"fsub.w", fsub, MSA128W>;
1558 class FSUB_D_DESC : MSA_3RF_DESC_BASE<"fsub.d", fsub, MSA128D>;
1559
1560 class FSUEQ_W_DESC : MSA_3RF_DESC_BASE<"fsueq.w", int_mips_fsueq_w, MSA128W>;
1561 class FSUEQ_D_DESC : MSA_3RF_DESC_BASE<"fsueq.d", int_mips_fsueq_d, MSA128D>;
1562
1563 class FSULE_W_DESC : MSA_3RF_DESC_BASE<"fsule.w", int_mips_fsule_w, MSA128W>;
1564 class FSULE_D_DESC : MSA_3RF_DESC_BASE<"fsule.d", int_mips_fsule_d, MSA128D>;
1565
1566 class FSULT_W_DESC : MSA_3RF_DESC_BASE<"fsult.w", int_mips_fsult_w, MSA128W>;
1567 class FSULT_D_DESC : MSA_3RF_DESC_BASE<"fsult.d", int_mips_fsult_d, MSA128D>;
1568
1569 class FSUN_W_DESC : MSA_3RF_DESC_BASE<"fsun.w", int_mips_fsun_w, MSA128W>;
1570 class FSUN_D_DESC : MSA_3RF_DESC_BASE<"fsun.d", int_mips_fsun_d, MSA128D>;
1571
1572 class FSUNE_W_DESC : MSA_3RF_DESC_BASE<"fsune.w", int_mips_fsune_w, MSA128W>;
1573 class FSUNE_D_DESC : MSA_3RF_DESC_BASE<"fsune.d", int_mips_fsune_d, MSA128D>;
1574
1575 class FTRUNC_S_W_DESC : MSA_2RF_DESC_BASE<"ftrunc_s.w", int_mips_ftrunc_s_w,
1576                                           MSA128W>;
1577 class FTRUNC_S_D_DESC : MSA_2RF_DESC_BASE<"ftrunc_s.d", int_mips_ftrunc_s_d,
1578                                           MSA128D>;
1579
1580 class FTRUNC_U_W_DESC : MSA_2RF_DESC_BASE<"ftrunc_u.w", int_mips_ftrunc_u_w,
1581                                           MSA128W>;
1582 class FTRUNC_U_D_DESC : MSA_2RF_DESC_BASE<"ftrunc_u.d", int_mips_ftrunc_u_d,
1583                                           MSA128D>;
1584
1585 class FTINT_S_W_DESC : MSA_2RF_DESC_BASE<"ftint_s.w", int_mips_ftint_s_w,
1586                                          MSA128W>;
1587 class FTINT_S_D_DESC : MSA_2RF_DESC_BASE<"ftint_s.d", int_mips_ftint_s_d,
1588                                          MSA128D>;
1589
1590 class FTINT_U_W_DESC : MSA_2RF_DESC_BASE<"ftint_u.w", int_mips_ftint_u_w,
1591                                          MSA128W>;
1592 class FTINT_U_D_DESC : MSA_2RF_DESC_BASE<"ftint_u.d", int_mips_ftint_u_d,
1593                                          MSA128D>;
1594
1595 class FTQ_H_DESC : MSA_3RF_DESC_BASE<"ftq.h", int_mips_ftq_h,
1596                                      MSA128H, MSA128W, MSA128W>;
1597 class FTQ_W_DESC : MSA_3RF_DESC_BASE<"ftq.w", int_mips_ftq_w,
1598                                      MSA128W, MSA128D, MSA128D>;
1599
1600 class HADD_S_H_DESC : MSA_3R_DESC_BASE<"hadd_s.h", int_mips_hadd_s_h, MSA128H,
1601                                        MSA128B, MSA128B>;
1602 class HADD_S_W_DESC : MSA_3R_DESC_BASE<"hadd_s.w", int_mips_hadd_s_w, MSA128W,
1603                                        MSA128H, MSA128H>;
1604 class HADD_S_D_DESC : MSA_3R_DESC_BASE<"hadd_s.d", int_mips_hadd_s_d, MSA128D,
1605                                        MSA128W, MSA128W>;
1606
1607 class HADD_U_H_DESC : MSA_3R_DESC_BASE<"hadd_u.h", int_mips_hadd_u_h, MSA128H,
1608                                        MSA128B, MSA128B>;
1609 class HADD_U_W_DESC : MSA_3R_DESC_BASE<"hadd_u.w", int_mips_hadd_u_w, MSA128W,
1610                                        MSA128H, MSA128H>;
1611 class HADD_U_D_DESC : MSA_3R_DESC_BASE<"hadd_u.d", int_mips_hadd_u_d, MSA128D,
1612                                        MSA128W, MSA128W>;
1613
1614 class HSUB_S_H_DESC : MSA_3R_DESC_BASE<"hsub_s.h", int_mips_hsub_s_h, MSA128H,
1615                                        MSA128B, MSA128B>;
1616 class HSUB_S_W_DESC : MSA_3R_DESC_BASE<"hsub_s.w", int_mips_hsub_s_w, MSA128W,
1617                                        MSA128H, MSA128H>;
1618 class HSUB_S_D_DESC : MSA_3R_DESC_BASE<"hsub_s.d", int_mips_hsub_s_d, MSA128D,
1619                                        MSA128W, MSA128W>;
1620
1621 class HSUB_U_H_DESC : MSA_3R_DESC_BASE<"hsub_u.h", int_mips_hsub_u_h, MSA128H,
1622                                        MSA128B, MSA128B>;
1623 class HSUB_U_W_DESC : MSA_3R_DESC_BASE<"hsub_u.w", int_mips_hsub_u_w, MSA128W,
1624                                        MSA128H, MSA128H>;
1625 class HSUB_U_D_DESC : MSA_3R_DESC_BASE<"hsub_u.d", int_mips_hsub_u_d, MSA128D,
1626                                        MSA128W, MSA128W>;
1627
1628 class ILVEV_B_DESC : MSA_3R_DESC_BASE<"ilvev.b", int_mips_ilvev_b, MSA128B>;
1629 class ILVEV_H_DESC : MSA_3R_DESC_BASE<"ilvev.h", int_mips_ilvev_h, MSA128H>;
1630 class ILVEV_W_DESC : MSA_3R_DESC_BASE<"ilvev.w", int_mips_ilvev_w, MSA128W>;
1631 class ILVEV_D_DESC : MSA_3R_DESC_BASE<"ilvev.d", int_mips_ilvev_d, MSA128D>;
1632
1633 class ILVL_B_DESC : MSA_3R_DESC_BASE<"ilvl.b", int_mips_ilvl_b, MSA128B>;
1634 class ILVL_H_DESC : MSA_3R_DESC_BASE<"ilvl.h", int_mips_ilvl_h, MSA128H>;
1635 class ILVL_W_DESC : MSA_3R_DESC_BASE<"ilvl.w", int_mips_ilvl_w, MSA128W>;
1636 class ILVL_D_DESC : MSA_3R_DESC_BASE<"ilvl.d", int_mips_ilvl_d, MSA128D>;
1637
1638 class ILVOD_B_DESC : MSA_3R_DESC_BASE<"ilvod.b", int_mips_ilvod_b, MSA128B>;
1639 class ILVOD_H_DESC : MSA_3R_DESC_BASE<"ilvod.h", int_mips_ilvod_h, MSA128H>;
1640 class ILVOD_W_DESC : MSA_3R_DESC_BASE<"ilvod.w", int_mips_ilvod_w, MSA128W>;
1641 class ILVOD_D_DESC : MSA_3R_DESC_BASE<"ilvod.d", int_mips_ilvod_d, MSA128D>;
1642
1643 class ILVR_B_DESC : MSA_3R_DESC_BASE<"ilvr.b", int_mips_ilvr_b, MSA128B>;
1644 class ILVR_H_DESC : MSA_3R_DESC_BASE<"ilvr.h", int_mips_ilvr_h, MSA128H>;
1645 class ILVR_W_DESC : MSA_3R_DESC_BASE<"ilvr.w", int_mips_ilvr_w, MSA128W>;
1646 class ILVR_D_DESC : MSA_3R_DESC_BASE<"ilvr.d", int_mips_ilvr_d, MSA128D>;
1647
1648 class INSERT_B_DESC : MSA_INSERT_DESC_BASE<"insert.b", vinsert_v16i8, MSA128B,
1649                                            GPR32>;
1650 class INSERT_H_DESC : MSA_INSERT_DESC_BASE<"insert.h", vinsert_v8i16, MSA128H,
1651                                            GPR32>;
1652 class INSERT_W_DESC : MSA_INSERT_DESC_BASE<"insert.w", vinsert_v4i32, MSA128W,
1653                                            GPR32>;
1654
1655 class INSVE_B_DESC : MSA_INSVE_DESC_BASE<"insve.b", int_mips_insve_b, MSA128B>;
1656 class INSVE_H_DESC : MSA_INSVE_DESC_BASE<"insve.h", int_mips_insve_h, MSA128H>;
1657 class INSVE_W_DESC : MSA_INSVE_DESC_BASE<"insve.w", int_mips_insve_w, MSA128W>;
1658 class INSVE_D_DESC : MSA_INSVE_DESC_BASE<"insve.d", int_mips_insve_d, MSA128D>;
1659
1660 class LD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1661                    ValueType TyNode, RegisterClass RCWD,
1662                    Operand MemOpnd = mem, ComplexPattern Addr = addrRegImm,
1663                    InstrItinClass itin = NoItinerary> {
1664   dag OutOperandList = (outs RCWD:$wd);
1665   dag InOperandList = (ins MemOpnd:$addr);
1666   string AsmString = !strconcat(instr_asm, "\t$wd, $addr");
1667   list<dag> Pattern = [(set RCWD:$wd, (TyNode (OpNode Addr:$addr)))];
1668   InstrItinClass Itinerary = itin;
1669 }
1670
1671 class LD_B_DESC : LD_DESC_BASE<"ld.b", load, v16i8, MSA128B>;
1672 class LD_H_DESC : LD_DESC_BASE<"ld.h", load, v8i16, MSA128H>;
1673 class LD_W_DESC : LD_DESC_BASE<"ld.w", load, v4i32, MSA128W>;
1674 class LD_D_DESC : LD_DESC_BASE<"ld.d", load, v2i64, MSA128D>;
1675
1676 class LDI_B_DESC : MSA_I10_DESC_BASE<"ldi.b", vsplati8,  MSA128B>;
1677 class LDI_H_DESC : MSA_I10_DESC_BASE<"ldi.h", vsplati16, MSA128H>;
1678 class LDI_W_DESC : MSA_I10_DESC_BASE<"ldi.w", vsplati32, MSA128W>;
1679 class LDI_D_DESC : MSA_I10_DESC_BASE<"ldi.d", vsplati64, MSA128D>;
1680
1681 class LDX_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1682                     ValueType TyNode, RegisterClass RCWD,
1683                     Operand MemOpnd = mem, ComplexPattern Addr = addrRegReg,
1684                     InstrItinClass itin = NoItinerary> {
1685   dag OutOperandList = (outs RCWD:$wd);
1686   dag InOperandList = (ins MemOpnd:$addr);
1687   string AsmString = !strconcat(instr_asm, "\t$wd, $addr");
1688   list<dag> Pattern = [(set RCWD:$wd, (TyNode (OpNode Addr:$addr)))];
1689   InstrItinClass Itinerary = itin;
1690 }
1691
1692 class LDX_B_DESC : LDX_DESC_BASE<"ldx.b", load, v16i8, MSA128B>;
1693 class LDX_H_DESC : LDX_DESC_BASE<"ldx.h", load, v8i16, MSA128H>;
1694 class LDX_W_DESC : LDX_DESC_BASE<"ldx.w", load, v4i32, MSA128W>;
1695 class LDX_D_DESC : LDX_DESC_BASE<"ldx.d", load, v2i64, MSA128D>;
1696
1697 class MADD_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"madd_q.h", int_mips_madd_q_h,
1698                                             MSA128H>;
1699 class MADD_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"madd_q.w", int_mips_madd_q_w,
1700                                             MSA128W>;
1701
1702 class MADDR_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"maddr_q.h", int_mips_maddr_q_h,
1703                                              MSA128H>;
1704 class MADDR_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"maddr_q.w", int_mips_maddr_q_w,
1705                                              MSA128W>;
1706
1707 class MADDV_B_DESC : MSA_3R_4R_DESC_BASE<"maddv.b", int_mips_maddv_b, MSA128B>;
1708 class MADDV_H_DESC : MSA_3R_4R_DESC_BASE<"maddv.h", int_mips_maddv_h, MSA128H>;
1709 class MADDV_W_DESC : MSA_3R_4R_DESC_BASE<"maddv.w", int_mips_maddv_w, MSA128W>;
1710 class MADDV_D_DESC : MSA_3R_4R_DESC_BASE<"maddv.d", int_mips_maddv_d, MSA128D>;
1711
1712 class MAX_A_B_DESC : MSA_3R_DESC_BASE<"max_a.b", int_mips_max_a_b, MSA128B>;
1713 class MAX_A_H_DESC : MSA_3R_DESC_BASE<"max_a.h", int_mips_max_a_h, MSA128H>;
1714 class MAX_A_W_DESC : MSA_3R_DESC_BASE<"max_a.w", int_mips_max_a_w, MSA128W>;
1715 class MAX_A_D_DESC : MSA_3R_DESC_BASE<"max_a.d", int_mips_max_a_d, MSA128D>;
1716
1717 class MAX_S_B_DESC : MSA_3R_DESC_BASE<"max_s.b", int_mips_max_s_b, MSA128B>;
1718 class MAX_S_H_DESC : MSA_3R_DESC_BASE<"max_s.h", int_mips_max_s_h, MSA128H>;
1719 class MAX_S_W_DESC : MSA_3R_DESC_BASE<"max_s.w", int_mips_max_s_w, MSA128W>;
1720 class MAX_S_D_DESC : MSA_3R_DESC_BASE<"max_s.d", int_mips_max_s_d, MSA128D>;
1721
1722 class MAX_U_B_DESC : MSA_3R_DESC_BASE<"max_u.b", int_mips_max_u_b, MSA128B>;
1723 class MAX_U_H_DESC : MSA_3R_DESC_BASE<"max_u.h", int_mips_max_u_h, MSA128H>;
1724 class MAX_U_W_DESC : MSA_3R_DESC_BASE<"max_u.w", int_mips_max_u_w, MSA128W>;
1725 class MAX_U_D_DESC : MSA_3R_DESC_BASE<"max_u.d", int_mips_max_u_d, MSA128D>;
1726
1727 class MAXI_S_B_DESC : MSA_I5_X_DESC_BASE<"maxi_s.b", int_mips_maxi_s_b,
1728                                          MSA128B>;
1729 class MAXI_S_H_DESC : MSA_I5_X_DESC_BASE<"maxi_s.h", int_mips_maxi_s_h,
1730                                          MSA128H>;
1731 class MAXI_S_W_DESC : MSA_I5_X_DESC_BASE<"maxi_s.w", int_mips_maxi_s_w,
1732                                          MSA128W>;
1733 class MAXI_S_D_DESC : MSA_I5_X_DESC_BASE<"maxi_s.d", int_mips_maxi_s_d,
1734                                          MSA128D>;
1735
1736 class MAXI_U_B_DESC : MSA_I5_X_DESC_BASE<"maxi_u.b", int_mips_maxi_u_b,
1737                                          MSA128B>;
1738 class MAXI_U_H_DESC : MSA_I5_X_DESC_BASE<"maxi_u.h", int_mips_maxi_u_h,
1739                                          MSA128H>;
1740 class MAXI_U_W_DESC : MSA_I5_X_DESC_BASE<"maxi_u.w", int_mips_maxi_u_w,
1741                                          MSA128W>;
1742 class MAXI_U_D_DESC : MSA_I5_X_DESC_BASE<"maxi_u.d", int_mips_maxi_u_d,
1743                                          MSA128D>;
1744
1745 class MIN_A_B_DESC : MSA_3R_DESC_BASE<"min_a.b", int_mips_min_a_b, MSA128B>;
1746 class MIN_A_H_DESC : MSA_3R_DESC_BASE<"min_a.h", int_mips_min_a_h, MSA128H>;
1747 class MIN_A_W_DESC : MSA_3R_DESC_BASE<"min_a.w", int_mips_min_a_w, MSA128W>;
1748 class MIN_A_D_DESC : MSA_3R_DESC_BASE<"min_a.d", int_mips_min_a_d, MSA128D>;
1749
1750 class MIN_S_B_DESC : MSA_3R_DESC_BASE<"min_s.b", int_mips_min_s_b, MSA128B>;
1751 class MIN_S_H_DESC : MSA_3R_DESC_BASE<"min_s.h", int_mips_min_s_h, MSA128H>;
1752 class MIN_S_W_DESC : MSA_3R_DESC_BASE<"min_s.w", int_mips_min_s_w, MSA128W>;
1753 class MIN_S_D_DESC : MSA_3R_DESC_BASE<"min_s.d", int_mips_min_s_d, MSA128D>;
1754
1755 class MIN_U_B_DESC : MSA_3R_DESC_BASE<"min_u.b", int_mips_min_u_b, MSA128B>;
1756 class MIN_U_H_DESC : MSA_3R_DESC_BASE<"min_u.h", int_mips_min_u_h, MSA128H>;
1757 class MIN_U_W_DESC : MSA_3R_DESC_BASE<"min_u.w", int_mips_min_u_w, MSA128W>;
1758 class MIN_U_D_DESC : MSA_3R_DESC_BASE<"min_u.d", int_mips_min_u_d, MSA128D>;
1759
1760 class MINI_S_B_DESC : MSA_I5_X_DESC_BASE<"mini_s.b", int_mips_mini_s_b,
1761                                          MSA128B>;
1762 class MINI_S_H_DESC : MSA_I5_X_DESC_BASE<"mini_s.h", int_mips_mini_s_h,
1763                                          MSA128H>;
1764 class MINI_S_W_DESC : MSA_I5_X_DESC_BASE<"mini_s.w", int_mips_mini_s_w,
1765                                          MSA128W>;
1766 class MINI_S_D_DESC : MSA_I5_X_DESC_BASE<"mini_s.d", int_mips_mini_s_d,
1767                                          MSA128D>;
1768
1769 class MINI_U_B_DESC : MSA_I5_X_DESC_BASE<"mini_u.b", int_mips_mini_u_b,
1770                                          MSA128B>;
1771 class MINI_U_H_DESC : MSA_I5_X_DESC_BASE<"mini_u.h", int_mips_mini_u_h,
1772                                          MSA128H>;
1773 class MINI_U_W_DESC : MSA_I5_X_DESC_BASE<"mini_u.w", int_mips_mini_u_w,
1774                                          MSA128W>;
1775 class MINI_U_D_DESC : MSA_I5_X_DESC_BASE<"mini_u.d", int_mips_mini_u_d,
1776                                          MSA128D>;
1777
1778 class MOD_S_B_DESC : MSA_3R_DESC_BASE<"mod_s.b", int_mips_mod_s_b, MSA128B>;
1779 class MOD_S_H_DESC : MSA_3R_DESC_BASE<"mod_s.h", int_mips_mod_s_h, MSA128H>;
1780 class MOD_S_W_DESC : MSA_3R_DESC_BASE<"mod_s.w", int_mips_mod_s_w, MSA128W>;
1781 class MOD_S_D_DESC : MSA_3R_DESC_BASE<"mod_s.d", int_mips_mod_s_d, MSA128D>;
1782
1783 class MOD_U_B_DESC : MSA_3R_DESC_BASE<"mod_u.b", int_mips_mod_u_b, MSA128B>;
1784 class MOD_U_H_DESC : MSA_3R_DESC_BASE<"mod_u.h", int_mips_mod_u_h, MSA128H>;
1785 class MOD_U_W_DESC : MSA_3R_DESC_BASE<"mod_u.w", int_mips_mod_u_w, MSA128W>;
1786 class MOD_U_D_DESC : MSA_3R_DESC_BASE<"mod_u.d", int_mips_mod_u_d, MSA128D>;
1787
1788 class MOVE_V_DESC {
1789   dag OutOperandList = (outs MSA128B:$wd);
1790   dag InOperandList = (ins MSA128B:$ws);
1791   string AsmString = "move.v\t$wd, $ws";
1792   list<dag> Pattern = [];
1793   InstrItinClass Itinerary = NoItinerary;
1794 }
1795
1796 class MSUB_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"msub_q.h", int_mips_msub_q_h,
1797                                             MSA128H>;
1798 class MSUB_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"msub_q.w", int_mips_msub_q_w,
1799                                             MSA128W>;
1800
1801 class MSUBR_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"msubr_q.h", int_mips_msubr_q_h,
1802                                              MSA128H>;
1803 class MSUBR_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"msubr_q.w", int_mips_msubr_q_w,
1804                                              MSA128W>;
1805
1806 class MSUBV_B_DESC : MSA_3R_4R_DESC_BASE<"msubv.b", int_mips_msubv_b, MSA128B>;
1807 class MSUBV_H_DESC : MSA_3R_4R_DESC_BASE<"msubv.h", int_mips_msubv_h, MSA128H>;
1808 class MSUBV_W_DESC : MSA_3R_4R_DESC_BASE<"msubv.w", int_mips_msubv_w, MSA128W>;
1809 class MSUBV_D_DESC : MSA_3R_4R_DESC_BASE<"msubv.d", int_mips_msubv_d, MSA128D>;
1810
1811 class MUL_Q_H_DESC : MSA_3RF_DESC_BASE<"mul_q.h", int_mips_mul_q_h, MSA128H>;
1812 class MUL_Q_W_DESC : MSA_3RF_DESC_BASE<"mul_q.w", int_mips_mul_q_w, MSA128W>;
1813
1814 class MULR_Q_H_DESC : MSA_3RF_DESC_BASE<"mulr_q.h", int_mips_mulr_q_h,
1815                                         MSA128H>;
1816 class MULR_Q_W_DESC : MSA_3RF_DESC_BASE<"mulr_q.w", int_mips_mulr_q_w,
1817                                         MSA128W>;
1818
1819 class MULV_B_DESC : MSA_3R_DESC_BASE<"mulv.b", mul, MSA128B>;
1820 class MULV_H_DESC : MSA_3R_DESC_BASE<"mulv.h", mul, MSA128H>;
1821 class MULV_W_DESC : MSA_3R_DESC_BASE<"mulv.w", mul, MSA128W>;
1822 class MULV_D_DESC : MSA_3R_DESC_BASE<"mulv.d", mul, MSA128D>;
1823
1824 class NLOC_B_DESC : MSA_2R_DESC_BASE<"nloc.b", int_mips_nloc_b, MSA128B>;
1825 class NLOC_H_DESC : MSA_2R_DESC_BASE<"nloc.h", int_mips_nloc_h, MSA128H>;
1826 class NLOC_W_DESC : MSA_2R_DESC_BASE<"nloc.w", int_mips_nloc_w, MSA128W>;
1827 class NLOC_D_DESC : MSA_2R_DESC_BASE<"nloc.d", int_mips_nloc_d, MSA128D>;
1828
1829 class NLZC_B_DESC : MSA_2R_DESC_BASE<"nlzc.b", ctlz, MSA128B>;
1830 class NLZC_H_DESC : MSA_2R_DESC_BASE<"nlzc.h", ctlz, MSA128H>;
1831 class NLZC_W_DESC : MSA_2R_DESC_BASE<"nlzc.w", ctlz, MSA128W>;
1832 class NLZC_D_DESC : MSA_2R_DESC_BASE<"nlzc.d", ctlz, MSA128D>;
1833
1834 class NOR_V_DESC : MSA_VEC_DESC_BASE<"nor.v", MipsVNOR, MSA128B>;
1835 class NOR_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<MipsVNOR, MSA128H>;
1836 class NOR_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<MipsVNOR, MSA128W>;
1837 class NOR_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<MipsVNOR, MSA128D>;
1838
1839 class NORI_B_DESC : MSA_I8_DESC_BASE<"nori.b", int_mips_nori_b, MSA128B>;
1840
1841 class OR_V_DESC : MSA_VEC_DESC_BASE<"or.v", or, MSA128B>;
1842 class OR_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<or, MSA128H>;
1843 class OR_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<or, MSA128W>;
1844 class OR_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<or, MSA128D>;
1845
1846 class ORI_B_DESC : MSA_I8_DESC_BASE<"ori.b", int_mips_ori_b, MSA128B>;
1847
1848 class PCKEV_B_DESC : MSA_3R_DESC_BASE<"pckev.b", int_mips_pckev_b, MSA128B>;
1849 class PCKEV_H_DESC : MSA_3R_DESC_BASE<"pckev.h", int_mips_pckev_h, MSA128H>;
1850 class PCKEV_W_DESC : MSA_3R_DESC_BASE<"pckev.w", int_mips_pckev_w, MSA128W>;
1851 class PCKEV_D_DESC : MSA_3R_DESC_BASE<"pckev.d", int_mips_pckev_d, MSA128D>;
1852
1853 class PCKOD_B_DESC : MSA_3R_DESC_BASE<"pckod.b", int_mips_pckod_b, MSA128B>;
1854 class PCKOD_H_DESC : MSA_3R_DESC_BASE<"pckod.h", int_mips_pckod_h, MSA128H>;
1855 class PCKOD_W_DESC : MSA_3R_DESC_BASE<"pckod.w", int_mips_pckod_w, MSA128W>;
1856 class PCKOD_D_DESC : MSA_3R_DESC_BASE<"pckod.d", int_mips_pckod_d, MSA128D>;
1857
1858 class PCNT_B_DESC : MSA_2R_DESC_BASE<"pcnt.b", ctpop, MSA128B>;
1859 class PCNT_H_DESC : MSA_2R_DESC_BASE<"pcnt.h", ctpop, MSA128H>;
1860 class PCNT_W_DESC : MSA_2R_DESC_BASE<"pcnt.w", ctpop, MSA128W>;
1861 class PCNT_D_DESC : MSA_2R_DESC_BASE<"pcnt.d", ctpop, MSA128D>;
1862
1863 class SAT_S_B_DESC : MSA_BIT_B_DESC_BASE<"sat_s.b", int_mips_sat_s_b, MSA128B>;
1864 class SAT_S_H_DESC : MSA_BIT_H_DESC_BASE<"sat_s.h", int_mips_sat_s_h, MSA128H>;
1865 class SAT_S_W_DESC : MSA_BIT_W_DESC_BASE<"sat_s.w", int_mips_sat_s_w, MSA128W>;
1866 class SAT_S_D_DESC : MSA_BIT_D_DESC_BASE<"sat_s.d", int_mips_sat_s_d, MSA128D>;
1867
1868 class SAT_U_B_DESC : MSA_BIT_B_DESC_BASE<"sat_u.b", int_mips_sat_u_b, MSA128B>;
1869 class SAT_U_H_DESC : MSA_BIT_H_DESC_BASE<"sat_u.h", int_mips_sat_u_h, MSA128H>;
1870 class SAT_U_W_DESC : MSA_BIT_W_DESC_BASE<"sat_u.w", int_mips_sat_u_w, MSA128W>;
1871 class SAT_U_D_DESC : MSA_BIT_D_DESC_BASE<"sat_u.d", int_mips_sat_u_d, MSA128D>;
1872
1873 class SHF_B_DESC : MSA_I8_DESC_BASE<"shf.b", int_mips_shf_b, MSA128B>;
1874 class SHF_H_DESC : MSA_I8_DESC_BASE<"shf.h", int_mips_shf_h, MSA128H>;
1875 class SHF_W_DESC : MSA_I8_DESC_BASE<"shf.w", int_mips_shf_w, MSA128W>;
1876
1877 class SLD_B_DESC : MSA_3R_DESC_BASE<"sld.b", int_mips_sld_b, MSA128B>;
1878 class SLD_H_DESC : MSA_3R_DESC_BASE<"sld.h", int_mips_sld_h, MSA128H>;
1879 class SLD_W_DESC : MSA_3R_DESC_BASE<"sld.w", int_mips_sld_w, MSA128W>;
1880 class SLD_D_DESC : MSA_3R_DESC_BASE<"sld.d", int_mips_sld_d, MSA128D>;
1881
1882 class SLDI_B_DESC : MSA_BIT_B_DESC_BASE<"sldi.b", int_mips_sldi_b, MSA128B>;
1883 class SLDI_H_DESC : MSA_BIT_H_DESC_BASE<"sldi.h", int_mips_sldi_h, MSA128H>;
1884 class SLDI_W_DESC : MSA_BIT_W_DESC_BASE<"sldi.w", int_mips_sldi_w, MSA128W>;
1885 class SLDI_D_DESC : MSA_BIT_D_DESC_BASE<"sldi.d", int_mips_sldi_d, MSA128D>;
1886
1887 class SLL_B_DESC : MSA_3R_DESC_BASE<"sll.b", shl, MSA128B>;
1888 class SLL_H_DESC : MSA_3R_DESC_BASE<"sll.h", shl, MSA128H>;
1889 class SLL_W_DESC : MSA_3R_DESC_BASE<"sll.w", shl, MSA128W>;
1890 class SLL_D_DESC : MSA_3R_DESC_BASE<"sll.d", shl, MSA128D>;
1891
1892 class SLLI_B_DESC : MSA_BIT_SPLATB_DESC_BASE<"slli.b", shl, MSA128B>;
1893 class SLLI_H_DESC : MSA_BIT_SPLATH_DESC_BASE<"slli.h", shl, MSA128H>;
1894 class SLLI_W_DESC : MSA_BIT_SPLATW_DESC_BASE<"slli.w", shl, MSA128W>;
1895 class SLLI_D_DESC : MSA_BIT_SPLATD_DESC_BASE<"slli.d", shl, MSA128D>;
1896
1897 class SPLAT_B_DESC : MSA_3R_DESC_BASE<"splat.b", int_mips_splat_b, MSA128B,
1898                                       MSA128B, GPR32>;
1899 class SPLAT_H_DESC : MSA_3R_DESC_BASE<"splat.h", int_mips_splat_h, MSA128H,
1900                                       MSA128H, GPR32>;
1901 class SPLAT_W_DESC : MSA_3R_DESC_BASE<"splat.w", int_mips_splat_w, MSA128W,
1902                                       MSA128W, GPR32>;
1903 class SPLAT_D_DESC : MSA_3R_DESC_BASE<"splat.d", int_mips_splat_d, MSA128D,
1904                                       MSA128D, GPR32>;
1905
1906 class SPLATI_B_DESC : MSA_BIT_B_DESC_BASE<"splati.b", int_mips_splati_b,
1907                                           MSA128B>;
1908 class SPLATI_H_DESC : MSA_BIT_H_DESC_BASE<"splati.h", int_mips_splati_h,
1909                                           MSA128H>;
1910 class SPLATI_W_DESC : MSA_BIT_W_DESC_BASE<"splati.w", int_mips_splati_w,
1911                                           MSA128W>;
1912 class SPLATI_D_DESC : MSA_BIT_D_DESC_BASE<"splati.d", int_mips_splati_d,
1913                                           MSA128D>;
1914
1915 class SRA_B_DESC : MSA_3R_DESC_BASE<"sra.b", sra, MSA128B>;
1916 class SRA_H_DESC : MSA_3R_DESC_BASE<"sra.h", sra, MSA128H>;
1917 class SRA_W_DESC : MSA_3R_DESC_BASE<"sra.w", sra, MSA128W>;
1918 class SRA_D_DESC : MSA_3R_DESC_BASE<"sra.d", sra, MSA128D>;
1919
1920 class SRAI_B_DESC : MSA_BIT_SPLATB_DESC_BASE<"srai.b", sra, MSA128B>;
1921 class SRAI_H_DESC : MSA_BIT_SPLATH_DESC_BASE<"srai.h", sra, MSA128H>;
1922 class SRAI_W_DESC : MSA_BIT_SPLATW_DESC_BASE<"srai.w", sra, MSA128W>;
1923 class SRAI_D_DESC : MSA_BIT_SPLATD_DESC_BASE<"srai.d", sra, MSA128D>;
1924
1925 class SRAR_B_DESC : MSA_3R_DESC_BASE<"srar.b", int_mips_srar_b, MSA128B>;
1926 class SRAR_H_DESC : MSA_3R_DESC_BASE<"srar.h", int_mips_srar_h, MSA128H>;
1927 class SRAR_W_DESC : MSA_3R_DESC_BASE<"srar.w", int_mips_srar_w, MSA128W>;
1928 class SRAR_D_DESC : MSA_3R_DESC_BASE<"srar.d", int_mips_srar_d, MSA128D>;
1929
1930 class SRARI_B_DESC : MSA_BIT_B_DESC_BASE<"srari.b", int_mips_srari_b, MSA128B>;
1931 class SRARI_H_DESC : MSA_BIT_H_DESC_BASE<"srari.h", int_mips_srari_h, MSA128H>;
1932 class SRARI_W_DESC : MSA_BIT_W_DESC_BASE<"srari.w", int_mips_srari_w, MSA128W>;
1933 class SRARI_D_DESC : MSA_BIT_D_DESC_BASE<"srari.d", int_mips_srari_d, MSA128D>;
1934
1935 class SRL_B_DESC : MSA_3R_DESC_BASE<"srl.b", srl, MSA128B>;
1936 class SRL_H_DESC : MSA_3R_DESC_BASE<"srl.h", srl, MSA128H>;
1937 class SRL_W_DESC : MSA_3R_DESC_BASE<"srl.w", srl, MSA128W>;
1938 class SRL_D_DESC : MSA_3R_DESC_BASE<"srl.d", srl, MSA128D>;
1939
1940 class SRLI_B_DESC : MSA_BIT_SPLATB_DESC_BASE<"srli.b", srl, MSA128B>;
1941 class SRLI_H_DESC : MSA_BIT_SPLATH_DESC_BASE<"srli.h", srl, MSA128H>;
1942 class SRLI_W_DESC : MSA_BIT_SPLATW_DESC_BASE<"srli.w", srl, MSA128W>;
1943 class SRLI_D_DESC : MSA_BIT_SPLATD_DESC_BASE<"srli.d", srl, MSA128D>;
1944
1945 class SRLR_B_DESC : MSA_3R_DESC_BASE<"srlr.b", int_mips_srlr_b, MSA128B>;
1946 class SRLR_H_DESC : MSA_3R_DESC_BASE<"srlr.h", int_mips_srlr_h, MSA128H>;
1947 class SRLR_W_DESC : MSA_3R_DESC_BASE<"srlr.w", int_mips_srlr_w, MSA128W>;
1948 class SRLR_D_DESC : MSA_3R_DESC_BASE<"srlr.d", int_mips_srlr_d, MSA128D>;
1949
1950 class SRLRI_B_DESC : MSA_BIT_B_DESC_BASE<"srlri.b", int_mips_srlri_b, MSA128B>;
1951 class SRLRI_H_DESC : MSA_BIT_H_DESC_BASE<"srlri.h", int_mips_srlri_h, MSA128H>;
1952 class SRLRI_W_DESC : MSA_BIT_W_DESC_BASE<"srlri.w", int_mips_srlri_w, MSA128W>;
1953 class SRLRI_D_DESC : MSA_BIT_D_DESC_BASE<"srlri.d", int_mips_srlri_d, MSA128D>;
1954
1955 class ST_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1956                    ValueType TyNode, RegisterClass RCWD,
1957                    Operand MemOpnd = mem, ComplexPattern Addr = addrRegImm,
1958                    InstrItinClass itin = NoItinerary> {
1959   dag OutOperandList = (outs);
1960   dag InOperandList = (ins RCWD:$wd, MemOpnd:$addr);
1961   string AsmString = !strconcat(instr_asm, "\t$wd, $addr");
1962   list<dag> Pattern = [(OpNode (TyNode RCWD:$wd), Addr:$addr)];
1963   InstrItinClass Itinerary = itin;
1964 }
1965
1966 class ST_B_DESC : ST_DESC_BASE<"st.b", store, v16i8, MSA128B>;
1967 class ST_H_DESC : ST_DESC_BASE<"st.h", store, v8i16, MSA128H>;
1968 class ST_W_DESC : ST_DESC_BASE<"st.w", store, v4i32, MSA128W>;
1969 class ST_D_DESC : ST_DESC_BASE<"st.d", store, v2i64, MSA128D>;
1970
1971 class STX_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1972                     ValueType TyNode, RegisterClass RCWD,
1973                     Operand MemOpnd = mem, ComplexPattern Addr = addrRegReg,
1974                     InstrItinClass itin = NoItinerary> {
1975   dag OutOperandList = (outs);
1976   dag InOperandList = (ins RCWD:$wd, MemOpnd:$addr);
1977   string AsmString = !strconcat(instr_asm, "\t$wd, $addr");
1978   list<dag> Pattern = [(OpNode (TyNode RCWD:$wd), Addr:$addr)];
1979   InstrItinClass Itinerary = itin;
1980 }
1981
1982 class STX_B_DESC : STX_DESC_BASE<"stx.b", store, v16i8, MSA128B>;
1983 class STX_H_DESC : STX_DESC_BASE<"stx.h", store, v8i16, MSA128H>;
1984 class STX_W_DESC : STX_DESC_BASE<"stx.w", store, v4i32, MSA128W>;
1985 class STX_D_DESC : STX_DESC_BASE<"stx.d", store, v2i64, MSA128D>;
1986
1987 class SUBS_S_B_DESC : MSA_3R_DESC_BASE<"subs_s.b", int_mips_subs_s_b, MSA128B>;
1988 class SUBS_S_H_DESC : MSA_3R_DESC_BASE<"subs_s.h", int_mips_subs_s_h, MSA128H>;
1989 class SUBS_S_W_DESC : MSA_3R_DESC_BASE<"subs_s.w", int_mips_subs_s_w, MSA128W>;
1990 class SUBS_S_D_DESC : MSA_3R_DESC_BASE<"subs_s.d", int_mips_subs_s_d, MSA128D>;
1991
1992 class SUBS_U_B_DESC : MSA_3R_DESC_BASE<"subs_u.b", int_mips_subs_u_b, MSA128B>;
1993 class SUBS_U_H_DESC : MSA_3R_DESC_BASE<"subs_u.h", int_mips_subs_u_h, MSA128H>;
1994 class SUBS_U_W_DESC : MSA_3R_DESC_BASE<"subs_u.w", int_mips_subs_u_w, MSA128W>;
1995 class SUBS_U_D_DESC : MSA_3R_DESC_BASE<"subs_u.d", int_mips_subs_u_d, MSA128D>;
1996
1997 class SUBSUS_U_B_DESC : MSA_3R_DESC_BASE<"subsus_u.b", int_mips_subsus_u_b,
1998                                          MSA128B>;
1999 class SUBSUS_U_H_DESC : MSA_3R_DESC_BASE<"subsus_u.h", int_mips_subsus_u_h,
2000                                          MSA128H>;
2001 class SUBSUS_U_W_DESC : MSA_3R_DESC_BASE<"subsus_u.w", int_mips_subsus_u_w,
2002                                          MSA128W>;
2003 class SUBSUS_U_D_DESC : MSA_3R_DESC_BASE<"subsus_u.d", int_mips_subsus_u_d,
2004                                          MSA128D>;
2005
2006 class SUBSUU_S_B_DESC : MSA_3R_DESC_BASE<"subsuu_s.b", int_mips_subsuu_s_b,
2007                                          MSA128B>;
2008 class SUBSUU_S_H_DESC : MSA_3R_DESC_BASE<"subsuu_s.h", int_mips_subsuu_s_h,
2009                                          MSA128H>;
2010 class SUBSUU_S_W_DESC : MSA_3R_DESC_BASE<"subsuu_s.w", int_mips_subsuu_s_w,
2011                                          MSA128W>;
2012 class SUBSUU_S_D_DESC : MSA_3R_DESC_BASE<"subsuu_s.d", int_mips_subsuu_s_d,
2013                                          MSA128D>;
2014
2015 class SUBV_B_DESC : MSA_3R_DESC_BASE<"subv.b", sub, MSA128B>;
2016 class SUBV_H_DESC : MSA_3R_DESC_BASE<"subv.h", sub, MSA128H>;
2017 class SUBV_W_DESC : MSA_3R_DESC_BASE<"subv.w", sub, MSA128W>;
2018 class SUBV_D_DESC : MSA_3R_DESC_BASE<"subv.d", sub, MSA128D>;
2019
2020 class SUBVI_B_DESC : MSA_I5_DESC_BASE<"subvi.b", sub, vsplati8,  MSA128B>;
2021 class SUBVI_H_DESC : MSA_I5_DESC_BASE<"subvi.h", sub, vsplati16, MSA128H>;
2022 class SUBVI_W_DESC : MSA_I5_DESC_BASE<"subvi.w", sub, vsplati32, MSA128W>;
2023 class SUBVI_D_DESC : MSA_I5_DESC_BASE<"subvi.d", sub, vsplati64, MSA128D>;
2024
2025 class VSHF_B_DESC : MSA_3R_DESC_BASE<"vshf.b", int_mips_vshf_b, MSA128B>;
2026 class VSHF_H_DESC : MSA_3R_DESC_BASE<"vshf.h", int_mips_vshf_h, MSA128H>;
2027 class VSHF_W_DESC : MSA_3R_DESC_BASE<"vshf.w", int_mips_vshf_w, MSA128W>;
2028 class VSHF_D_DESC : MSA_3R_DESC_BASE<"vshf.d", int_mips_vshf_d, MSA128D>;
2029
2030 class XOR_V_DESC : MSA_VEC_DESC_BASE<"xor.v", xor, MSA128B>;
2031 class XOR_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<xor, MSA128H>;
2032 class XOR_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<xor, MSA128W>;
2033 class XOR_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<xor, MSA128D>;
2034
2035 class XORI_B_DESC : MSA_I8_DESC_BASE<"xori.b", int_mips_xori_b, MSA128B>;
2036
2037 // Instruction defs.
2038 def ADD_A_B : ADD_A_B_ENC, ADD_A_B_DESC;
2039 def ADD_A_H : ADD_A_H_ENC, ADD_A_H_DESC;
2040 def ADD_A_W : ADD_A_W_ENC, ADD_A_W_DESC;
2041 def ADD_A_D : ADD_A_D_ENC, ADD_A_D_DESC;
2042
2043 def ADDS_A_B : ADDS_A_B_ENC, ADDS_A_B_DESC;
2044 def ADDS_A_H : ADDS_A_H_ENC, ADDS_A_H_DESC;
2045 def ADDS_A_W : ADDS_A_W_ENC, ADDS_A_W_DESC;
2046 def ADDS_A_D : ADDS_A_D_ENC, ADDS_A_D_DESC;
2047
2048 def ADDS_S_B : ADDS_S_B_ENC, ADDS_S_B_DESC;
2049 def ADDS_S_H : ADDS_S_H_ENC, ADDS_S_H_DESC;
2050 def ADDS_S_W : ADDS_S_W_ENC, ADDS_S_W_DESC;
2051 def ADDS_S_D : ADDS_S_D_ENC, ADDS_S_D_DESC;
2052
2053 def ADDS_U_B : ADDS_U_B_ENC, ADDS_U_B_DESC;
2054 def ADDS_U_H : ADDS_U_H_ENC, ADDS_U_H_DESC;
2055 def ADDS_U_W : ADDS_U_W_ENC, ADDS_U_W_DESC;
2056 def ADDS_U_D : ADDS_U_D_ENC, ADDS_U_D_DESC;
2057
2058 def ADDV_B : ADDV_B_ENC, ADDV_B_DESC;
2059 def ADDV_H : ADDV_H_ENC, ADDV_H_DESC;
2060 def ADDV_W : ADDV_W_ENC, ADDV_W_DESC;
2061 def ADDV_D : ADDV_D_ENC, ADDV_D_DESC;
2062
2063 def ADDVI_B : ADDVI_B_ENC, ADDVI_B_DESC;
2064 def ADDVI_H : ADDVI_H_ENC, ADDVI_H_DESC;
2065 def ADDVI_W : ADDVI_W_ENC, ADDVI_W_DESC;
2066 def ADDVI_D : ADDVI_D_ENC, ADDVI_D_DESC;
2067
2068 def AND_V : AND_V_ENC, AND_V_DESC;
2069 def AND_V_H_PSEUDO : AND_V_H_PSEUDO_DESC,
2070                      PseudoInstExpansion<(AND_V MSA128B:$wd,
2071                                                 MSA128B:$ws, MSA128B:$wt)>;
2072 def AND_V_W_PSEUDO : AND_V_W_PSEUDO_DESC,
2073                      PseudoInstExpansion<(AND_V MSA128B:$wd,
2074                                                 MSA128B:$ws, MSA128B:$wt)>;
2075 def AND_V_D_PSEUDO : AND_V_D_PSEUDO_DESC,
2076                      PseudoInstExpansion<(AND_V MSA128B:$wd,
2077                                                 MSA128B:$ws, MSA128B:$wt)>;
2078
2079 def ANDI_B : ANDI_B_ENC, ANDI_B_DESC;
2080
2081 def ASUB_S_B : ASUB_S_B_ENC, ASUB_S_B_DESC;
2082 def ASUB_S_H : ASUB_S_H_ENC, ASUB_S_H_DESC;
2083 def ASUB_S_W : ASUB_S_W_ENC, ASUB_S_W_DESC;
2084 def ASUB_S_D : ASUB_S_D_ENC, ASUB_S_D_DESC;
2085
2086 def ASUB_U_B : ASUB_U_B_ENC, ASUB_U_B_DESC;
2087 def ASUB_U_H : ASUB_U_H_ENC, ASUB_U_H_DESC;
2088 def ASUB_U_W : ASUB_U_W_ENC, ASUB_U_W_DESC;
2089 def ASUB_U_D : ASUB_U_D_ENC, ASUB_U_D_DESC;
2090
2091 def AVE_S_B : AVE_S_B_ENC, AVE_S_B_DESC;
2092 def AVE_S_H : AVE_S_H_ENC, AVE_S_H_DESC;
2093 def AVE_S_W : AVE_S_W_ENC, AVE_S_W_DESC;
2094 def AVE_S_D : AVE_S_D_ENC, AVE_S_D_DESC;
2095
2096 def AVE_U_B : AVE_U_B_ENC, AVE_U_B_DESC;
2097 def AVE_U_H : AVE_U_H_ENC, AVE_U_H_DESC;
2098 def AVE_U_W : AVE_U_W_ENC, AVE_U_W_DESC;
2099 def AVE_U_D : AVE_U_D_ENC, AVE_U_D_DESC;
2100
2101 def AVER_S_B : AVER_S_B_ENC, AVER_S_B_DESC;
2102 def AVER_S_H : AVER_S_H_ENC, AVER_S_H_DESC;
2103 def AVER_S_W : AVER_S_W_ENC, AVER_S_W_DESC;
2104 def AVER_S_D : AVER_S_D_ENC, AVER_S_D_DESC;
2105
2106 def AVER_U_B : AVER_U_B_ENC, AVER_U_B_DESC;
2107 def AVER_U_H : AVER_U_H_ENC, AVER_U_H_DESC;
2108 def AVER_U_W : AVER_U_W_ENC, AVER_U_W_DESC;
2109 def AVER_U_D : AVER_U_D_ENC, AVER_U_D_DESC;
2110
2111 def BCLR_B : BCLR_B_ENC, BCLR_B_DESC;
2112 def BCLR_H : BCLR_H_ENC, BCLR_H_DESC;
2113 def BCLR_W : BCLR_W_ENC, BCLR_W_DESC;
2114 def BCLR_D : BCLR_D_ENC, BCLR_D_DESC;
2115
2116 def BCLRI_B : BCLRI_B_ENC, BCLRI_B_DESC;
2117 def BCLRI_H : BCLRI_H_ENC, BCLRI_H_DESC;
2118 def BCLRI_W : BCLRI_W_ENC, BCLRI_W_DESC;
2119 def BCLRI_D : BCLRI_D_ENC, BCLRI_D_DESC;
2120
2121 def BINSL_B : BINSL_B_ENC, BINSL_B_DESC;
2122 def BINSL_H : BINSL_H_ENC, BINSL_H_DESC;
2123 def BINSL_W : BINSL_W_ENC, BINSL_W_DESC;
2124 def BINSL_D : BINSL_D_ENC, BINSL_D_DESC;
2125
2126 def BINSLI_B : BINSLI_B_ENC, BINSLI_B_DESC;
2127 def BINSLI_H : BINSLI_H_ENC, BINSLI_H_DESC;
2128 def BINSLI_W : BINSLI_W_ENC, BINSLI_W_DESC;
2129 def BINSLI_D : BINSLI_D_ENC, BINSLI_D_DESC;
2130
2131 def BINSR_B : BINSR_B_ENC, BINSR_B_DESC;
2132 def BINSR_H : BINSR_H_ENC, BINSR_H_DESC;
2133 def BINSR_W : BINSR_W_ENC, BINSR_W_DESC;
2134 def BINSR_D : BINSR_D_ENC, BINSR_D_DESC;
2135
2136 def BINSRI_B : BINSRI_B_ENC, BINSRI_B_DESC;
2137 def BINSRI_H : BINSRI_H_ENC, BINSRI_H_DESC;
2138 def BINSRI_W : BINSRI_W_ENC, BINSRI_W_DESC;
2139 def BINSRI_D : BINSRI_D_ENC, BINSRI_D_DESC;
2140
2141 def BMNZ_V : BMNZ_V_ENC, BMNZ_V_DESC;
2142
2143 def BMNZI_B : BMNZI_B_ENC, BMNZI_B_DESC;
2144
2145 def BMZ_V : BMZ_V_ENC, BMZ_V_DESC;
2146
2147 def BMZI_B : BMZI_B_ENC, BMZI_B_DESC;
2148
2149 def BNEG_B : BNEG_B_ENC, BNEG_B_DESC;
2150 def BNEG_H : BNEG_H_ENC, BNEG_H_DESC;
2151 def BNEG_W : BNEG_W_ENC, BNEG_W_DESC;
2152 def BNEG_D : BNEG_D_ENC, BNEG_D_DESC;
2153
2154 def BNEGI_B : BNEGI_B_ENC, BNEGI_B_DESC;
2155 def BNEGI_H : BNEGI_H_ENC, BNEGI_H_DESC;
2156 def BNEGI_W : BNEGI_W_ENC, BNEGI_W_DESC;
2157 def BNEGI_D : BNEGI_D_ENC, BNEGI_D_DESC;
2158
2159 def BNZ_B : BNZ_B_ENC, BNZ_B_DESC;
2160 def BNZ_H : BNZ_H_ENC, BNZ_H_DESC;
2161 def BNZ_W : BNZ_W_ENC, BNZ_W_DESC;
2162 def BNZ_D : BNZ_D_ENC, BNZ_D_DESC;
2163
2164 def BNZ_V : BNZ_V_ENC, BNZ_V_DESC;
2165
2166 def BSEL_V : BSEL_V_ENC, BSEL_V_DESC;
2167
2168 def BSELI_B : BSELI_B_ENC, BSELI_B_DESC;
2169
2170 def BSET_B : BSET_B_ENC, BSET_B_DESC;
2171 def BSET_H : BSET_H_ENC, BSET_H_DESC;
2172 def BSET_W : BSET_W_ENC, BSET_W_DESC;
2173 def BSET_D : BSET_D_ENC, BSET_D_DESC;
2174
2175 def BSETI_B : BSETI_B_ENC, BSETI_B_DESC;
2176 def BSETI_H : BSETI_H_ENC, BSETI_H_DESC;
2177 def BSETI_W : BSETI_W_ENC, BSETI_W_DESC;
2178 def BSETI_D : BSETI_D_ENC, BSETI_D_DESC;
2179
2180 def BZ_B : BZ_B_ENC, BZ_B_DESC;
2181 def BZ_H : BZ_H_ENC, BZ_H_DESC;
2182 def BZ_W : BZ_W_ENC, BZ_W_DESC;
2183 def BZ_D : BZ_D_ENC, BZ_D_DESC;
2184
2185 def BZ_V : BZ_V_ENC, BZ_V_DESC;
2186
2187 def CEQ_B : CEQ_B_ENC, CEQ_B_DESC;
2188 def CEQ_H : CEQ_H_ENC, CEQ_H_DESC;
2189 def CEQ_W : CEQ_W_ENC, CEQ_W_DESC;
2190 def CEQ_D : CEQ_D_ENC, CEQ_D_DESC;
2191
2192 def CEQI_B : CEQI_B_ENC, CEQI_B_DESC;
2193 def CEQI_H : CEQI_H_ENC, CEQI_H_DESC;
2194 def CEQI_W : CEQI_W_ENC, CEQI_W_DESC;
2195 def CEQI_D : CEQI_D_ENC, CEQI_D_DESC;
2196
2197 def CFCMSA : CFCMSA_ENC, CFCMSA_DESC;
2198
2199 def CLE_S_B : CLE_S_B_ENC, CLE_S_B_DESC;
2200 def CLE_S_H : CLE_S_H_ENC, CLE_S_H_DESC;
2201 def CLE_S_W : CLE_S_W_ENC, CLE_S_W_DESC;
2202 def CLE_S_D : CLE_S_D_ENC, CLE_S_D_DESC;
2203
2204 def CLE_U_B : CLE_U_B_ENC, CLE_U_B_DESC;
2205 def CLE_U_H : CLE_U_H_ENC, CLE_U_H_DESC;
2206 def CLE_U_W : CLE_U_W_ENC, CLE_U_W_DESC;
2207 def CLE_U_D : CLE_U_D_ENC, CLE_U_D_DESC;
2208
2209 def CLEI_S_B : CLEI_S_B_ENC, CLEI_S_B_DESC;
2210 def CLEI_S_H : CLEI_S_H_ENC, CLEI_S_H_DESC;
2211 def CLEI_S_W : CLEI_S_W_ENC, CLEI_S_W_DESC;
2212 def CLEI_S_D : CLEI_S_D_ENC, CLEI_S_D_DESC;
2213
2214 def CLEI_U_B : CLEI_U_B_ENC, CLEI_U_B_DESC;
2215 def CLEI_U_H : CLEI_U_H_ENC, CLEI_U_H_DESC;
2216 def CLEI_U_W : CLEI_U_W_ENC, CLEI_U_W_DESC;
2217 def CLEI_U_D : CLEI_U_D_ENC, CLEI_U_D_DESC;
2218
2219 def CLT_S_B : CLT_S_B_ENC, CLT_S_B_DESC;
2220 def CLT_S_H : CLT_S_H_ENC, CLT_S_H_DESC;
2221 def CLT_S_W : CLT_S_W_ENC, CLT_S_W_DESC;
2222 def CLT_S_D : CLT_S_D_ENC, CLT_S_D_DESC;
2223
2224 def CLT_U_B : CLT_U_B_ENC, CLT_U_B_DESC;
2225 def CLT_U_H : CLT_U_H_ENC, CLT_U_H_DESC;
2226 def CLT_U_W : CLT_U_W_ENC, CLT_U_W_DESC;
2227 def CLT_U_D : CLT_U_D_ENC, CLT_U_D_DESC;
2228
2229 def CLTI_S_B : CLTI_S_B_ENC, CLTI_S_B_DESC;
2230 def CLTI_S_H : CLTI_S_H_ENC, CLTI_S_H_DESC;
2231 def CLTI_S_W : CLTI_S_W_ENC, CLTI_S_W_DESC;
2232 def CLTI_S_D : CLTI_S_D_ENC, CLTI_S_D_DESC;
2233
2234 def CLTI_U_B : CLTI_U_B_ENC, CLTI_U_B_DESC;
2235 def CLTI_U_H : CLTI_U_H_ENC, CLTI_U_H_DESC;
2236 def CLTI_U_W : CLTI_U_W_ENC, CLTI_U_W_DESC;
2237 def CLTI_U_D : CLTI_U_D_ENC, CLTI_U_D_DESC;
2238
2239 def COPY_S_B : COPY_S_B_ENC, COPY_S_B_DESC;
2240 def COPY_S_H : COPY_S_H_ENC, COPY_S_H_DESC;
2241 def COPY_S_W : COPY_S_W_ENC, COPY_S_W_DESC;
2242
2243 def COPY_U_B : COPY_U_B_ENC, COPY_U_B_DESC;
2244 def COPY_U_H : COPY_U_H_ENC, COPY_U_H_DESC;
2245 def COPY_U_W : COPY_U_W_ENC, COPY_U_W_DESC;
2246
2247 def CTCMSA : CTCMSA_ENC, CTCMSA_DESC;
2248
2249 def DIV_S_B : DIV_S_B_ENC, DIV_S_B_DESC;
2250 def DIV_S_H : DIV_S_H_ENC, DIV_S_H_DESC;
2251 def DIV_S_W : DIV_S_W_ENC, DIV_S_W_DESC;
2252 def DIV_S_D : DIV_S_D_ENC, DIV_S_D_DESC;
2253
2254 def DIV_U_B : DIV_U_B_ENC, DIV_U_B_DESC;
2255 def DIV_U_H : DIV_U_H_ENC, DIV_U_H_DESC;
2256 def DIV_U_W : DIV_U_W_ENC, DIV_U_W_DESC;
2257 def DIV_U_D : DIV_U_D_ENC, DIV_U_D_DESC;
2258
2259 def DOTP_S_H : DOTP_S_H_ENC, DOTP_S_H_DESC;
2260 def DOTP_S_W : DOTP_S_W_ENC, DOTP_S_W_DESC;
2261 def DOTP_S_D : DOTP_S_D_ENC, DOTP_S_D_DESC;
2262
2263 def DOTP_U_H : DOTP_U_H_ENC, DOTP_U_H_DESC;
2264 def DOTP_U_W : DOTP_U_W_ENC, DOTP_U_W_DESC;
2265 def DOTP_U_D : DOTP_U_D_ENC, DOTP_U_D_DESC;
2266
2267 def DPADD_S_H : DPADD_S_H_ENC, DPADD_S_H_DESC;
2268 def DPADD_S_W : DPADD_S_W_ENC, DPADD_S_W_DESC;
2269 def DPADD_S_D : DPADD_S_D_ENC, DPADD_S_D_DESC;
2270
2271 def DPADD_U_H : DPADD_U_H_ENC, DPADD_U_H_DESC;
2272 def DPADD_U_W : DPADD_U_W_ENC, DPADD_U_W_DESC;
2273 def DPADD_U_D : DPADD_U_D_ENC, DPADD_U_D_DESC;
2274
2275 def DPSUB_S_H : DPSUB_S_H_ENC, DPSUB_S_H_DESC;
2276 def DPSUB_S_W : DPSUB_S_W_ENC, DPSUB_S_W_DESC;
2277 def DPSUB_S_D : DPSUB_S_D_ENC, DPSUB_S_D_DESC;
2278
2279 def DPSUB_U_H : DPSUB_U_H_ENC, DPSUB_U_H_DESC;
2280 def DPSUB_U_W : DPSUB_U_W_ENC, DPSUB_U_W_DESC;
2281 def DPSUB_U_D : DPSUB_U_D_ENC, DPSUB_U_D_DESC;
2282
2283 def FADD_W : FADD_W_ENC, FADD_W_DESC;
2284 def FADD_D : FADD_D_ENC, FADD_D_DESC;
2285
2286 def FCAF_W : FCAF_W_ENC, FCAF_W_DESC;
2287 def FCAF_D : FCAF_D_ENC, FCAF_D_DESC;
2288
2289 def FCEQ_W : FCEQ_W_ENC, FCEQ_W_DESC;
2290 def FCEQ_D : FCEQ_D_ENC, FCEQ_D_DESC;
2291
2292 def FCLE_W : FCLE_W_ENC, FCLE_W_DESC;
2293 def FCLE_D : FCLE_D_ENC, FCLE_D_DESC;
2294
2295 def FCLT_W : FCLT_W_ENC, FCLT_W_DESC;
2296 def FCLT_D : FCLT_D_ENC, FCLT_D_DESC;
2297
2298 def FCLASS_W : FCLASS_W_ENC, FCLASS_W_DESC;
2299 def FCLASS_D : FCLASS_D_ENC, FCLASS_D_DESC;
2300
2301 def FCNE_W : FCNE_W_ENC, FCNE_W_DESC;
2302 def FCNE_D : FCNE_D_ENC, FCNE_D_DESC;
2303
2304 def FCOR_W : FCOR_W_ENC, FCOR_W_DESC;
2305 def FCOR_D : FCOR_D_ENC, FCOR_D_DESC;
2306
2307 def FCUEQ_W : FCUEQ_W_ENC, FCUEQ_W_DESC;
2308 def FCUEQ_D : FCUEQ_D_ENC, FCUEQ_D_DESC;
2309
2310 def FCULE_W : FCULE_W_ENC, FCULE_W_DESC;
2311 def FCULE_D : FCULE_D_ENC, FCULE_D_DESC;
2312
2313 def FCULT_W : FCULT_W_ENC, FCULT_W_DESC;
2314 def FCULT_D : FCULT_D_ENC, FCULT_D_DESC;
2315
2316 def FCUN_W : FCUN_W_ENC, FCUN_W_DESC;
2317 def FCUN_D : FCUN_D_ENC, FCUN_D_DESC;
2318
2319 def FCUNE_W : FCUNE_W_ENC, FCUNE_W_DESC;
2320 def FCUNE_D : FCUNE_D_ENC, FCUNE_D_DESC;
2321
2322 def FDIV_W : FDIV_W_ENC, FDIV_W_DESC;
2323 def FDIV_D : FDIV_D_ENC, FDIV_D_DESC;
2324
2325 def FEXDO_H : FEXDO_H_ENC, FEXDO_H_DESC;
2326 def FEXDO_W : FEXDO_W_ENC, FEXDO_W_DESC;
2327
2328 def FEXP2_W : FEXP2_W_ENC, FEXP2_W_DESC;
2329 def FEXP2_D : FEXP2_D_ENC, FEXP2_D_DESC;
2330
2331 def FEXUPL_W : FEXUPL_W_ENC, FEXUPL_W_DESC;
2332 def FEXUPL_D : FEXUPL_D_ENC, FEXUPL_D_DESC;
2333
2334 def FEXUPR_W : FEXUPR_W_ENC, FEXUPR_W_DESC;
2335 def FEXUPR_D : FEXUPR_D_ENC, FEXUPR_D_DESC;
2336
2337 def FFINT_S_W : FFINT_S_W_ENC, FFINT_S_W_DESC;
2338 def FFINT_S_D : FFINT_S_D_ENC, FFINT_S_D_DESC;
2339
2340 def FFINT_U_W : FFINT_U_W_ENC, FFINT_U_W_DESC;
2341 def FFINT_U_D : FFINT_U_D_ENC, FFINT_U_D_DESC;
2342
2343 def FFQL_W : FFQL_W_ENC, FFQL_W_DESC;
2344 def FFQL_D : FFQL_D_ENC, FFQL_D_DESC;
2345
2346 def FFQR_W : FFQR_W_ENC, FFQR_W_DESC;
2347 def FFQR_D : FFQR_D_ENC, FFQR_D_DESC;
2348
2349 def FILL_B : FILL_B_ENC, FILL_B_DESC;
2350 def FILL_H : FILL_H_ENC, FILL_H_DESC;
2351 def FILL_W : FILL_W_ENC, FILL_W_DESC;
2352
2353 def FLOG2_W : FLOG2_W_ENC, FLOG2_W_DESC;
2354 def FLOG2_D : FLOG2_D_ENC, FLOG2_D_DESC;
2355
2356 def FMADD_W : FMADD_W_ENC, FMADD_W_DESC;
2357 def FMADD_D : FMADD_D_ENC, FMADD_D_DESC;
2358
2359 def FMAX_W : FMAX_W_ENC, FMAX_W_DESC;
2360 def FMAX_D : FMAX_D_ENC, FMAX_D_DESC;
2361
2362 def FMAX_A_W : FMAX_A_W_ENC, FMAX_A_W_DESC;
2363 def FMAX_A_D : FMAX_A_D_ENC, FMAX_A_D_DESC;
2364
2365 def FMIN_W : FMIN_W_ENC, FMIN_W_DESC;
2366 def FMIN_D : FMIN_D_ENC, FMIN_D_DESC;
2367
2368 def FMIN_A_W : FMIN_A_W_ENC, FMIN_A_W_DESC;
2369 def FMIN_A_D : FMIN_A_D_ENC, FMIN_A_D_DESC;
2370
2371 def FMSUB_W : FMSUB_W_ENC, FMSUB_W_DESC;
2372 def FMSUB_D : FMSUB_D_ENC, FMSUB_D_DESC;
2373
2374 def FMUL_W : FMUL_W_ENC, FMUL_W_DESC;
2375 def FMUL_D : FMUL_D_ENC, FMUL_D_DESC;
2376
2377 def FRINT_W : FRINT_W_ENC, FRINT_W_DESC;
2378 def FRINT_D : FRINT_D_ENC, FRINT_D_DESC;
2379
2380 def FRCP_W : FRCP_W_ENC, FRCP_W_DESC;
2381 def FRCP_D : FRCP_D_ENC, FRCP_D_DESC;
2382
2383 def FRSQRT_W : FRSQRT_W_ENC, FRSQRT_W_DESC;
2384 def FRSQRT_D : FRSQRT_D_ENC, FRSQRT_D_DESC;
2385
2386 def FSAF_W : FSAF_W_ENC, FSAF_W_DESC;
2387 def FSAF_D : FSAF_D_ENC, FSAF_D_DESC;
2388
2389 def FSEQ_W : FSEQ_W_ENC, FSEQ_W_DESC;
2390 def FSEQ_D : FSEQ_D_ENC, FSEQ_D_DESC;
2391
2392 def FSLE_W : FSLE_W_ENC, FSLE_W_DESC;
2393 def FSLE_D : FSLE_D_ENC, FSLE_D_DESC;
2394
2395 def FSLT_W : FSLT_W_ENC, FSLT_W_DESC;
2396 def FSLT_D : FSLT_D_ENC, FSLT_D_DESC;
2397
2398 def FSNE_W : FSNE_W_ENC, FSNE_W_DESC;
2399 def FSNE_D : FSNE_D_ENC, FSNE_D_DESC;
2400
2401 def FSOR_W : FSOR_W_ENC, FSOR_W_DESC;
2402 def FSOR_D : FSOR_D_ENC, FSOR_D_DESC;
2403
2404 def FSQRT_W : FSQRT_W_ENC, FSQRT_W_DESC;
2405 def FSQRT_D : FSQRT_D_ENC, FSQRT_D_DESC;
2406
2407 def FSUB_W : FSUB_W_ENC, FSUB_W_DESC;
2408 def FSUB_D : FSUB_D_ENC, FSUB_D_DESC;
2409
2410 def FSUEQ_W : FSUEQ_W_ENC, FSUEQ_W_DESC;
2411 def FSUEQ_D : FSUEQ_D_ENC, FSUEQ_D_DESC;
2412
2413 def FSULE_W : FSULE_W_ENC, FSULE_W_DESC;
2414 def FSULE_D : FSULE_D_ENC, FSULE_D_DESC;
2415
2416 def FSULT_W : FSULT_W_ENC, FSULT_W_DESC;
2417 def FSULT_D : FSULT_D_ENC, FSULT_D_DESC;
2418
2419 def FSUN_W : FSUN_W_ENC, FSUN_W_DESC;
2420 def FSUN_D : FSUN_D_ENC, FSUN_D_DESC;
2421
2422 def FSUNE_W : FSUNE_W_ENC, FSUNE_W_DESC;
2423 def FSUNE_D : FSUNE_D_ENC, FSUNE_D_DESC;
2424
2425 def FTRUNC_S_W : FTRUNC_S_W_ENC, FTRUNC_S_W_DESC;
2426 def FTRUNC_S_D : FTRUNC_S_D_ENC, FTRUNC_S_D_DESC;
2427
2428 def FTRUNC_U_W : FTRUNC_U_W_ENC, FTRUNC_U_W_DESC;
2429 def FTRUNC_U_D : FTRUNC_U_D_ENC, FTRUNC_U_D_DESC;
2430
2431 def FTINT_S_W : FTINT_S_W_ENC, FTINT_S_W_DESC;
2432 def FTINT_S_D : FTINT_S_D_ENC, FTINT_S_D_DESC;
2433
2434 def FTINT_U_W : FTINT_U_W_ENC, FTINT_U_W_DESC;
2435 def FTINT_U_D : FTINT_U_D_ENC, FTINT_U_D_DESC;
2436
2437 def FTQ_H : FTQ_H_ENC, FTQ_H_DESC;
2438 def FTQ_W : FTQ_W_ENC, FTQ_W_DESC;
2439
2440 def HADD_S_H : HADD_S_H_ENC, HADD_S_H_DESC;
2441 def HADD_S_W : HADD_S_W_ENC, HADD_S_W_DESC;
2442 def HADD_S_D : HADD_S_D_ENC, HADD_S_D_DESC;
2443
2444 def HADD_U_H : HADD_U_H_ENC, HADD_U_H_DESC;
2445 def HADD_U_W : HADD_U_W_ENC, HADD_U_W_DESC;
2446 def HADD_U_D : HADD_U_D_ENC, HADD_U_D_DESC;
2447
2448 def HSUB_S_H : HSUB_S_H_ENC, HSUB_S_H_DESC;
2449 def HSUB_S_W : HSUB_S_W_ENC, HSUB_S_W_DESC;
2450 def HSUB_S_D : HSUB_S_D_ENC, HSUB_S_D_DESC;
2451
2452 def HSUB_U_H : HSUB_U_H_ENC, HSUB_U_H_DESC;
2453 def HSUB_U_W : HSUB_U_W_ENC, HSUB_U_W_DESC;
2454 def HSUB_U_D : HSUB_U_D_ENC, HSUB_U_D_DESC;
2455
2456 def ILVEV_B : ILVEV_B_ENC, ILVEV_B_DESC;
2457 def ILVEV_H : ILVEV_H_ENC, ILVEV_H_DESC;
2458 def ILVEV_W : ILVEV_W_ENC, ILVEV_W_DESC;
2459 def ILVEV_D : ILVEV_D_ENC, ILVEV_D_DESC;
2460
2461 def ILVL_B : ILVL_B_ENC, ILVL_B_DESC;
2462 def ILVL_H : ILVL_H_ENC, ILVL_H_DESC;
2463 def ILVL_W : ILVL_W_ENC, ILVL_W_DESC;
2464 def ILVL_D : ILVL_D_ENC, ILVL_D_DESC;
2465
2466 def ILVOD_B : ILVOD_B_ENC, ILVOD_B_DESC;
2467 def ILVOD_H : ILVOD_H_ENC, ILVOD_H_DESC;
2468 def ILVOD_W : ILVOD_W_ENC, ILVOD_W_DESC;
2469 def ILVOD_D : ILVOD_D_ENC, ILVOD_D_DESC;
2470
2471 def ILVR_B : ILVR_B_ENC, ILVR_B_DESC;
2472 def ILVR_H : ILVR_H_ENC, ILVR_H_DESC;
2473 def ILVR_W : ILVR_W_ENC, ILVR_W_DESC;
2474 def ILVR_D : ILVR_D_ENC, ILVR_D_DESC;
2475
2476 def INSERT_B : INSERT_B_ENC, INSERT_B_DESC;
2477 def INSERT_H : INSERT_H_ENC, INSERT_H_DESC;
2478 def INSERT_W : INSERT_W_ENC, INSERT_W_DESC;
2479
2480 def INSVE_B : INSVE_B_ENC, INSVE_B_DESC;
2481 def INSVE_H : INSVE_H_ENC, INSVE_H_DESC;
2482 def INSVE_W : INSVE_W_ENC, INSVE_W_DESC;
2483 def INSVE_D : INSVE_D_ENC, INSVE_D_DESC;
2484
2485 def LD_B: LD_B_ENC, LD_B_DESC;
2486 def LD_H: LD_H_ENC, LD_H_DESC;
2487 def LD_W: LD_W_ENC, LD_W_DESC;
2488 def LD_D: LD_D_ENC, LD_D_DESC;
2489
2490 def LDI_B : LDI_B_ENC, LDI_B_DESC;
2491 def LDI_H : LDI_H_ENC, LDI_H_DESC;
2492 def LDI_W : LDI_W_ENC, LDI_W_DESC;
2493 def LDI_D : LDI_D_ENC, LDI_D_DESC;
2494
2495 def LDX_B: LDX_B_ENC, LDX_B_DESC;
2496 def LDX_H: LDX_H_ENC, LDX_H_DESC;
2497 def LDX_W: LDX_W_ENC, LDX_W_DESC;
2498 def LDX_D: LDX_D_ENC, LDX_D_DESC;
2499
2500 def MADD_Q_H : MADD_Q_H_ENC, MADD_Q_H_DESC;
2501 def MADD_Q_W : MADD_Q_W_ENC, MADD_Q_W_DESC;
2502
2503 def MADDR_Q_H : MADDR_Q_H_ENC, MADDR_Q_H_DESC;
2504 def MADDR_Q_W : MADDR_Q_W_ENC, MADDR_Q_W_DESC;
2505
2506 def MADDV_B : MADDV_B_ENC, MADDV_B_DESC;
2507 def MADDV_H : MADDV_H_ENC, MADDV_H_DESC;
2508 def MADDV_W : MADDV_W_ENC, MADDV_W_DESC;
2509 def MADDV_D : MADDV_D_ENC, MADDV_D_DESC;
2510
2511 def MAX_A_B : MAX_A_B_ENC, MAX_A_B_DESC;
2512 def MAX_A_H : MAX_A_H_ENC, MAX_A_H_DESC;
2513 def MAX_A_W : MAX_A_W_ENC, MAX_A_W_DESC;
2514 def MAX_A_D : MAX_A_D_ENC, MAX_A_D_DESC;
2515
2516 def MAX_S_B : MAX_S_B_ENC, MAX_S_B_DESC;
2517 def MAX_S_H : MAX_S_H_ENC, MAX_S_H_DESC;
2518 def MAX_S_W : MAX_S_W_ENC, MAX_S_W_DESC;
2519 def MAX_S_D : MAX_S_D_ENC, MAX_S_D_DESC;
2520
2521 def MAX_U_B : MAX_U_B_ENC, MAX_U_B_DESC;
2522 def MAX_U_H : MAX_U_H_ENC, MAX_U_H_DESC;
2523 def MAX_U_W : MAX_U_W_ENC, MAX_U_W_DESC;
2524 def MAX_U_D : MAX_U_D_ENC, MAX_U_D_DESC;
2525
2526 def MAXI_S_B : MAXI_S_B_ENC, MAXI_S_B_DESC;
2527 def MAXI_S_H : MAXI_S_H_ENC, MAXI_S_H_DESC;
2528 def MAXI_S_W : MAXI_S_W_ENC, MAXI_S_W_DESC;
2529 def MAXI_S_D : MAXI_S_D_ENC, MAXI_S_D_DESC;
2530
2531 def MAXI_U_B : MAXI_U_B_ENC, MAXI_U_B_DESC;
2532 def MAXI_U_H : MAXI_U_H_ENC, MAXI_U_H_DESC;
2533 def MAXI_U_W : MAXI_U_W_ENC, MAXI_U_W_DESC;
2534 def MAXI_U_D : MAXI_U_D_ENC, MAXI_U_D_DESC;
2535
2536 def MIN_A_B : MIN_A_B_ENC, MIN_A_B_DESC;
2537 def MIN_A_H : MIN_A_H_ENC, MIN_A_H_DESC;
2538 def MIN_A_W : MIN_A_W_ENC, MIN_A_W_DESC;
2539 def MIN_A_D : MIN_A_D_ENC, MIN_A_D_DESC;
2540
2541 def MIN_S_B : MIN_S_B_ENC, MIN_S_B_DESC;
2542 def MIN_S_H : MIN_S_H_ENC, MIN_S_H_DESC;
2543 def MIN_S_W : MIN_S_W_ENC, MIN_S_W_DESC;
2544 def MIN_S_D : MIN_S_D_ENC, MIN_S_D_DESC;
2545
2546 def MIN_U_B : MIN_U_B_ENC, MIN_U_B_DESC;
2547 def MIN_U_H : MIN_U_H_ENC, MIN_U_H_DESC;
2548 def MIN_U_W : MIN_U_W_ENC, MIN_U_W_DESC;
2549 def MIN_U_D : MIN_U_D_ENC, MIN_U_D_DESC;
2550
2551 def MINI_S_B : MINI_S_B_ENC, MINI_S_B_DESC;
2552 def MINI_S_H : MINI_S_H_ENC, MINI_S_H_DESC;
2553 def MINI_S_W : MINI_S_W_ENC, MINI_S_W_DESC;
2554 def MINI_S_D : MINI_S_D_ENC, MINI_S_D_DESC;
2555
2556 def MINI_U_B : MINI_U_B_ENC, MINI_U_B_DESC;
2557 def MINI_U_H : MINI_U_H_ENC, MINI_U_H_DESC;
2558 def MINI_U_W : MINI_U_W_ENC, MINI_U_W_DESC;
2559 def MINI_U_D : MINI_U_D_ENC, MINI_U_D_DESC;
2560
2561 def MOD_S_B : MOD_S_B_ENC, MOD_S_B_DESC;
2562 def MOD_S_H : MOD_S_H_ENC, MOD_S_H_DESC;
2563 def MOD_S_W : MOD_S_W_ENC, MOD_S_W_DESC;
2564 def MOD_S_D : MOD_S_D_ENC, MOD_S_D_DESC;
2565
2566 def MOD_U_B : MOD_U_B_ENC, MOD_U_B_DESC;
2567 def MOD_U_H : MOD_U_H_ENC, MOD_U_H_DESC;
2568 def MOD_U_W : MOD_U_W_ENC, MOD_U_W_DESC;
2569 def MOD_U_D : MOD_U_D_ENC, MOD_U_D_DESC;
2570
2571 def MOVE_V : MOVE_V_ENC, MOVE_V_DESC;
2572
2573 def MSUB_Q_H : MSUB_Q_H_ENC, MSUB_Q_H_DESC;
2574 def MSUB_Q_W : MSUB_Q_W_ENC, MSUB_Q_W_DESC;
2575
2576 def MSUBR_Q_H : MSUBR_Q_H_ENC, MSUBR_Q_H_DESC;
2577 def MSUBR_Q_W : MSUBR_Q_W_ENC, MSUBR_Q_W_DESC;
2578
2579 def MSUBV_B : MSUBV_B_ENC, MSUBV_B_DESC;
2580 def MSUBV_H : MSUBV_H_ENC, MSUBV_H_DESC;
2581 def MSUBV_W : MSUBV_W_ENC, MSUBV_W_DESC;
2582 def MSUBV_D : MSUBV_D_ENC, MSUBV_D_DESC;
2583
2584 def MUL_Q_H : MUL_Q_H_ENC, MUL_Q_H_DESC;
2585 def MUL_Q_W : MUL_Q_W_ENC, MUL_Q_W_DESC;
2586
2587 def MULR_Q_H : MULR_Q_H_ENC, MULR_Q_H_DESC;
2588 def MULR_Q_W : MULR_Q_W_ENC, MULR_Q_W_DESC;
2589
2590 def MULV_B : MULV_B_ENC, MULV_B_DESC;
2591 def MULV_H : MULV_H_ENC, MULV_H_DESC;
2592 def MULV_W : MULV_W_ENC, MULV_W_DESC;
2593 def MULV_D : MULV_D_ENC, MULV_D_DESC;
2594
2595 def NLOC_B : NLOC_B_ENC, NLOC_B_DESC;
2596 def NLOC_H : NLOC_H_ENC, NLOC_H_DESC;
2597 def NLOC_W : NLOC_W_ENC, NLOC_W_DESC;
2598 def NLOC_D : NLOC_D_ENC, NLOC_D_DESC;
2599
2600 def NLZC_B : NLZC_B_ENC, NLZC_B_DESC;
2601 def NLZC_H : NLZC_H_ENC, NLZC_H_DESC;
2602 def NLZC_W : NLZC_W_ENC, NLZC_W_DESC;
2603 def NLZC_D : NLZC_D_ENC, NLZC_D_DESC;
2604
2605 def NOR_V : NOR_V_ENC, NOR_V_DESC;
2606 def NOR_V_H_PSEUDO : NOR_V_H_PSEUDO_DESC,
2607                      PseudoInstExpansion<(NOR_V MSA128B:$wd,
2608                                                 MSA128B:$ws, MSA128B:$wt)>;
2609 def NOR_V_W_PSEUDO : NOR_V_W_PSEUDO_DESC,
2610                      PseudoInstExpansion<(NOR_V MSA128B:$wd,
2611                                                 MSA128B:$ws, MSA128B:$wt)>;
2612 def NOR_V_D_PSEUDO : NOR_V_D_PSEUDO_DESC,
2613                      PseudoInstExpansion<(NOR_V MSA128B:$wd,
2614                                                 MSA128B:$ws, MSA128B:$wt)>;
2615
2616 def NORI_B : NORI_B_ENC, NORI_B_DESC;
2617
2618 def OR_V : OR_V_ENC, OR_V_DESC;
2619 def OR_V_H_PSEUDO : OR_V_H_PSEUDO_DESC,
2620                     PseudoInstExpansion<(OR_V MSA128B:$wd,
2621                                               MSA128B:$ws, MSA128B:$wt)>;
2622 def OR_V_W_PSEUDO : OR_V_W_PSEUDO_DESC,
2623                     PseudoInstExpansion<(OR_V MSA128B:$wd,
2624                                               MSA128B:$ws, MSA128B:$wt)>;
2625 def OR_V_D_PSEUDO : OR_V_D_PSEUDO_DESC,
2626                     PseudoInstExpansion<(OR_V MSA128B:$wd,
2627                                               MSA128B:$ws, MSA128B:$wt)>;
2628
2629 def ORI_B : ORI_B_ENC, ORI_B_DESC;
2630
2631 def PCKEV_B : PCKEV_B_ENC, PCKEV_B_DESC;
2632 def PCKEV_H : PCKEV_H_ENC, PCKEV_H_DESC;
2633 def PCKEV_W : PCKEV_W_ENC, PCKEV_W_DESC;
2634 def PCKEV_D : PCKEV_D_ENC, PCKEV_D_DESC;
2635
2636 def PCKOD_B : PCKOD_B_ENC, PCKOD_B_DESC;
2637 def PCKOD_H : PCKOD_H_ENC, PCKOD_H_DESC;
2638 def PCKOD_W : PCKOD_W_ENC, PCKOD_W_DESC;
2639 def PCKOD_D : PCKOD_D_ENC, PCKOD_D_DESC;
2640
2641 def PCNT_B : PCNT_B_ENC, PCNT_B_DESC;
2642 def PCNT_H : PCNT_H_ENC, PCNT_H_DESC;
2643 def PCNT_W : PCNT_W_ENC, PCNT_W_DESC;
2644 def PCNT_D : PCNT_D_ENC, PCNT_D_DESC;
2645
2646 def SAT_S_B : SAT_S_B_ENC, SAT_S_B_DESC;
2647 def SAT_S_H : SAT_S_H_ENC, SAT_S_H_DESC;
2648 def SAT_S_W : SAT_S_W_ENC, SAT_S_W_DESC;
2649 def SAT_S_D : SAT_S_D_ENC, SAT_S_D_DESC;
2650
2651 def SAT_U_B : SAT_U_B_ENC, SAT_U_B_DESC;
2652 def SAT_U_H : SAT_U_H_ENC, SAT_U_H_DESC;
2653 def SAT_U_W : SAT_U_W_ENC, SAT_U_W_DESC;
2654 def SAT_U_D : SAT_U_D_ENC, SAT_U_D_DESC;
2655
2656 def SHF_B : SHF_B_ENC, SHF_B_DESC;
2657 def SHF_H : SHF_H_ENC, SHF_H_DESC;
2658 def SHF_W : SHF_W_ENC, SHF_W_DESC;
2659
2660 def SLD_B : SLD_B_ENC, SLD_B_DESC;
2661 def SLD_H : SLD_H_ENC, SLD_H_DESC;
2662 def SLD_W : SLD_W_ENC, SLD_W_DESC;
2663 def SLD_D : SLD_D_ENC, SLD_D_DESC;
2664
2665 def SLDI_B : SLDI_B_ENC, SLDI_B_DESC;
2666 def SLDI_H : SLDI_H_ENC, SLDI_H_DESC;
2667 def SLDI_W : SLDI_W_ENC, SLDI_W_DESC;
2668 def SLDI_D : SLDI_D_ENC, SLDI_D_DESC;
2669
2670 def SLL_B : SLL_B_ENC, SLL_B_DESC;
2671 def SLL_H : SLL_H_ENC, SLL_H_DESC;
2672 def SLL_W : SLL_W_ENC, SLL_W_DESC;
2673 def SLL_D : SLL_D_ENC, SLL_D_DESC;
2674
2675 def SLLI_B : SLLI_B_ENC, SLLI_B_DESC;
2676 def SLLI_H : SLLI_H_ENC, SLLI_H_DESC;
2677 def SLLI_W : SLLI_W_ENC, SLLI_W_DESC;
2678 def SLLI_D : SLLI_D_ENC, SLLI_D_DESC;
2679
2680 def SPLAT_B : SPLAT_B_ENC, SPLAT_B_DESC;
2681 def SPLAT_H : SPLAT_H_ENC, SPLAT_H_DESC;
2682 def SPLAT_W : SPLAT_W_ENC, SPLAT_W_DESC;
2683 def SPLAT_D : SPLAT_D_ENC, SPLAT_D_DESC;
2684
2685 def SPLATI_B : SPLATI_B_ENC, SPLATI_B_DESC;
2686 def SPLATI_H : SPLATI_H_ENC, SPLATI_H_DESC;
2687 def SPLATI_W : SPLATI_W_ENC, SPLATI_W_DESC;
2688 def SPLATI_D : SPLATI_D_ENC, SPLATI_D_DESC;
2689
2690 def SRA_B : SRA_B_ENC, SRA_B_DESC;
2691 def SRA_H : SRA_H_ENC, SRA_H_DESC;
2692 def SRA_W : SRA_W_ENC, SRA_W_DESC;
2693 def SRA_D : SRA_D_ENC, SRA_D_DESC;
2694
2695 def SRAI_B : SRAI_B_ENC, SRAI_B_DESC;
2696 def SRAI_H : SRAI_H_ENC, SRAI_H_DESC;
2697 def SRAI_W : SRAI_W_ENC, SRAI_W_DESC;
2698 def SRAI_D : SRAI_D_ENC, SRAI_D_DESC;
2699
2700 def SRAR_B : SRAR_B_ENC, SRAR_B_DESC;
2701 def SRAR_H : SRAR_H_ENC, SRAR_H_DESC;
2702 def SRAR_W : SRAR_W_ENC, SRAR_W_DESC;
2703 def SRAR_D : SRAR_D_ENC, SRAR_D_DESC;
2704
2705 def SRARI_B : SRARI_B_ENC, SRARI_B_DESC;
2706 def SRARI_H : SRARI_H_ENC, SRARI_H_DESC;
2707 def SRARI_W : SRARI_W_ENC, SRARI_W_DESC;
2708 def SRARI_D : SRARI_D_ENC, SRARI_D_DESC;
2709
2710 def SRL_B : SRL_B_ENC, SRL_B_DESC;
2711 def SRL_H : SRL_H_ENC, SRL_H_DESC;
2712 def SRL_W : SRL_W_ENC, SRL_W_DESC;
2713 def SRL_D : SRL_D_ENC, SRL_D_DESC;
2714
2715 def SRLI_B : SRLI_B_ENC, SRLI_B_DESC;
2716 def SRLI_H : SRLI_H_ENC, SRLI_H_DESC;
2717 def SRLI_W : SRLI_W_ENC, SRLI_W_DESC;
2718 def SRLI_D : SRLI_D_ENC, SRLI_D_DESC;
2719
2720 def SRLR_B : SRLR_B_ENC, SRLR_B_DESC;
2721 def SRLR_H : SRLR_H_ENC, SRLR_H_DESC;
2722 def SRLR_W : SRLR_W_ENC, SRLR_W_DESC;
2723 def SRLR_D : SRLR_D_ENC, SRLR_D_DESC;
2724
2725 def SRLRI_B : SRLRI_B_ENC, SRLRI_B_DESC;
2726 def SRLRI_H : SRLRI_H_ENC, SRLRI_H_DESC;
2727 def SRLRI_W : SRLRI_W_ENC, SRLRI_W_DESC;
2728 def SRLRI_D : SRLRI_D_ENC, SRLRI_D_DESC;
2729
2730 def ST_B: ST_B_ENC, ST_B_DESC;
2731 def ST_H: ST_H_ENC, ST_H_DESC;
2732 def ST_W: ST_W_ENC, ST_W_DESC;
2733 def ST_D: ST_D_ENC, ST_D_DESC;
2734
2735 def STX_B: STX_B_ENC, STX_B_DESC;
2736 def STX_H: STX_H_ENC, STX_H_DESC;
2737 def STX_W: STX_W_ENC, STX_W_DESC;
2738 def STX_D: STX_D_ENC, STX_D_DESC;
2739
2740 def SUBS_S_B : SUBS_S_B_ENC, SUBS_S_B_DESC;
2741 def SUBS_S_H : SUBS_S_H_ENC, SUBS_S_H_DESC;
2742 def SUBS_S_W : SUBS_S_W_ENC, SUBS_S_W_DESC;
2743 def SUBS_S_D : SUBS_S_D_ENC, SUBS_S_D_DESC;
2744
2745 def SUBS_U_B : SUBS_U_B_ENC, SUBS_U_B_DESC;
2746 def SUBS_U_H : SUBS_U_H_ENC, SUBS_U_H_DESC;
2747 def SUBS_U_W : SUBS_U_W_ENC, SUBS_U_W_DESC;
2748 def SUBS_U_D : SUBS_U_D_ENC, SUBS_U_D_DESC;
2749
2750 def SUBSUS_U_B : SUBSUS_U_B_ENC, SUBSUS_U_B_DESC;
2751 def SUBSUS_U_H : SUBSUS_U_H_ENC, SUBSUS_U_H_DESC;
2752 def SUBSUS_U_W : SUBSUS_U_W_ENC, SUBSUS_U_W_DESC;
2753 def SUBSUS_U_D : SUBSUS_U_D_ENC, SUBSUS_U_D_DESC;
2754
2755 def SUBSUU_S_B : SUBSUU_S_B_ENC, SUBSUU_S_B_DESC;
2756 def SUBSUU_S_H : SUBSUU_S_H_ENC, SUBSUU_S_H_DESC;
2757 def SUBSUU_S_W : SUBSUU_S_W_ENC, SUBSUU_S_W_DESC;
2758 def SUBSUU_S_D : SUBSUU_S_D_ENC, SUBSUU_S_D_DESC;
2759
2760 def SUBV_B : SUBV_B_ENC, SUBV_B_DESC;
2761 def SUBV_H : SUBV_H_ENC, SUBV_H_DESC;
2762 def SUBV_W : SUBV_W_ENC, SUBV_W_DESC;
2763 def SUBV_D : SUBV_D_ENC, SUBV_D_DESC;
2764
2765 def SUBVI_B : SUBVI_B_ENC, SUBVI_B_DESC;
2766 def SUBVI_H : SUBVI_H_ENC, SUBVI_H_DESC;
2767 def SUBVI_W : SUBVI_W_ENC, SUBVI_W_DESC;
2768 def SUBVI_D : SUBVI_D_ENC, SUBVI_D_DESC;
2769
2770 def VSHF_B : VSHF_B_ENC, VSHF_B_DESC;
2771 def VSHF_H : VSHF_H_ENC, VSHF_H_DESC;
2772 def VSHF_W : VSHF_W_ENC, VSHF_W_DESC;
2773 def VSHF_D : VSHF_D_ENC, VSHF_D_DESC;
2774
2775 def XOR_V : XOR_V_ENC, XOR_V_DESC;
2776 def XOR_V_H_PSEUDO : XOR_V_H_PSEUDO_DESC,
2777                      PseudoInstExpansion<(XOR_V MSA128B:$wd,
2778                                                 MSA128B:$ws, MSA128B:$wt)>;
2779 def XOR_V_W_PSEUDO : XOR_V_W_PSEUDO_DESC,
2780                      PseudoInstExpansion<(XOR_V MSA128B:$wd,
2781                                                 MSA128B:$ws, MSA128B:$wt)>;
2782 def XOR_V_D_PSEUDO : XOR_V_D_PSEUDO_DESC,
2783                      PseudoInstExpansion<(XOR_V MSA128B:$wd,
2784                                                 MSA128B:$ws, MSA128B:$wt)>;
2785
2786 def XORI_B : XORI_B_ENC, XORI_B_DESC;
2787
2788 // Patterns.
2789 class MSAPat<dag pattern, dag result, list<Predicate> pred = [HasMSA]> :
2790   Pat<pattern, result>, Requires<pred>;
2791
2792 def : MSAPat<(extractelt (v4i32 MSA128W:$ws), immZExt4:$idx),
2793              (COPY_S_W MSA128W:$ws, immZExt4:$idx)>;
2794
2795 def : MSAPat<(v16i8 (load addr:$addr)), (LD_B addr:$addr)>;
2796 def : MSAPat<(v8i16 (load addr:$addr)), (LD_H addr:$addr)>;
2797 def : MSAPat<(v4i32 (load addr:$addr)), (LD_W addr:$addr)>;
2798 def : MSAPat<(v2i64 (load addr:$addr)), (LD_D addr:$addr)>;
2799 def : MSAPat<(v8f16 (load addr:$addr)), (LD_H addr:$addr)>;
2800 def : MSAPat<(v4f32 (load addr:$addr)), (LD_W addr:$addr)>;
2801 def : MSAPat<(v2f64 (load addr:$addr)), (LD_D addr:$addr)>;
2802
2803 def : MSAPat<(v8f16 (load addrRegImm:$addr)), (LD_H addrRegImm:$addr)>;
2804 def : MSAPat<(v4f32 (load addrRegImm:$addr)), (LD_W addrRegImm:$addr)>;
2805 def : MSAPat<(v2f64 (load addrRegImm:$addr)), (LD_D addrRegImm:$addr)>;
2806
2807 def : MSAPat<(store (v16i8 MSA128B:$ws), addr:$addr),
2808              (ST_B MSA128B:$ws, addr:$addr)>;
2809 def : MSAPat<(store (v8i16 MSA128H:$ws), addr:$addr),
2810              (ST_H MSA128H:$ws, addr:$addr)>;
2811 def : MSAPat<(store (v4i32 MSA128W:$ws), addr:$addr),
2812              (ST_W MSA128W:$ws, addr:$addr)>;
2813 def : MSAPat<(store (v2i64 MSA128D:$ws), addr:$addr),
2814              (ST_D MSA128D:$ws, addr:$addr)>;
2815 def : MSAPat<(store (v8f16 MSA128H:$ws), addr:$addr),
2816              (ST_H MSA128H:$ws, addr:$addr)>;
2817 def : MSAPat<(store (v4f32 MSA128W:$ws), addr:$addr),
2818              (ST_W MSA128W:$ws, addr:$addr)>;
2819 def : MSAPat<(store (v2f64 MSA128D:$ws), addr:$addr),
2820              (ST_D MSA128D:$ws, addr:$addr)>;
2821
2822 def ST_FH : MSAPat<(store (v8f16 MSA128H:$ws), addrRegImm:$addr),
2823                    (ST_H MSA128H:$ws, addrRegImm:$addr)>;
2824 def ST_FW : MSAPat<(store (v4f32 MSA128W:$ws), addrRegImm:$addr),
2825                    (ST_W MSA128W:$ws, addrRegImm:$addr)>;
2826 def ST_FD : MSAPat<(store (v2f64 MSA128D:$ws), addrRegImm:$addr),
2827                    (ST_D MSA128D:$ws, addrRegImm:$addr)>;
2828
2829 class MSABitconvertPat<ValueType DstVT, ValueType SrcVT,
2830                        RegisterClass DstRC, list<Predicate> preds = [HasMSA]> :
2831    MSAPat<(DstVT (bitconvert SrcVT:$src)),
2832           (COPY_TO_REGCLASS SrcVT:$src, DstRC), preds>;
2833
2834 // These are endian-independant because the element size doesnt change
2835 def : MSABitconvertPat<v8i16, v8f16, MSA128H>;
2836 def : MSABitconvertPat<v4i32, v4f32, MSA128W>;
2837 def : MSABitconvertPat<v2i64, v2f64, MSA128D>;
2838 def : MSABitconvertPat<v8f16, v8i16, MSA128H>;
2839 def : MSABitconvertPat<v4f32, v4i32, MSA128W>;
2840 def : MSABitconvertPat<v2f64, v2i64, MSA128D>;
2841
2842 // Little endian bitcasts are always no-ops
2843 def : MSABitconvertPat<v16i8, v8i16, MSA128B, [HasMSA, IsLE]>;
2844 def : MSABitconvertPat<v16i8, v4i32, MSA128B, [HasMSA, IsLE]>;
2845 def : MSABitconvertPat<v16i8, v2i64, MSA128B, [HasMSA, IsLE]>;
2846 def : MSABitconvertPat<v16i8, v8f16, MSA128B, [HasMSA, IsLE]>;
2847 def : MSABitconvertPat<v16i8, v4f32, MSA128B, [HasMSA, IsLE]>;
2848 def : MSABitconvertPat<v16i8, v2f64, MSA128B, [HasMSA, IsLE]>;
2849
2850 def : MSABitconvertPat<v8i16, v16i8, MSA128H, [HasMSA, IsLE]>;
2851 def : MSABitconvertPat<v8i16, v4i32, MSA128H, [HasMSA, IsLE]>;
2852 def : MSABitconvertPat<v8i16, v2i64, MSA128H, [HasMSA, IsLE]>;
2853 def : MSABitconvertPat<v8i16, v4f32, MSA128H, [HasMSA, IsLE]>;
2854 def : MSABitconvertPat<v8i16, v2f64, MSA128H, [HasMSA, IsLE]>;
2855
2856 def : MSABitconvertPat<v4i32, v16i8, MSA128W, [HasMSA, IsLE]>;
2857 def : MSABitconvertPat<v4i32, v8i16, MSA128W, [HasMSA, IsLE]>;
2858 def : MSABitconvertPat<v4i32, v2i64, MSA128W, [HasMSA, IsLE]>;
2859 def : MSABitconvertPat<v4i32, v8f16, MSA128W, [HasMSA, IsLE]>;
2860 def : MSABitconvertPat<v4i32, v2f64, MSA128W, [HasMSA, IsLE]>;
2861
2862 def : MSABitconvertPat<v2i64, v16i8, MSA128D, [HasMSA, IsLE]>;
2863 def : MSABitconvertPat<v2i64, v8i16, MSA128D, [HasMSA, IsLE]>;
2864 def : MSABitconvertPat<v2i64, v4i32, MSA128D, [HasMSA, IsLE]>;
2865 def : MSABitconvertPat<v2i64, v8f16, MSA128D, [HasMSA, IsLE]>;
2866 def : MSABitconvertPat<v2i64, v4f32, MSA128D, [HasMSA, IsLE]>;
2867
2868 def : MSABitconvertPat<v4f32, v16i8, MSA128W, [HasMSA, IsLE]>;
2869 def : MSABitconvertPat<v4f32, v8i16, MSA128W, [HasMSA, IsLE]>;
2870 def : MSABitconvertPat<v4f32, v2i64, MSA128W, [HasMSA, IsLE]>;
2871 def : MSABitconvertPat<v4f32, v8f16, MSA128W, [HasMSA, IsLE]>;
2872 def : MSABitconvertPat<v4f32, v2f64, MSA128W, [HasMSA, IsLE]>;
2873
2874 def : MSABitconvertPat<v2f64, v16i8, MSA128D, [HasMSA, IsLE]>;
2875 def : MSABitconvertPat<v2f64, v8i16, MSA128D, [HasMSA, IsLE]>;
2876 def : MSABitconvertPat<v2f64, v4i32, MSA128D, [HasMSA, IsLE]>;
2877 def : MSABitconvertPat<v2f64, v8f16, MSA128D, [HasMSA, IsLE]>;
2878 def : MSABitconvertPat<v2f64, v4f32, MSA128D, [HasMSA, IsLE]>;
2879
2880 // Big endian bitcasts expand to shuffle instructions.
2881 // This is because bitcast is defined to be a store/load sequence and the
2882 // vector store/load instructions are mixed-endian with respect to the vector
2883 // as a whole (little endian with respect to element order, but big endian
2884 // elements).
2885
2886 class MSABitconvertReverseQuartersPat<ValueType DstVT, ValueType SrcVT,
2887                                       RegisterClass DstRC, MSAInst Insn,
2888                                       RegisterClass ViaRC> :
2889   MSAPat<(DstVT (bitconvert SrcVT:$src)),
2890          (COPY_TO_REGCLASS (Insn (COPY_TO_REGCLASS SrcVT:$src, ViaRC), 27),
2891                            DstRC),
2892          [HasMSA, IsBE]>;
2893
2894 class MSABitconvertReverseHalvesPat<ValueType DstVT, ValueType SrcVT,
2895                                     RegisterClass DstRC, MSAInst Insn,
2896                                     RegisterClass ViaRC> :
2897   MSAPat<(DstVT (bitconvert SrcVT:$src)),
2898          (COPY_TO_REGCLASS (Insn (COPY_TO_REGCLASS SrcVT:$src, ViaRC), 177),
2899                            DstRC),
2900          [HasMSA, IsBE]>;
2901
2902 class MSABitconvertReverseBInHPat<ValueType DstVT, ValueType SrcVT,
2903                                   RegisterClass DstRC> :
2904   MSABitconvertReverseHalvesPat<DstVT, SrcVT, DstRC, SHF_B, MSA128B>;
2905
2906 class MSABitconvertReverseBInWPat<ValueType DstVT, ValueType SrcVT,
2907                                   RegisterClass DstRC> :
2908   MSABitconvertReverseQuartersPat<DstVT, SrcVT, DstRC, SHF_B, MSA128B>;
2909
2910 class MSABitconvertReverseBInDPat<ValueType DstVT, ValueType SrcVT,
2911                                   RegisterClass DstRC> :
2912   MSAPat<(DstVT (bitconvert SrcVT:$src)),
2913          (COPY_TO_REGCLASS
2914            (SHF_W
2915              (COPY_TO_REGCLASS
2916                (SHF_B (COPY_TO_REGCLASS SrcVT:$src, MSA128B), 27),
2917                MSA128W), 177),
2918            DstRC),
2919          [HasMSA, IsBE]>;
2920
2921 class MSABitconvertReverseHInWPat<ValueType DstVT, ValueType SrcVT,
2922                                   RegisterClass DstRC> :
2923   MSABitconvertReverseHalvesPat<DstVT, SrcVT, DstRC, SHF_H, MSA128H>;
2924
2925 class MSABitconvertReverseHInDPat<ValueType DstVT, ValueType SrcVT,
2926                                   RegisterClass DstRC> :
2927   MSABitconvertReverseQuartersPat<DstVT, SrcVT, DstRC, SHF_H, MSA128H>;
2928
2929 class MSABitconvertReverseWInDPat<ValueType DstVT, ValueType SrcVT,
2930                                   RegisterClass DstRC> :
2931   MSABitconvertReverseHalvesPat<DstVT, SrcVT, DstRC, SHF_W, MSA128W>;
2932
2933 def : MSABitconvertReverseBInHPat<v8i16, v16i8, MSA128H>;
2934 def : MSABitconvertReverseBInHPat<v8f16, v16i8, MSA128H>;
2935 def : MSABitconvertReverseBInWPat<v4i32, v16i8, MSA128W>;
2936 def : MSABitconvertReverseBInWPat<v4f32, v16i8, MSA128W>;
2937 def : MSABitconvertReverseBInDPat<v2i64, v16i8, MSA128D>;
2938 def : MSABitconvertReverseBInDPat<v2f64, v16i8, MSA128D>;
2939
2940 def : MSABitconvertReverseBInHPat<v16i8, v8i16, MSA128B>;
2941 def : MSABitconvertReverseHInWPat<v4i32, v8i16, MSA128W>;
2942 def : MSABitconvertReverseHInWPat<v4f32, v8i16, MSA128W>;
2943 def : MSABitconvertReverseHInDPat<v2i64, v8i16, MSA128D>;
2944 def : MSABitconvertReverseHInDPat<v2f64, v8i16, MSA128D>;
2945
2946 def : MSABitconvertReverseBInHPat<v16i8, v8f16, MSA128B>;
2947 def : MSABitconvertReverseHInWPat<v4i32, v8f16, MSA128W>;
2948 def : MSABitconvertReverseHInWPat<v4f32, v8f16, MSA128W>;
2949 def : MSABitconvertReverseHInDPat<v2i64, v8f16, MSA128D>;
2950 def : MSABitconvertReverseHInDPat<v2f64, v8f16, MSA128D>;
2951
2952 def : MSABitconvertReverseBInWPat<v16i8, v4i32, MSA128B>;
2953 def : MSABitconvertReverseHInWPat<v8i16, v4i32, MSA128H>;
2954 def : MSABitconvertReverseHInWPat<v8f16, v4i32, MSA128H>;
2955 def : MSABitconvertReverseWInDPat<v2i64, v4i32, MSA128D>;
2956 def : MSABitconvertReverseWInDPat<v2f64, v4i32, MSA128D>;
2957
2958 def : MSABitconvertReverseBInWPat<v16i8, v4f32, MSA128B>;
2959 def : MSABitconvertReverseHInWPat<v8i16, v4f32, MSA128H>;
2960 def : MSABitconvertReverseHInWPat<v8f16, v4f32, MSA128H>;
2961 def : MSABitconvertReverseWInDPat<v2i64, v4f32, MSA128D>;
2962 def : MSABitconvertReverseWInDPat<v2f64, v4f32, MSA128D>;
2963
2964 def : MSABitconvertReverseBInDPat<v16i8, v2i64, MSA128B>;
2965 def : MSABitconvertReverseHInDPat<v8i16, v2i64, MSA128H>;
2966 def : MSABitconvertReverseHInDPat<v8f16, v2i64, MSA128H>;
2967 def : MSABitconvertReverseWInDPat<v4i32, v2i64, MSA128W>;
2968 def : MSABitconvertReverseWInDPat<v4f32, v2i64, MSA128W>;
2969
2970 def : MSABitconvertReverseBInDPat<v16i8, v2f64, MSA128B>;
2971 def : MSABitconvertReverseHInDPat<v8i16, v2f64, MSA128H>;
2972 def : MSABitconvertReverseHInDPat<v8f16, v2f64, MSA128H>;
2973 def : MSABitconvertReverseWInDPat<v4i32, v2f64, MSA128W>;
2974 def : MSABitconvertReverseWInDPat<v4f32, v2f64, MSA128W>;
2975
2976 // Pseudos used to implement BNZ.df, and BZ.df
2977
2978 class MSA_CBRANCH_PSEUDO_DESC_BASE<SDPatternOperator OpNode, ValueType TyNode,
2979                                    RegisterClass RCWS,
2980                                    InstrItinClass itin = NoItinerary> :
2981   MipsPseudo<(outs GPR32:$dst),
2982              (ins RCWS:$ws),
2983              [(set GPR32:$dst, (OpNode (TyNode RCWS:$ws)))]> {
2984   bit usesCustomInserter = 1;
2985 }
2986
2987 def SNZ_B_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v16i8,
2988                                                 MSA128B, NoItinerary>;
2989 def SNZ_H_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v8i16,
2990                                                 MSA128H, NoItinerary>;
2991 def SNZ_W_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v4i32,
2992                                                 MSA128W, NoItinerary>;
2993 def SNZ_D_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v2i64,
2994                                                 MSA128D, NoItinerary>;
2995 def SNZ_V_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAnyNonZero, v16i8,
2996                                                 MSA128B, NoItinerary>;
2997
2998 def SZ_B_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v16i8,
2999                                                MSA128B, NoItinerary>;
3000 def SZ_H_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v8i16,
3001                                                MSA128H, NoItinerary>;
3002 def SZ_W_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v4i32,
3003                                                MSA128W, NoItinerary>;
3004 def SZ_D_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v2i64,
3005                                                MSA128D, NoItinerary>;
3006 def SZ_V_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAnyZero, v16i8,
3007                                                MSA128B, NoItinerary>;