1 //===- MipsMSAInstrInfo.td - MSA ASE instructions -*- tablegen ------------*-=//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file describes Mips MSA ASE instructions.
11 //===----------------------------------------------------------------------===//
13 def SDT_MipsVecCond : SDTypeProfile<1, 1, [SDTCisInt<0>, SDTCisVec<1>]>;
14 def SDT_VSetCC : SDTypeProfile<1, 3, [SDTCisInt<0>,
17 SDTCisVT<3, OtherVT>]>;
18 def SDT_VFSetCC : SDTypeProfile<1, 3, [SDTCisInt<0>,
21 SDTCisVT<3, OtherVT>]>;
22 def SDT_VSHF : SDTypeProfile<1, 3, [SDTCisInt<0>, SDTCisVec<0>,
23 SDTCisInt<1>, SDTCisVec<1>,
24 SDTCisSameAs<0, 2>, SDTCisSameAs<2, 3>]>;
25 def SDT_SHF : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisVec<0>,
26 SDTCisVT<1, i32>, SDTCisSameAs<0, 2>]>;
27 def SDT_ILV : SDTypeProfile<1, 2, [SDTCisInt<0>, SDTCisVec<0>,
28 SDTCisSameAs<0, 1>, SDTCisSameAs<1, 2>]>;
29 def SDT_INSVE : SDTypeProfile<1, 4, [SDTCisVec<0>, SDTCisSameAs<0, 1>,
30 SDTCisVT<2, i32>, SDTCisSameAs<0, 3>,
33 def MipsVAllNonZero : SDNode<"MipsISD::VALL_NONZERO", SDT_MipsVecCond>;
34 def MipsVAnyNonZero : SDNode<"MipsISD::VANY_NONZERO", SDT_MipsVecCond>;
35 def MipsVAllZero : SDNode<"MipsISD::VALL_ZERO", SDT_MipsVecCond>;
36 def MipsVAnyZero : SDNode<"MipsISD::VANY_ZERO", SDT_MipsVecCond>;
37 def MipsVNOR : SDNode<"MipsISD::VNOR", SDTIntBinOp,
38 [SDNPCommutative, SDNPAssociative]>;
39 def MipsVSHF : SDNode<"MipsISD::VSHF", SDT_VSHF>;
40 def MipsSHF : SDNode<"MipsISD::SHF", SDT_SHF>;
41 def MipsILVEV : SDNode<"MipsISD::ILVEV", SDT_ILV>;
42 def MipsILVOD : SDNode<"MipsISD::ILVOD", SDT_ILV>;
43 def MipsILVL : SDNode<"MipsISD::ILVL", SDT_ILV>;
44 def MipsILVR : SDNode<"MipsISD::ILVR", SDT_ILV>;
45 def MipsPCKEV : SDNode<"MipsISD::PCKEV", SDT_ILV>;
46 def MipsPCKOD : SDNode<"MipsISD::PCKOD", SDT_ILV>;
47 def MipsINSVE : SDNode<"MipsISD::INSVE", SDT_INSVE>;
48 def MipsFMS : SDNode<"MipsISD::FMS", SDTFPTernaryOp>;
50 def vsetcc : SDNode<"ISD::SETCC", SDT_VSetCC>;
51 def vfsetcc : SDNode<"ISD::SETCC", SDT_VFSetCC>;
53 def MipsVExtractSExt : SDNode<"MipsISD::VEXTRACT_SEXT_ELT",
54 SDTypeProfile<1, 3, [SDTCisPtrTy<2>]>, []>;
55 def MipsVExtractZExt : SDNode<"MipsISD::VEXTRACT_ZEXT_ELT",
56 SDTypeProfile<1, 3, [SDTCisPtrTy<2>]>, []>;
58 def immZExt1Ptr : ImmLeaf<iPTR, [{return isUInt<1>(Imm);}]>;
59 def immZExt2Ptr : ImmLeaf<iPTR, [{return isUInt<2>(Imm);}]>;
60 def immZExt3Ptr : ImmLeaf<iPTR, [{return isUInt<3>(Imm);}]>;
61 def immZExt4Ptr : ImmLeaf<iPTR, [{return isUInt<4>(Imm);}]>;
63 def timmZExt1Ptr : TImmLeaf<iPTR, [{return isUInt<1>(Imm);}]>;
64 def timmZExt2Ptr : TImmLeaf<iPTR, [{return isUInt<2>(Imm);}]>;
65 def timmZExt3Ptr : TImmLeaf<iPTR, [{return isUInt<3>(Imm);}]>;
66 def timmZExt4Ptr : TImmLeaf<iPTR, [{return isUInt<4>(Imm);}]>;
70 def immZExt2Lsa : ImmLeaf<i32, [{return isUInt<2>(Imm - 1);}]>;
73 def vextract_sext_i8 : PatFrag<(ops node:$vec, node:$idx),
74 (MipsVExtractSExt node:$vec, node:$idx, i8)>;
75 def vextract_sext_i16 : PatFrag<(ops node:$vec, node:$idx),
76 (MipsVExtractSExt node:$vec, node:$idx, i16)>;
77 def vextract_sext_i32 : PatFrag<(ops node:$vec, node:$idx),
78 (MipsVExtractSExt node:$vec, node:$idx, i32)>;
79 def vextract_sext_i64 : PatFrag<(ops node:$vec, node:$idx),
80 (MipsVExtractSExt node:$vec, node:$idx, i64)>;
82 def vextract_zext_i8 : PatFrag<(ops node:$vec, node:$idx),
83 (MipsVExtractZExt node:$vec, node:$idx, i8)>;
84 def vextract_zext_i16 : PatFrag<(ops node:$vec, node:$idx),
85 (MipsVExtractZExt node:$vec, node:$idx, i16)>;
86 def vextract_zext_i32 : PatFrag<(ops node:$vec, node:$idx),
87 (MipsVExtractZExt node:$vec, node:$idx, i32)>;
88 def vextract_zext_i64 : PatFrag<(ops node:$vec, node:$idx),
89 (MipsVExtractZExt node:$vec, node:$idx, i64)>;
91 def vinsert_v16i8 : PatFrag<(ops node:$vec, node:$val, node:$idx),
92 (v16i8 (vector_insert node:$vec, node:$val, node:$idx))>;
93 def vinsert_v8i16 : PatFrag<(ops node:$vec, node:$val, node:$idx),
94 (v8i16 (vector_insert node:$vec, node:$val, node:$idx))>;
95 def vinsert_v4i32 : PatFrag<(ops node:$vec, node:$val, node:$idx),
96 (v4i32 (vector_insert node:$vec, node:$val, node:$idx))>;
97 def vinsert_v2i64 : PatFrag<(ops node:$vec, node:$val, node:$idx),
98 (v2i64 (vector_insert node:$vec, node:$val, node:$idx))>;
100 def insve_v16i8 : PatFrag<(ops node:$v1, node:$i1, node:$v2, node:$i2),
101 (v16i8 (MipsINSVE node:$v1, node:$i1, node:$v2, node:$i2))>;
102 def insve_v8i16 : PatFrag<(ops node:$v1, node:$i1, node:$v2, node:$i2),
103 (v8i16 (MipsINSVE node:$v1, node:$i1, node:$v2, node:$i2))>;
104 def insve_v4i32 : PatFrag<(ops node:$v1, node:$i1, node:$v2, node:$i2),
105 (v4i32 (MipsINSVE node:$v1, node:$i1, node:$v2, node:$i2))>;
106 def insve_v2i64 : PatFrag<(ops node:$v1, node:$i1, node:$v2, node:$i2),
107 (v2i64 (MipsINSVE node:$v1, node:$i1, node:$v2, node:$i2))>;
109 class vfsetcc_type<ValueType ResTy, ValueType OpTy, CondCode CC> :
110 PatFrag<(ops node:$lhs, node:$rhs),
111 (ResTy (vfsetcc (OpTy node:$lhs), (OpTy node:$rhs), CC))>;
113 // ISD::SETFALSE cannot occur
114 def vfseteq_v4f32 : vfsetcc_type<v4i32, v4f32, SETEQ>;
115 def vfseteq_v2f64 : vfsetcc_type<v2i64, v2f64, SETEQ>;
116 def vfsetge_v4f32 : vfsetcc_type<v4i32, v4f32, SETGE>;
117 def vfsetge_v2f64 : vfsetcc_type<v2i64, v2f64, SETGE>;
118 def vfsetgt_v4f32 : vfsetcc_type<v4i32, v4f32, SETGT>;
119 def vfsetgt_v2f64 : vfsetcc_type<v2i64, v2f64, SETGT>;
120 def vfsetle_v4f32 : vfsetcc_type<v4i32, v4f32, SETLE>;
121 def vfsetle_v2f64 : vfsetcc_type<v2i64, v2f64, SETLE>;
122 def vfsetlt_v4f32 : vfsetcc_type<v4i32, v4f32, SETLT>;
123 def vfsetlt_v2f64 : vfsetcc_type<v2i64, v2f64, SETLT>;
124 def vfsetne_v4f32 : vfsetcc_type<v4i32, v4f32, SETNE>;
125 def vfsetne_v2f64 : vfsetcc_type<v2i64, v2f64, SETNE>;
126 def vfsetoeq_v4f32 : vfsetcc_type<v4i32, v4f32, SETOEQ>;
127 def vfsetoeq_v2f64 : vfsetcc_type<v2i64, v2f64, SETOEQ>;
128 def vfsetoge_v4f32 : vfsetcc_type<v4i32, v4f32, SETOGE>;
129 def vfsetoge_v2f64 : vfsetcc_type<v2i64, v2f64, SETOGE>;
130 def vfsetogt_v4f32 : vfsetcc_type<v4i32, v4f32, SETOGT>;
131 def vfsetogt_v2f64 : vfsetcc_type<v2i64, v2f64, SETOGT>;
132 def vfsetole_v4f32 : vfsetcc_type<v4i32, v4f32, SETOLE>;
133 def vfsetole_v2f64 : vfsetcc_type<v2i64, v2f64, SETOLE>;
134 def vfsetolt_v4f32 : vfsetcc_type<v4i32, v4f32, SETOLT>;
135 def vfsetolt_v2f64 : vfsetcc_type<v2i64, v2f64, SETOLT>;
136 def vfsetone_v4f32 : vfsetcc_type<v4i32, v4f32, SETONE>;
137 def vfsetone_v2f64 : vfsetcc_type<v2i64, v2f64, SETONE>;
138 def vfsetord_v4f32 : vfsetcc_type<v4i32, v4f32, SETO>;
139 def vfsetord_v2f64 : vfsetcc_type<v2i64, v2f64, SETO>;
140 def vfsetun_v4f32 : vfsetcc_type<v4i32, v4f32, SETUO>;
141 def vfsetun_v2f64 : vfsetcc_type<v2i64, v2f64, SETUO>;
142 def vfsetueq_v4f32 : vfsetcc_type<v4i32, v4f32, SETUEQ>;
143 def vfsetueq_v2f64 : vfsetcc_type<v2i64, v2f64, SETUEQ>;
144 def vfsetuge_v4f32 : vfsetcc_type<v4i32, v4f32, SETUGE>;
145 def vfsetuge_v2f64 : vfsetcc_type<v2i64, v2f64, SETUGE>;
146 def vfsetugt_v4f32 : vfsetcc_type<v4i32, v4f32, SETUGT>;
147 def vfsetugt_v2f64 : vfsetcc_type<v2i64, v2f64, SETUGT>;
148 def vfsetule_v4f32 : vfsetcc_type<v4i32, v4f32, SETULE>;
149 def vfsetule_v2f64 : vfsetcc_type<v2i64, v2f64, SETULE>;
150 def vfsetult_v4f32 : vfsetcc_type<v4i32, v4f32, SETULT>;
151 def vfsetult_v2f64 : vfsetcc_type<v2i64, v2f64, SETULT>;
152 def vfsetune_v4f32 : vfsetcc_type<v4i32, v4f32, SETUNE>;
153 def vfsetune_v2f64 : vfsetcc_type<v2i64, v2f64, SETUNE>;
154 // ISD::SETTRUE cannot occur
155 // ISD::SETFALSE2 cannot occur
156 // ISD::SETTRUE2 cannot occur
158 class vsetcc_type<ValueType ResTy, CondCode CC> :
159 PatFrag<(ops node:$lhs, node:$rhs),
160 (ResTy (vsetcc node:$lhs, node:$rhs, CC))>;
162 def vseteq_v16i8 : vsetcc_type<v16i8, SETEQ>;
163 def vseteq_v8i16 : vsetcc_type<v8i16, SETEQ>;
164 def vseteq_v4i32 : vsetcc_type<v4i32, SETEQ>;
165 def vseteq_v2i64 : vsetcc_type<v2i64, SETEQ>;
166 def vsetle_v16i8 : vsetcc_type<v16i8, SETLE>;
167 def vsetle_v8i16 : vsetcc_type<v8i16, SETLE>;
168 def vsetle_v4i32 : vsetcc_type<v4i32, SETLE>;
169 def vsetle_v2i64 : vsetcc_type<v2i64, SETLE>;
170 def vsetlt_v16i8 : vsetcc_type<v16i8, SETLT>;
171 def vsetlt_v8i16 : vsetcc_type<v8i16, SETLT>;
172 def vsetlt_v4i32 : vsetcc_type<v4i32, SETLT>;
173 def vsetlt_v2i64 : vsetcc_type<v2i64, SETLT>;
174 def vsetule_v16i8 : vsetcc_type<v16i8, SETULE>;
175 def vsetule_v8i16 : vsetcc_type<v8i16, SETULE>;
176 def vsetule_v4i32 : vsetcc_type<v4i32, SETULE>;
177 def vsetule_v2i64 : vsetcc_type<v2i64, SETULE>;
178 def vsetult_v16i8 : vsetcc_type<v16i8, SETULT>;
179 def vsetult_v8i16 : vsetcc_type<v8i16, SETULT>;
180 def vsetult_v4i32 : vsetcc_type<v4i32, SETULT>;
181 def vsetult_v2i64 : vsetcc_type<v2i64, SETULT>;
183 def vsplati8 : PatFrag<(ops node:$e0),
184 (v16i8 (build_vector node:$e0, node:$e0,
191 node:$e0, node:$e0))>;
192 def vsplati16 : PatFrag<(ops node:$e0),
193 (v8i16 (build_vector node:$e0, node:$e0,
196 node:$e0, node:$e0))>;
197 def vsplati32 : PatFrag<(ops node:$e0),
198 (v4i32 (build_vector node:$e0, node:$e0,
199 node:$e0, node:$e0))>;
201 def vsplati64_imm_eq_1 : PatLeaf<(bitconvert (v4i32 (build_vector))), [{
203 SDNode *BV = N->getOperand(0).getNode();
204 EVT EltTy = N->getValueType(0).getVectorElementType();
206 return selectVSplat(BV, Imm, EltTy.getSizeInBits()) &&
207 Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1;
210 def vsplati64 : PatFrag<(ops node:$e0),
211 (v2i64 (build_vector node:$e0, node:$e0))>;
213 def vsplati64_splat_d : PatFrag<(ops node:$e0),
216 (v4i32 (build_vector node:$e0,
220 vsplati64_imm_eq_1))))>;
222 def vsplatf32 : PatFrag<(ops node:$e0),
223 (v4f32 (build_vector node:$e0, node:$e0,
224 node:$e0, node:$e0))>;
225 def vsplatf64 : PatFrag<(ops node:$e0),
226 (v2f64 (build_vector node:$e0, node:$e0))>;
228 def vsplati8_elt : PatFrag<(ops node:$v, node:$i),
229 (MipsVSHF (vsplati8 node:$i), node:$v, node:$v)>;
230 def vsplati16_elt : PatFrag<(ops node:$v, node:$i),
231 (MipsVSHF (vsplati16 node:$i), node:$v, node:$v)>;
232 def vsplati32_elt : PatFrag<(ops node:$v, node:$i),
233 (MipsVSHF (vsplati32 node:$i), node:$v, node:$v)>;
234 def vsplati64_elt : PatFrag<(ops node:$v, node:$i),
235 (MipsVSHF (vsplati64_splat_d node:$i),
238 class SplatPatLeaf<Operand opclass, dag frag, code pred = [{}],
239 SDNodeXForm xform = NOOP_SDNodeXForm>
240 : PatLeaf<frag, pred, xform> {
241 Operand OpClass = opclass;
244 class SplatComplexPattern<Operand opclass, ValueType ty, int numops, string fn,
245 list<SDNode> roots = [],
246 list<SDNodeProperty> props = []> :
247 ComplexPattern<ty, numops, fn, roots, props> {
248 Operand OpClass = opclass;
251 def vsplati8_uimm3 : SplatComplexPattern<vsplat_uimm3, v16i8, 1,
253 [build_vector, bitconvert]>;
255 def vsplati8_uimm4 : SplatComplexPattern<vsplat_uimm4, v16i8, 1,
257 [build_vector, bitconvert]>;
259 def vsplati8_uimm5 : SplatComplexPattern<vsplat_uimm5, v16i8, 1,
261 [build_vector, bitconvert]>;
263 def vsplati8_uimm8 : SplatComplexPattern<vsplat_uimm8, v16i8, 1,
265 [build_vector, bitconvert]>;
267 def vsplati8_simm5 : SplatComplexPattern<vsplat_simm5, v16i8, 1,
269 [build_vector, bitconvert]>;
271 def vsplati16_uimm3 : SplatComplexPattern<vsplat_uimm3, v8i16, 1,
273 [build_vector, bitconvert]>;
275 def vsplati16_uimm4 : SplatComplexPattern<vsplat_uimm4, v8i16, 1,
277 [build_vector, bitconvert]>;
279 def vsplati16_uimm5 : SplatComplexPattern<vsplat_uimm5, v8i16, 1,
281 [build_vector, bitconvert]>;
283 def vsplati16_simm5 : SplatComplexPattern<vsplat_simm5, v8i16, 1,
285 [build_vector, bitconvert]>;
287 def vsplati32_uimm2 : SplatComplexPattern<vsplat_uimm2, v4i32, 1,
289 [build_vector, bitconvert]>;
291 def vsplati32_uimm5 : SplatComplexPattern<vsplat_uimm5, v4i32, 1,
293 [build_vector, bitconvert]>;
295 def vsplati32_simm5 : SplatComplexPattern<vsplat_simm5, v4i32, 1,
297 [build_vector, bitconvert]>;
299 def vsplati64_uimm1 : SplatComplexPattern<vsplat_uimm1, v2i64, 1,
301 [build_vector, bitconvert]>;
303 def vsplati64_uimm5 : SplatComplexPattern<vsplat_uimm5, v2i64, 1,
305 [build_vector, bitconvert]>;
307 def vsplati64_uimm6 : SplatComplexPattern<vsplat_uimm6, v2i64, 1,
309 [build_vector, bitconvert]>;
311 def vsplati64_simm5 : SplatComplexPattern<vsplat_simm5, v2i64, 1,
313 [build_vector, bitconvert]>;
315 // Any build_vector that is a constant splat with a value that is an exact
317 def vsplat_uimm_pow2 : ComplexPattern<vAny, 1, "selectVSplatUimmPow2",
318 [build_vector, bitconvert]>;
320 // Any build_vector that is a constant splat with a value that is the bitwise
321 // inverse of an exact power of 2
322 def vsplat_uimm_inv_pow2 : ComplexPattern<vAny, 1, "selectVSplatUimmInvPow2",
323 [build_vector, bitconvert]>;
325 // Any build_vector that is a constant splat with only a consecutive sequence
326 // of left-most bits set.
327 def vsplat_maskl_bits_uimm3
328 : SplatComplexPattern<vsplat_uimm3, vAny, 1, "selectVSplatMaskL",
329 [build_vector, bitconvert]>;
330 def vsplat_maskl_bits_uimm4
331 : SplatComplexPattern<vsplat_uimm4, vAny, 1, "selectVSplatMaskL",
332 [build_vector, bitconvert]>;
333 def vsplat_maskl_bits_uimm5
334 : SplatComplexPattern<vsplat_uimm5, vAny, 1, "selectVSplatMaskL",
335 [build_vector, bitconvert]>;
336 def vsplat_maskl_bits_uimm6
337 : SplatComplexPattern<vsplat_uimm6, vAny, 1, "selectVSplatMaskL",
338 [build_vector, bitconvert]>;
340 // Any build_vector that is a constant splat with only a consecutive sequence
341 // of right-most bits set.
342 def vsplat_maskr_bits_uimm3
343 : SplatComplexPattern<vsplat_uimm3, vAny, 1, "selectVSplatMaskR",
344 [build_vector, bitconvert]>;
345 def vsplat_maskr_bits_uimm4
346 : SplatComplexPattern<vsplat_uimm4, vAny, 1, "selectVSplatMaskR",
347 [build_vector, bitconvert]>;
348 def vsplat_maskr_bits_uimm5
349 : SplatComplexPattern<vsplat_uimm5, vAny, 1, "selectVSplatMaskR",
350 [build_vector, bitconvert]>;
351 def vsplat_maskr_bits_uimm6
352 : SplatComplexPattern<vsplat_uimm6, vAny, 1, "selectVSplatMaskR",
353 [build_vector, bitconvert]>;
355 // Any build_vector that is a constant splat with a value that equals 1
356 // FIXME: These should be a ComplexPattern but we can't use them because the
357 // ISel generator requires the uses to have a name, but providing a name
358 // causes other errors ("used in pattern but not operand list")
359 def vsplat_imm_eq_1 : PatLeaf<(build_vector), [{
361 EVT EltTy = N->getValueType(0).getVectorElementType();
363 return selectVSplat(N, Imm, EltTy.getSizeInBits()) &&
364 Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 1;
367 def vbclr_b : PatFrag<(ops node:$ws, node:$wt),
368 (and node:$ws, (vnot (shl vsplat_imm_eq_1, node:$wt)))>;
369 def vbclr_h : PatFrag<(ops node:$ws, node:$wt),
370 (and node:$ws, (vnot (shl vsplat_imm_eq_1, node:$wt)))>;
371 def vbclr_w : PatFrag<(ops node:$ws, node:$wt),
372 (and node:$ws, (vnot (shl vsplat_imm_eq_1, node:$wt)))>;
373 def vbclr_d : PatFrag<(ops node:$ws, node:$wt),
374 (and node:$ws, (vnot (shl (v2i64 vsplati64_imm_eq_1),
377 def vbneg_b : PatFrag<(ops node:$ws, node:$wt),
378 (xor node:$ws, (shl vsplat_imm_eq_1, node:$wt))>;
379 def vbneg_h : PatFrag<(ops node:$ws, node:$wt),
380 (xor node:$ws, (shl vsplat_imm_eq_1, node:$wt))>;
381 def vbneg_w : PatFrag<(ops node:$ws, node:$wt),
382 (xor node:$ws, (shl vsplat_imm_eq_1, node:$wt))>;
383 def vbneg_d : PatFrag<(ops node:$ws, node:$wt),
384 (xor node:$ws, (shl (v2i64 vsplati64_imm_eq_1),
387 def vbset_b : PatFrag<(ops node:$ws, node:$wt),
388 (or node:$ws, (shl vsplat_imm_eq_1, node:$wt))>;
389 def vbset_h : PatFrag<(ops node:$ws, node:$wt),
390 (or node:$ws, (shl vsplat_imm_eq_1, node:$wt))>;
391 def vbset_w : PatFrag<(ops node:$ws, node:$wt),
392 (or node:$ws, (shl vsplat_imm_eq_1, node:$wt))>;
393 def vbset_d : PatFrag<(ops node:$ws, node:$wt),
394 (or node:$ws, (shl (v2i64 vsplati64_imm_eq_1),
397 def muladd : PatFrag<(ops node:$wd, node:$ws, node:$wt),
398 (add node:$wd, (mul node:$ws, node:$wt))>;
400 def mulsub : PatFrag<(ops node:$wd, node:$ws, node:$wt),
401 (sub node:$wd, (mul node:$ws, node:$wt))>;
403 def mul_fexp2 : PatFrag<(ops node:$ws, node:$wt),
404 (fmul node:$ws, (fexp2 node:$wt))>;
406 // Instruction encoding.
407 class ADD_A_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010000>;
408 class ADD_A_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010000>;
409 class ADD_A_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010000>;
410 class ADD_A_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010000>;
412 class ADDS_A_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010000>;
413 class ADDS_A_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010000>;
414 class ADDS_A_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010000>;
415 class ADDS_A_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010000>;
417 class ADDS_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010000>;
418 class ADDS_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010000>;
419 class ADDS_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010000>;
420 class ADDS_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010000>;
422 class ADDS_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b010000>;
423 class ADDS_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010000>;
424 class ADDS_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010000>;
425 class ADDS_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010000>;
427 class ADDV_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b001110>;
428 class ADDV_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b001110>;
429 class ADDV_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b001110>;
430 class ADDV_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b001110>;
432 class ADDVI_B_ENC : MSA_I5_FMT<0b000, 0b00, 0b000110>;
433 class ADDVI_H_ENC : MSA_I5_FMT<0b000, 0b01, 0b000110>;
434 class ADDVI_W_ENC : MSA_I5_FMT<0b000, 0b10, 0b000110>;
435 class ADDVI_D_ENC : MSA_I5_FMT<0b000, 0b11, 0b000110>;
437 class AND_V_ENC : MSA_VEC_FMT<0b00000, 0b011110>;
439 class ANDI_B_ENC : MSA_I8_FMT<0b00, 0b000000>;
441 class ASUB_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010001>;
442 class ASUB_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010001>;
443 class ASUB_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010001>;
444 class ASUB_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010001>;
446 class ASUB_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010001>;
447 class ASUB_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010001>;
448 class ASUB_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010001>;
449 class ASUB_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010001>;
451 class AVE_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010000>;
452 class AVE_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010000>;
453 class AVE_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010000>;
454 class AVE_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010000>;
456 class AVE_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010000>;
457 class AVE_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010000>;
458 class AVE_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010000>;
459 class AVE_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010000>;
461 class AVER_S_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b010000>;
462 class AVER_S_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010000>;
463 class AVER_S_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010000>;
464 class AVER_S_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010000>;
466 class AVER_U_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b010000>;
467 class AVER_U_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010000>;
468 class AVER_U_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010000>;
469 class AVER_U_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010000>;
471 class BCLR_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b001101>;
472 class BCLR_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b001101>;
473 class BCLR_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b001101>;
474 class BCLR_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b001101>;
476 class BCLRI_B_ENC : MSA_BIT_B_FMT<0b011, 0b001001>;
477 class BCLRI_H_ENC : MSA_BIT_H_FMT<0b011, 0b001001>;
478 class BCLRI_W_ENC : MSA_BIT_W_FMT<0b011, 0b001001>;
479 class BCLRI_D_ENC : MSA_BIT_D_FMT<0b011, 0b001001>;
481 class BINSL_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b001101>;
482 class BINSL_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b001101>;
483 class BINSL_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b001101>;
484 class BINSL_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b001101>;
486 class BINSLI_B_ENC : MSA_BIT_B_FMT<0b110, 0b001001>;
487 class BINSLI_H_ENC : MSA_BIT_H_FMT<0b110, 0b001001>;
488 class BINSLI_W_ENC : MSA_BIT_W_FMT<0b110, 0b001001>;
489 class BINSLI_D_ENC : MSA_BIT_D_FMT<0b110, 0b001001>;
491 class BINSR_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b001101>;
492 class BINSR_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b001101>;
493 class BINSR_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b001101>;
494 class BINSR_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b001101>;
496 class BINSRI_B_ENC : MSA_BIT_B_FMT<0b111, 0b001001>;
497 class BINSRI_H_ENC : MSA_BIT_H_FMT<0b111, 0b001001>;
498 class BINSRI_W_ENC : MSA_BIT_W_FMT<0b111, 0b001001>;
499 class BINSRI_D_ENC : MSA_BIT_D_FMT<0b111, 0b001001>;
501 class BMNZ_V_ENC : MSA_VEC_FMT<0b00100, 0b011110>;
503 class BMNZI_B_ENC : MSA_I8_FMT<0b00, 0b000001>;
505 class BMZ_V_ENC : MSA_VEC_FMT<0b00101, 0b011110>;
507 class BMZI_B_ENC : MSA_I8_FMT<0b01, 0b000001>;
509 class BNEG_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b001101>;
510 class BNEG_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b001101>;
511 class BNEG_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b001101>;
512 class BNEG_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b001101>;
514 class BNEGI_B_ENC : MSA_BIT_B_FMT<0b101, 0b001001>;
515 class BNEGI_H_ENC : MSA_BIT_H_FMT<0b101, 0b001001>;
516 class BNEGI_W_ENC : MSA_BIT_W_FMT<0b101, 0b001001>;
517 class BNEGI_D_ENC : MSA_BIT_D_FMT<0b101, 0b001001>;
519 class BNZ_B_ENC : MSA_CBRANCH_FMT<0b111, 0b00>;
520 class BNZ_H_ENC : MSA_CBRANCH_FMT<0b111, 0b01>;
521 class BNZ_W_ENC : MSA_CBRANCH_FMT<0b111, 0b10>;
522 class BNZ_D_ENC : MSA_CBRANCH_FMT<0b111, 0b11>;
524 class BNZ_V_ENC : MSA_CBRANCH_V_FMT<0b01111>;
526 class BSEL_V_ENC : MSA_VEC_FMT<0b00110, 0b011110>;
528 class BSELI_B_ENC : MSA_I8_FMT<0b10, 0b000001>;
530 class BSET_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b001101>;
531 class BSET_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b001101>;
532 class BSET_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b001101>;
533 class BSET_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b001101>;
535 class BSETI_B_ENC : MSA_BIT_B_FMT<0b100, 0b001001>;
536 class BSETI_H_ENC : MSA_BIT_H_FMT<0b100, 0b001001>;
537 class BSETI_W_ENC : MSA_BIT_W_FMT<0b100, 0b001001>;
538 class BSETI_D_ENC : MSA_BIT_D_FMT<0b100, 0b001001>;
540 class BZ_B_ENC : MSA_CBRANCH_FMT<0b110, 0b00>;
541 class BZ_H_ENC : MSA_CBRANCH_FMT<0b110, 0b01>;
542 class BZ_W_ENC : MSA_CBRANCH_FMT<0b110, 0b10>;
543 class BZ_D_ENC : MSA_CBRANCH_FMT<0b110, 0b11>;
545 class BZ_V_ENC : MSA_CBRANCH_V_FMT<0b01011>;
547 class CEQ_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b001111>;
548 class CEQ_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b001111>;
549 class CEQ_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b001111>;
550 class CEQ_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b001111>;
552 class CEQI_B_ENC : MSA_I5_FMT<0b000, 0b00, 0b000111>;
553 class CEQI_H_ENC : MSA_I5_FMT<0b000, 0b01, 0b000111>;
554 class CEQI_W_ENC : MSA_I5_FMT<0b000, 0b10, 0b000111>;
555 class CEQI_D_ENC : MSA_I5_FMT<0b000, 0b11, 0b000111>;
557 class CFCMSA_ENC : MSA_ELM_CFCMSA_FMT<0b0001111110, 0b011001>;
559 class CLE_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b001111>;
560 class CLE_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b001111>;
561 class CLE_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b001111>;
562 class CLE_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b001111>;
564 class CLE_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b001111>;
565 class CLE_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b001111>;
566 class CLE_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b001111>;
567 class CLE_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b001111>;
569 class CLEI_S_B_ENC : MSA_I5_FMT<0b100, 0b00, 0b000111>;
570 class CLEI_S_H_ENC : MSA_I5_FMT<0b100, 0b01, 0b000111>;
571 class CLEI_S_W_ENC : MSA_I5_FMT<0b100, 0b10, 0b000111>;
572 class CLEI_S_D_ENC : MSA_I5_FMT<0b100, 0b11, 0b000111>;
574 class CLEI_U_B_ENC : MSA_I5_FMT<0b101, 0b00, 0b000111>;
575 class CLEI_U_H_ENC : MSA_I5_FMT<0b101, 0b01, 0b000111>;
576 class CLEI_U_W_ENC : MSA_I5_FMT<0b101, 0b10, 0b000111>;
577 class CLEI_U_D_ENC : MSA_I5_FMT<0b101, 0b11, 0b000111>;
579 class CLT_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b001111>;
580 class CLT_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b001111>;
581 class CLT_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b001111>;
582 class CLT_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b001111>;
584 class CLT_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b001111>;
585 class CLT_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b001111>;
586 class CLT_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b001111>;
587 class CLT_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b001111>;
589 class CLTI_S_B_ENC : MSA_I5_FMT<0b010, 0b00, 0b000111>;
590 class CLTI_S_H_ENC : MSA_I5_FMT<0b010, 0b01, 0b000111>;
591 class CLTI_S_W_ENC : MSA_I5_FMT<0b010, 0b10, 0b000111>;
592 class CLTI_S_D_ENC : MSA_I5_FMT<0b010, 0b11, 0b000111>;
594 class CLTI_U_B_ENC : MSA_I5_FMT<0b011, 0b00, 0b000111>;
595 class CLTI_U_H_ENC : MSA_I5_FMT<0b011, 0b01, 0b000111>;
596 class CLTI_U_W_ENC : MSA_I5_FMT<0b011, 0b10, 0b000111>;
597 class CLTI_U_D_ENC : MSA_I5_FMT<0b011, 0b11, 0b000111>;
599 class COPY_S_B_ENC : MSA_ELM_COPY_B_FMT<0b0010, 0b011001>;
600 class COPY_S_H_ENC : MSA_ELM_COPY_H_FMT<0b0010, 0b011001>;
601 class COPY_S_W_ENC : MSA_ELM_COPY_W_FMT<0b0010, 0b011001>;
602 class COPY_S_D_ENC : MSA_ELM_COPY_D_FMT<0b0010, 0b011001>;
604 class COPY_U_B_ENC : MSA_ELM_COPY_B_FMT<0b0011, 0b011001>;
605 class COPY_U_H_ENC : MSA_ELM_COPY_H_FMT<0b0011, 0b011001>;
606 class COPY_U_W_ENC : MSA_ELM_COPY_W_FMT<0b0011, 0b011001>;
608 class CTCMSA_ENC : MSA_ELM_CTCMSA_FMT<0b0000111110, 0b011001>;
610 class DIV_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010010>;
611 class DIV_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010010>;
612 class DIV_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010010>;
613 class DIV_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010010>;
615 class DIV_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010010>;
616 class DIV_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010010>;
617 class DIV_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010010>;
618 class DIV_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010010>;
620 class DOTP_S_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010011>;
621 class DOTP_S_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010011>;
622 class DOTP_S_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010011>;
624 class DOTP_U_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010011>;
625 class DOTP_U_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010011>;
626 class DOTP_U_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010011>;
628 class DPADD_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010011>;
629 class DPADD_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010011>;
630 class DPADD_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010011>;
632 class DPADD_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010011>;
633 class DPADD_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010011>;
634 class DPADD_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010011>;
636 class DPSUB_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010011>;
637 class DPSUB_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010011>;
638 class DPSUB_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010011>;
640 class DPSUB_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010011>;
641 class DPSUB_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010011>;
642 class DPSUB_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010011>;
644 class FADD_W_ENC : MSA_3RF_FMT<0b0000, 0b0, 0b011011>;
645 class FADD_D_ENC : MSA_3RF_FMT<0b0000, 0b1, 0b011011>;
647 class FCAF_W_ENC : MSA_3RF_FMT<0b0000, 0b0, 0b011010>;
648 class FCAF_D_ENC : MSA_3RF_FMT<0b0000, 0b1, 0b011010>;
650 class FCEQ_W_ENC : MSA_3RF_FMT<0b0010, 0b0, 0b011010>;
651 class FCEQ_D_ENC : MSA_3RF_FMT<0b0010, 0b1, 0b011010>;
653 class FCLASS_W_ENC : MSA_2RF_FMT<0b110010000, 0b0, 0b011110>;
654 class FCLASS_D_ENC : MSA_2RF_FMT<0b110010000, 0b1, 0b011110>;
656 class FCLE_W_ENC : MSA_3RF_FMT<0b0110, 0b0, 0b011010>;
657 class FCLE_D_ENC : MSA_3RF_FMT<0b0110, 0b1, 0b011010>;
659 class FCLT_W_ENC : MSA_3RF_FMT<0b0100, 0b0, 0b011010>;
660 class FCLT_D_ENC : MSA_3RF_FMT<0b0100, 0b1, 0b011010>;
662 class FCNE_W_ENC : MSA_3RF_FMT<0b0011, 0b0, 0b011100>;
663 class FCNE_D_ENC : MSA_3RF_FMT<0b0011, 0b1, 0b011100>;
665 class FCOR_W_ENC : MSA_3RF_FMT<0b0001, 0b0, 0b011100>;
666 class FCOR_D_ENC : MSA_3RF_FMT<0b0001, 0b1, 0b011100>;
668 class FCUEQ_W_ENC : MSA_3RF_FMT<0b0011, 0b0, 0b011010>;
669 class FCUEQ_D_ENC : MSA_3RF_FMT<0b0011, 0b1, 0b011010>;
671 class FCULE_W_ENC : MSA_3RF_FMT<0b0111, 0b0, 0b011010>;
672 class FCULE_D_ENC : MSA_3RF_FMT<0b0111, 0b1, 0b011010>;
674 class FCULT_W_ENC : MSA_3RF_FMT<0b0101, 0b0, 0b011010>;
675 class FCULT_D_ENC : MSA_3RF_FMT<0b0101, 0b1, 0b011010>;
677 class FCUN_W_ENC : MSA_3RF_FMT<0b0001, 0b0, 0b011010>;
678 class FCUN_D_ENC : MSA_3RF_FMT<0b0001, 0b1, 0b011010>;
680 class FCUNE_W_ENC : MSA_3RF_FMT<0b0010, 0b0, 0b011100>;
681 class FCUNE_D_ENC : MSA_3RF_FMT<0b0010, 0b1, 0b011100>;
683 class FDIV_W_ENC : MSA_3RF_FMT<0b0011, 0b0, 0b011011>;
684 class FDIV_D_ENC : MSA_3RF_FMT<0b0011, 0b1, 0b011011>;
686 class FEXDO_H_ENC : MSA_3RF_FMT<0b1000, 0b0, 0b011011>;
687 class FEXDO_W_ENC : MSA_3RF_FMT<0b1000, 0b1, 0b011011>;
689 class FEXP2_W_ENC : MSA_3RF_FMT<0b0111, 0b0, 0b011011>;
690 class FEXP2_D_ENC : MSA_3RF_FMT<0b0111, 0b1, 0b011011>;
692 class FEXUPL_W_ENC : MSA_2RF_FMT<0b110011000, 0b0, 0b011110>;
693 class FEXUPL_D_ENC : MSA_2RF_FMT<0b110011000, 0b1, 0b011110>;
695 class FEXUPR_W_ENC : MSA_2RF_FMT<0b110011001, 0b0, 0b011110>;
696 class FEXUPR_D_ENC : MSA_2RF_FMT<0b110011001, 0b1, 0b011110>;
698 class FFINT_S_W_ENC : MSA_2RF_FMT<0b110011110, 0b0, 0b011110>;
699 class FFINT_S_D_ENC : MSA_2RF_FMT<0b110011110, 0b1, 0b011110>;
701 class FFINT_U_W_ENC : MSA_2RF_FMT<0b110011111, 0b0, 0b011110>;
702 class FFINT_U_D_ENC : MSA_2RF_FMT<0b110011111, 0b1, 0b011110>;
704 class FFQL_W_ENC : MSA_2RF_FMT<0b110011010, 0b0, 0b011110>;
705 class FFQL_D_ENC : MSA_2RF_FMT<0b110011010, 0b1, 0b011110>;
707 class FFQR_W_ENC : MSA_2RF_FMT<0b110011011, 0b0, 0b011110>;
708 class FFQR_D_ENC : MSA_2RF_FMT<0b110011011, 0b1, 0b011110>;
710 class FILL_B_ENC : MSA_2R_FILL_FMT<0b11000000, 0b00, 0b011110>;
711 class FILL_H_ENC : MSA_2R_FILL_FMT<0b11000000, 0b01, 0b011110>;
712 class FILL_W_ENC : MSA_2R_FILL_FMT<0b11000000, 0b10, 0b011110>;
713 class FILL_D_ENC : MSA_2R_FILL_D_FMT<0b11000000, 0b11, 0b011110>;
715 class FLOG2_W_ENC : MSA_2RF_FMT<0b110010111, 0b0, 0b011110>;
716 class FLOG2_D_ENC : MSA_2RF_FMT<0b110010111, 0b1, 0b011110>;
718 class FMADD_W_ENC : MSA_3RF_FMT<0b0100, 0b0, 0b011011>;
719 class FMADD_D_ENC : MSA_3RF_FMT<0b0100, 0b1, 0b011011>;
721 class FMAX_W_ENC : MSA_3RF_FMT<0b1110, 0b0, 0b011011>;
722 class FMAX_D_ENC : MSA_3RF_FMT<0b1110, 0b1, 0b011011>;
724 class FMAX_A_W_ENC : MSA_3RF_FMT<0b1111, 0b0, 0b011011>;
725 class FMAX_A_D_ENC : MSA_3RF_FMT<0b1111, 0b1, 0b011011>;
727 class FMIN_W_ENC : MSA_3RF_FMT<0b1100, 0b0, 0b011011>;
728 class FMIN_D_ENC : MSA_3RF_FMT<0b1100, 0b1, 0b011011>;
730 class FMIN_A_W_ENC : MSA_3RF_FMT<0b1101, 0b0, 0b011011>;
731 class FMIN_A_D_ENC : MSA_3RF_FMT<0b1101, 0b1, 0b011011>;
733 class FMSUB_W_ENC : MSA_3RF_FMT<0b0101, 0b0, 0b011011>;
734 class FMSUB_D_ENC : MSA_3RF_FMT<0b0101, 0b1, 0b011011>;
736 class FMUL_W_ENC : MSA_3RF_FMT<0b0010, 0b0, 0b011011>;
737 class FMUL_D_ENC : MSA_3RF_FMT<0b0010, 0b1, 0b011011>;
739 class FRINT_W_ENC : MSA_2RF_FMT<0b110010110, 0b0, 0b011110>;
740 class FRINT_D_ENC : MSA_2RF_FMT<0b110010110, 0b1, 0b011110>;
742 class FRCP_W_ENC : MSA_2RF_FMT<0b110010101, 0b0, 0b011110>;
743 class FRCP_D_ENC : MSA_2RF_FMT<0b110010101, 0b1, 0b011110>;
745 class FRSQRT_W_ENC : MSA_2RF_FMT<0b110010100, 0b0, 0b011110>;
746 class FRSQRT_D_ENC : MSA_2RF_FMT<0b110010100, 0b1, 0b011110>;
748 class FSAF_W_ENC : MSA_3RF_FMT<0b1000, 0b0, 0b011010>;
749 class FSAF_D_ENC : MSA_3RF_FMT<0b1000, 0b1, 0b011010>;
751 class FSEQ_W_ENC : MSA_3RF_FMT<0b1010, 0b0, 0b011010>;
752 class FSEQ_D_ENC : MSA_3RF_FMT<0b1010, 0b1, 0b011010>;
754 class FSLE_W_ENC : MSA_3RF_FMT<0b1110, 0b0, 0b011010>;
755 class FSLE_D_ENC : MSA_3RF_FMT<0b1110, 0b1, 0b011010>;
757 class FSLT_W_ENC : MSA_3RF_FMT<0b1100, 0b0, 0b011010>;
758 class FSLT_D_ENC : MSA_3RF_FMT<0b1100, 0b1, 0b011010>;
760 class FSNE_W_ENC : MSA_3RF_FMT<0b1011, 0b0, 0b011100>;
761 class FSNE_D_ENC : MSA_3RF_FMT<0b1011, 0b1, 0b011100>;
763 class FSOR_W_ENC : MSA_3RF_FMT<0b1001, 0b0, 0b011100>;
764 class FSOR_D_ENC : MSA_3RF_FMT<0b1001, 0b1, 0b011100>;
766 class FSQRT_W_ENC : MSA_2RF_FMT<0b110010011, 0b0, 0b011110>;
767 class FSQRT_D_ENC : MSA_2RF_FMT<0b110010011, 0b1, 0b011110>;
769 class FSUB_W_ENC : MSA_3RF_FMT<0b0001, 0b0, 0b011011>;
770 class FSUB_D_ENC : MSA_3RF_FMT<0b0001, 0b1, 0b011011>;
772 class FSUEQ_W_ENC : MSA_3RF_FMT<0b1011, 0b0, 0b011010>;
773 class FSUEQ_D_ENC : MSA_3RF_FMT<0b1011, 0b1, 0b011010>;
775 class FSULE_W_ENC : MSA_3RF_FMT<0b1111, 0b0, 0b011010>;
776 class FSULE_D_ENC : MSA_3RF_FMT<0b1111, 0b1, 0b011010>;
778 class FSULT_W_ENC : MSA_3RF_FMT<0b1101, 0b0, 0b011010>;
779 class FSULT_D_ENC : MSA_3RF_FMT<0b1101, 0b1, 0b011010>;
781 class FSUN_W_ENC : MSA_3RF_FMT<0b1001, 0b0, 0b011010>;
782 class FSUN_D_ENC : MSA_3RF_FMT<0b1001, 0b1, 0b011010>;
784 class FSUNE_W_ENC : MSA_3RF_FMT<0b1010, 0b0, 0b011100>;
785 class FSUNE_D_ENC : MSA_3RF_FMT<0b1010, 0b1, 0b011100>;
787 class FTINT_S_W_ENC : MSA_2RF_FMT<0b110011100, 0b0, 0b011110>;
788 class FTINT_S_D_ENC : MSA_2RF_FMT<0b110011100, 0b1, 0b011110>;
790 class FTINT_U_W_ENC : MSA_2RF_FMT<0b110011101, 0b0, 0b011110>;
791 class FTINT_U_D_ENC : MSA_2RF_FMT<0b110011101, 0b1, 0b011110>;
793 class FTQ_H_ENC : MSA_3RF_FMT<0b1010, 0b0, 0b011011>;
794 class FTQ_W_ENC : MSA_3RF_FMT<0b1010, 0b1, 0b011011>;
796 class FTRUNC_S_W_ENC : MSA_2RF_FMT<0b110010001, 0b0, 0b011110>;
797 class FTRUNC_S_D_ENC : MSA_2RF_FMT<0b110010001, 0b1, 0b011110>;
799 class FTRUNC_U_W_ENC : MSA_2RF_FMT<0b110010010, 0b0, 0b011110>;
800 class FTRUNC_U_D_ENC : MSA_2RF_FMT<0b110010010, 0b1, 0b011110>;
802 class HADD_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010101>;
803 class HADD_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010101>;
804 class HADD_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010101>;
806 class HADD_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010101>;
807 class HADD_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010101>;
808 class HADD_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010101>;
810 class HSUB_S_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010101>;
811 class HSUB_S_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010101>;
812 class HSUB_S_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010101>;
814 class HSUB_U_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010101>;
815 class HSUB_U_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010101>;
816 class HSUB_U_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010101>;
818 class ILVEV_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b010100>;
819 class ILVEV_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010100>;
820 class ILVEV_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010100>;
821 class ILVEV_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010100>;
823 class ILVL_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b010100>;
824 class ILVL_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b010100>;
825 class ILVL_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b010100>;
826 class ILVL_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b010100>;
828 class ILVOD_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b010100>;
829 class ILVOD_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010100>;
830 class ILVOD_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010100>;
831 class ILVOD_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010100>;
833 class ILVR_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b010100>;
834 class ILVR_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b010100>;
835 class ILVR_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b010100>;
836 class ILVR_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b010100>;
838 class INSERT_B_ENC : MSA_ELM_INSERT_B_FMT<0b0100, 0b011001>;
839 class INSERT_H_ENC : MSA_ELM_INSERT_H_FMT<0b0100, 0b011001>;
840 class INSERT_W_ENC : MSA_ELM_INSERT_W_FMT<0b0100, 0b011001>;
841 class INSERT_D_ENC : MSA_ELM_INSERT_D_FMT<0b0100, 0b011001>;
843 class INSVE_B_ENC : MSA_ELM_B_FMT<0b0101, 0b011001>;
844 class INSVE_H_ENC : MSA_ELM_H_FMT<0b0101, 0b011001>;
845 class INSVE_W_ENC : MSA_ELM_W_FMT<0b0101, 0b011001>;
846 class INSVE_D_ENC : MSA_ELM_D_FMT<0b0101, 0b011001>;
848 class LD_B_ENC : MSA_MI10_FMT<0b00, 0b1000>;
849 class LD_H_ENC : MSA_MI10_FMT<0b01, 0b1000>;
850 class LD_W_ENC : MSA_MI10_FMT<0b10, 0b1000>;
851 class LD_D_ENC : MSA_MI10_FMT<0b11, 0b1000>;
853 class LDI_B_ENC : MSA_I10_FMT<0b110, 0b00, 0b000111>;
854 class LDI_H_ENC : MSA_I10_FMT<0b110, 0b01, 0b000111>;
855 class LDI_W_ENC : MSA_I10_FMT<0b110, 0b10, 0b000111>;
856 class LDI_D_ENC : MSA_I10_FMT<0b110, 0b11, 0b000111>;
858 class LSA_ENC : SPECIAL_LSA_FMT<0b000101>;
859 class DLSA_ENC : SPECIAL_DLSA_FMT<0b010101>;
861 class MADD_Q_H_ENC : MSA_3RF_FMT<0b0101, 0b0, 0b011100>;
862 class MADD_Q_W_ENC : MSA_3RF_FMT<0b0101, 0b1, 0b011100>;
864 class MADDR_Q_H_ENC : MSA_3RF_FMT<0b1101, 0b0, 0b011100>;
865 class MADDR_Q_W_ENC : MSA_3RF_FMT<0b1101, 0b1, 0b011100>;
867 class MADDV_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010010>;
868 class MADDV_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010010>;
869 class MADDV_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010010>;
870 class MADDV_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010010>;
872 class MAX_A_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b001110>;
873 class MAX_A_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b001110>;
874 class MAX_A_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b001110>;
875 class MAX_A_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b001110>;
877 class MAX_S_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b001110>;
878 class MAX_S_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b001110>;
879 class MAX_S_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b001110>;
880 class MAX_S_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b001110>;
882 class MAX_U_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b001110>;
883 class MAX_U_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b001110>;
884 class MAX_U_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b001110>;
885 class MAX_U_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b001110>;
887 class MAXI_S_B_ENC : MSA_I5_FMT<0b010, 0b00, 0b000110>;
888 class MAXI_S_H_ENC : MSA_I5_FMT<0b010, 0b01, 0b000110>;
889 class MAXI_S_W_ENC : MSA_I5_FMT<0b010, 0b10, 0b000110>;
890 class MAXI_S_D_ENC : MSA_I5_FMT<0b010, 0b11, 0b000110>;
892 class MAXI_U_B_ENC : MSA_I5_FMT<0b011, 0b00, 0b000110>;
893 class MAXI_U_H_ENC : MSA_I5_FMT<0b011, 0b01, 0b000110>;
894 class MAXI_U_W_ENC : MSA_I5_FMT<0b011, 0b10, 0b000110>;
895 class MAXI_U_D_ENC : MSA_I5_FMT<0b011, 0b11, 0b000110>;
897 class MIN_A_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b001110>;
898 class MIN_A_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b001110>;
899 class MIN_A_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b001110>;
900 class MIN_A_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b001110>;
902 class MIN_S_B_ENC : MSA_3R_FMT<0b100, 0b00, 0b001110>;
903 class MIN_S_H_ENC : MSA_3R_FMT<0b100, 0b01, 0b001110>;
904 class MIN_S_W_ENC : MSA_3R_FMT<0b100, 0b10, 0b001110>;
905 class MIN_S_D_ENC : MSA_3R_FMT<0b100, 0b11, 0b001110>;
907 class MIN_U_B_ENC : MSA_3R_FMT<0b101, 0b00, 0b001110>;
908 class MIN_U_H_ENC : MSA_3R_FMT<0b101, 0b01, 0b001110>;
909 class MIN_U_W_ENC : MSA_3R_FMT<0b101, 0b10, 0b001110>;
910 class MIN_U_D_ENC : MSA_3R_FMT<0b101, 0b11, 0b001110>;
912 class MINI_S_B_ENC : MSA_I5_FMT<0b100, 0b00, 0b000110>;
913 class MINI_S_H_ENC : MSA_I5_FMT<0b100, 0b01, 0b000110>;
914 class MINI_S_W_ENC : MSA_I5_FMT<0b100, 0b10, 0b000110>;
915 class MINI_S_D_ENC : MSA_I5_FMT<0b100, 0b11, 0b000110>;
917 class MINI_U_B_ENC : MSA_I5_FMT<0b101, 0b00, 0b000110>;
918 class MINI_U_H_ENC : MSA_I5_FMT<0b101, 0b01, 0b000110>;
919 class MINI_U_W_ENC : MSA_I5_FMT<0b101, 0b10, 0b000110>;
920 class MINI_U_D_ENC : MSA_I5_FMT<0b101, 0b11, 0b000110>;
922 class MOD_S_B_ENC : MSA_3R_FMT<0b110, 0b00, 0b010010>;
923 class MOD_S_H_ENC : MSA_3R_FMT<0b110, 0b01, 0b010010>;
924 class MOD_S_W_ENC : MSA_3R_FMT<0b110, 0b10, 0b010010>;
925 class MOD_S_D_ENC : MSA_3R_FMT<0b110, 0b11, 0b010010>;
927 class MOD_U_B_ENC : MSA_3R_FMT<0b111, 0b00, 0b010010>;
928 class MOD_U_H_ENC : MSA_3R_FMT<0b111, 0b01, 0b010010>;
929 class MOD_U_W_ENC : MSA_3R_FMT<0b111, 0b10, 0b010010>;
930 class MOD_U_D_ENC : MSA_3R_FMT<0b111, 0b11, 0b010010>;
932 class MOVE_V_ENC : MSA_ELM_FMT<0b0010111110, 0b011001>;
934 class MSUB_Q_H_ENC : MSA_3RF_FMT<0b0110, 0b0, 0b011100>;
935 class MSUB_Q_W_ENC : MSA_3RF_FMT<0b0110, 0b1, 0b011100>;
937 class MSUBR_Q_H_ENC : MSA_3RF_FMT<0b1110, 0b0, 0b011100>;
938 class MSUBR_Q_W_ENC : MSA_3RF_FMT<0b1110, 0b1, 0b011100>;
940 class MSUBV_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010010>;
941 class MSUBV_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010010>;
942 class MSUBV_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010010>;
943 class MSUBV_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010010>;
945 class MUL_Q_H_ENC : MSA_3RF_FMT<0b0100, 0b0, 0b011100>;
946 class MUL_Q_W_ENC : MSA_3RF_FMT<0b0100, 0b1, 0b011100>;
948 class MULR_Q_H_ENC : MSA_3RF_FMT<0b1100, 0b0, 0b011100>;
949 class MULR_Q_W_ENC : MSA_3RF_FMT<0b1100, 0b1, 0b011100>;
951 class MULV_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010010>;
952 class MULV_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010010>;
953 class MULV_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010010>;
954 class MULV_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010010>;
956 class NLOC_B_ENC : MSA_2R_FMT<0b11000010, 0b00, 0b011110>;
957 class NLOC_H_ENC : MSA_2R_FMT<0b11000010, 0b01, 0b011110>;
958 class NLOC_W_ENC : MSA_2R_FMT<0b11000010, 0b10, 0b011110>;
959 class NLOC_D_ENC : MSA_2R_FMT<0b11000010, 0b11, 0b011110>;
961 class NLZC_B_ENC : MSA_2R_FMT<0b11000011, 0b00, 0b011110>;
962 class NLZC_H_ENC : MSA_2R_FMT<0b11000011, 0b01, 0b011110>;
963 class NLZC_W_ENC : MSA_2R_FMT<0b11000011, 0b10, 0b011110>;
964 class NLZC_D_ENC : MSA_2R_FMT<0b11000011, 0b11, 0b011110>;
966 class NOR_V_ENC : MSA_VEC_FMT<0b00010, 0b011110>;
968 class NORI_B_ENC : MSA_I8_FMT<0b10, 0b000000>;
970 class OR_V_ENC : MSA_VEC_FMT<0b00001, 0b011110>;
972 class ORI_B_ENC : MSA_I8_FMT<0b01, 0b000000>;
974 class PCKEV_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010100>;
975 class PCKEV_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010100>;
976 class PCKEV_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010100>;
977 class PCKEV_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010100>;
979 class PCKOD_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b010100>;
980 class PCKOD_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010100>;
981 class PCKOD_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010100>;
982 class PCKOD_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010100>;
984 class PCNT_B_ENC : MSA_2R_FMT<0b11000001, 0b00, 0b011110>;
985 class PCNT_H_ENC : MSA_2R_FMT<0b11000001, 0b01, 0b011110>;
986 class PCNT_W_ENC : MSA_2R_FMT<0b11000001, 0b10, 0b011110>;
987 class PCNT_D_ENC : MSA_2R_FMT<0b11000001, 0b11, 0b011110>;
989 class SAT_S_B_ENC : MSA_BIT_B_FMT<0b000, 0b001010>;
990 class SAT_S_H_ENC : MSA_BIT_H_FMT<0b000, 0b001010>;
991 class SAT_S_W_ENC : MSA_BIT_W_FMT<0b000, 0b001010>;
992 class SAT_S_D_ENC : MSA_BIT_D_FMT<0b000, 0b001010>;
994 class SAT_U_B_ENC : MSA_BIT_B_FMT<0b001, 0b001010>;
995 class SAT_U_H_ENC : MSA_BIT_H_FMT<0b001, 0b001010>;
996 class SAT_U_W_ENC : MSA_BIT_W_FMT<0b001, 0b001010>;
997 class SAT_U_D_ENC : MSA_BIT_D_FMT<0b001, 0b001010>;
999 class SHF_B_ENC : MSA_I8_FMT<0b00, 0b000010>;
1000 class SHF_H_ENC : MSA_I8_FMT<0b01, 0b000010>;
1001 class SHF_W_ENC : MSA_I8_FMT<0b10, 0b000010>;
1003 class SLD_B_ENC : MSA_3R_INDEX_FMT<0b000, 0b00, 0b010100>;
1004 class SLD_H_ENC : MSA_3R_INDEX_FMT<0b000, 0b01, 0b010100>;
1005 class SLD_W_ENC : MSA_3R_INDEX_FMT<0b000, 0b10, 0b010100>;
1006 class SLD_D_ENC : MSA_3R_INDEX_FMT<0b000, 0b11, 0b010100>;
1008 class SLDI_B_ENC : MSA_ELM_B_FMT<0b0000, 0b011001>;
1009 class SLDI_H_ENC : MSA_ELM_H_FMT<0b0000, 0b011001>;
1010 class SLDI_W_ENC : MSA_ELM_W_FMT<0b0000, 0b011001>;
1011 class SLDI_D_ENC : MSA_ELM_D_FMT<0b0000, 0b011001>;
1013 class SLL_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b001101>;
1014 class SLL_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b001101>;
1015 class SLL_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b001101>;
1016 class SLL_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b001101>;
1018 class SLLI_B_ENC : MSA_BIT_B_FMT<0b000, 0b001001>;
1019 class SLLI_H_ENC : MSA_BIT_H_FMT<0b000, 0b001001>;
1020 class SLLI_W_ENC : MSA_BIT_W_FMT<0b000, 0b001001>;
1021 class SLLI_D_ENC : MSA_BIT_D_FMT<0b000, 0b001001>;
1023 class SPLAT_B_ENC : MSA_3R_INDEX_FMT<0b001, 0b00, 0b010100>;
1024 class SPLAT_H_ENC : MSA_3R_INDEX_FMT<0b001, 0b01, 0b010100>;
1025 class SPLAT_W_ENC : MSA_3R_INDEX_FMT<0b001, 0b10, 0b010100>;
1026 class SPLAT_D_ENC : MSA_3R_INDEX_FMT<0b001, 0b11, 0b010100>;
1028 class SPLATI_B_ENC : MSA_ELM_B_FMT<0b0001, 0b011001>;
1029 class SPLATI_H_ENC : MSA_ELM_H_FMT<0b0001, 0b011001>;
1030 class SPLATI_W_ENC : MSA_ELM_W_FMT<0b0001, 0b011001>;
1031 class SPLATI_D_ENC : MSA_ELM_D_FMT<0b0001, 0b011001>;
1033 class SRA_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b001101>;
1034 class SRA_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b001101>;
1035 class SRA_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b001101>;
1036 class SRA_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b001101>;
1038 class SRAI_B_ENC : MSA_BIT_B_FMT<0b001, 0b001001>;
1039 class SRAI_H_ENC : MSA_BIT_H_FMT<0b001, 0b001001>;
1040 class SRAI_W_ENC : MSA_BIT_W_FMT<0b001, 0b001001>;
1041 class SRAI_D_ENC : MSA_BIT_D_FMT<0b001, 0b001001>;
1043 class SRAR_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010101>;
1044 class SRAR_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010101>;
1045 class SRAR_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010101>;
1046 class SRAR_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010101>;
1048 class SRARI_B_ENC : MSA_BIT_B_FMT<0b010, 0b001010>;
1049 class SRARI_H_ENC : MSA_BIT_H_FMT<0b010, 0b001010>;
1050 class SRARI_W_ENC : MSA_BIT_W_FMT<0b010, 0b001010>;
1051 class SRARI_D_ENC : MSA_BIT_D_FMT<0b010, 0b001010>;
1053 class SRL_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b001101>;
1054 class SRL_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b001101>;
1055 class SRL_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b001101>;
1056 class SRL_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b001101>;
1058 class SRLI_B_ENC : MSA_BIT_B_FMT<0b010, 0b001001>;
1059 class SRLI_H_ENC : MSA_BIT_H_FMT<0b010, 0b001001>;
1060 class SRLI_W_ENC : MSA_BIT_W_FMT<0b010, 0b001001>;
1061 class SRLI_D_ENC : MSA_BIT_D_FMT<0b010, 0b001001>;
1063 class SRLR_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010101>;
1064 class SRLR_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010101>;
1065 class SRLR_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010101>;
1066 class SRLR_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010101>;
1068 class SRLRI_B_ENC : MSA_BIT_B_FMT<0b011, 0b001010>;
1069 class SRLRI_H_ENC : MSA_BIT_H_FMT<0b011, 0b001010>;
1070 class SRLRI_W_ENC : MSA_BIT_W_FMT<0b011, 0b001010>;
1071 class SRLRI_D_ENC : MSA_BIT_D_FMT<0b011, 0b001010>;
1073 class ST_B_ENC : MSA_MI10_FMT<0b00, 0b1001>;
1074 class ST_H_ENC : MSA_MI10_FMT<0b01, 0b1001>;
1075 class ST_W_ENC : MSA_MI10_FMT<0b10, 0b1001>;
1076 class ST_D_ENC : MSA_MI10_FMT<0b11, 0b1001>;
1078 class SUBS_S_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010001>;
1079 class SUBS_S_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010001>;
1080 class SUBS_S_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010001>;
1081 class SUBS_S_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010001>;
1083 class SUBS_U_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b010001>;
1084 class SUBS_U_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b010001>;
1085 class SUBS_U_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b010001>;
1086 class SUBS_U_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b010001>;
1088 class SUBSUS_U_B_ENC : MSA_3R_FMT<0b010, 0b00, 0b010001>;
1089 class SUBSUS_U_H_ENC : MSA_3R_FMT<0b010, 0b01, 0b010001>;
1090 class SUBSUS_U_W_ENC : MSA_3R_FMT<0b010, 0b10, 0b010001>;
1091 class SUBSUS_U_D_ENC : MSA_3R_FMT<0b010, 0b11, 0b010001>;
1093 class SUBSUU_S_B_ENC : MSA_3R_FMT<0b011, 0b00, 0b010001>;
1094 class SUBSUU_S_H_ENC : MSA_3R_FMT<0b011, 0b01, 0b010001>;
1095 class SUBSUU_S_W_ENC : MSA_3R_FMT<0b011, 0b10, 0b010001>;
1096 class SUBSUU_S_D_ENC : MSA_3R_FMT<0b011, 0b11, 0b010001>;
1098 class SUBV_B_ENC : MSA_3R_FMT<0b001, 0b00, 0b001110>;
1099 class SUBV_H_ENC : MSA_3R_FMT<0b001, 0b01, 0b001110>;
1100 class SUBV_W_ENC : MSA_3R_FMT<0b001, 0b10, 0b001110>;
1101 class SUBV_D_ENC : MSA_3R_FMT<0b001, 0b11, 0b001110>;
1103 class SUBVI_B_ENC : MSA_I5_FMT<0b001, 0b00, 0b000110>;
1104 class SUBVI_H_ENC : MSA_I5_FMT<0b001, 0b01, 0b000110>;
1105 class SUBVI_W_ENC : MSA_I5_FMT<0b001, 0b10, 0b000110>;
1106 class SUBVI_D_ENC : MSA_I5_FMT<0b001, 0b11, 0b000110>;
1108 class VSHF_B_ENC : MSA_3R_FMT<0b000, 0b00, 0b010101>;
1109 class VSHF_H_ENC : MSA_3R_FMT<0b000, 0b01, 0b010101>;
1110 class VSHF_W_ENC : MSA_3R_FMT<0b000, 0b10, 0b010101>;
1111 class VSHF_D_ENC : MSA_3R_FMT<0b000, 0b11, 0b010101>;
1113 class XOR_V_ENC : MSA_VEC_FMT<0b00011, 0b011110>;
1115 class XORI_B_ENC : MSA_I8_FMT<0b11, 0b000000>;
1117 // Instruction desc.
1118 class MSA_BIT_B_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1119 ComplexPattern Imm, RegisterOperand ROWD,
1120 RegisterOperand ROWS = ROWD,
1121 InstrItinClass itin = NoItinerary> {
1122 dag OutOperandList = (outs ROWD:$wd);
1123 dag InOperandList = (ins ROWS:$ws, vsplat_uimm3:$m);
1124 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1125 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, Imm:$m))];
1126 InstrItinClass Itinerary = itin;
1129 class MSA_BIT_H_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1130 ComplexPattern Imm, RegisterOperand ROWD,
1131 RegisterOperand ROWS = ROWD,
1132 InstrItinClass itin = NoItinerary> {
1133 dag OutOperandList = (outs ROWD:$wd);
1134 dag InOperandList = (ins ROWS:$ws, vsplat_uimm4:$m);
1135 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1136 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, Imm:$m))];
1137 InstrItinClass Itinerary = itin;
1140 class MSA_BIT_W_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1141 ComplexPattern Imm, RegisterOperand ROWD,
1142 RegisterOperand ROWS = ROWD,
1143 InstrItinClass itin = NoItinerary> {
1144 dag OutOperandList = (outs ROWD:$wd);
1145 dag InOperandList = (ins ROWS:$ws, vsplat_uimm5:$m);
1146 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1147 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, Imm:$m))];
1148 InstrItinClass Itinerary = itin;
1151 class MSA_BIT_D_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1152 ComplexPattern Imm, RegisterOperand ROWD,
1153 RegisterOperand ROWS = ROWD,
1154 InstrItinClass itin = NoItinerary> {
1155 dag OutOperandList = (outs ROWD:$wd);
1156 dag InOperandList = (ins ROWS:$ws, vsplat_uimm6:$m);
1157 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1158 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, Imm:$m))];
1159 InstrItinClass Itinerary = itin;
1162 class MSA_BIT_X_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1163 Operand ImmOp, ImmLeaf Imm, RegisterOperand ROWD,
1164 RegisterOperand ROWS = ROWD,
1165 InstrItinClass itin = NoItinerary> {
1166 dag OutOperandList = (outs ROWD:$wd);
1167 dag InOperandList = (ins ROWS:$ws, ImmOp:$m);
1168 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1169 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, Imm:$m))];
1170 InstrItinClass Itinerary = itin;
1173 class MSA_BIT_BINSXI_DESC_BASE<string instr_asm, ValueType Ty,
1174 SplatComplexPattern Mask, RegisterOperand ROWD,
1175 RegisterOperand ROWS = ROWD,
1176 InstrItinClass itin = NoItinerary> {
1177 dag OutOperandList = (outs ROWD:$wd);
1178 dag InOperandList = (ins ROWD:$wd_in, ROWS:$ws, Mask.OpClass:$m);
1179 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1180 // Note that binsxi and vselect treat the condition operand the opposite
1181 // way to each other.
1182 // (vselect cond, if_set, if_clear)
1183 // (BSEL_V cond, if_clear, if_set)
1184 list<dag> Pattern = [(set ROWD:$wd, (vselect (Ty Mask:$m), (Ty ROWD:$ws),
1186 InstrItinClass Itinerary = itin;
1187 string Constraints = "$wd = $wd_in";
1190 class MSA_BIT_BINSLI_DESC_BASE<string instr_asm, ValueType Ty,
1191 SplatComplexPattern ImmOp, RegisterOperand ROWD,
1192 RegisterOperand ROWS = ROWD,
1193 InstrItinClass itin = NoItinerary> :
1194 MSA_BIT_BINSXI_DESC_BASE<instr_asm, Ty, ImmOp, ROWD, ROWS, itin>;
1196 class MSA_BIT_BINSRI_DESC_BASE<string instr_asm, ValueType Ty,
1197 SplatComplexPattern ImmOp, RegisterOperand ROWD,
1198 RegisterOperand ROWS = ROWD,
1199 InstrItinClass itin = NoItinerary> :
1200 MSA_BIT_BINSXI_DESC_BASE<instr_asm, Ty, ImmOp, ROWD, ROWS, itin>;
1202 class MSA_BIT_SPLAT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1203 SplatComplexPattern SplatImm,
1204 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1205 InstrItinClass itin = NoItinerary> {
1206 dag OutOperandList = (outs ROWD:$wd);
1207 dag InOperandList = (ins ROWS:$ws, SplatImm.OpClass:$m);
1208 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $m");
1209 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, SplatImm:$m))];
1210 InstrItinClass Itinerary = itin;
1213 class MSA_COPY_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1214 ValueType VecTy, Operand ImmOp, ImmLeaf Imm,
1215 RegisterOperand ROD, RegisterOperand ROWS,
1216 InstrItinClass itin = NoItinerary> {
1217 dag OutOperandList = (outs ROD:$rd);
1218 dag InOperandList = (ins ROWS:$ws, ImmOp:$n);
1219 string AsmString = !strconcat(instr_asm, "\t$rd, $ws[$n]");
1220 list<dag> Pattern = [(set ROD:$rd, (OpNode (VecTy ROWS:$ws), Imm:$n))];
1221 InstrItinClass Itinerary = itin;
1224 class MSA_ELM_SLD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1225 RegisterOperand ROWD, RegisterOperand ROWS,
1226 Operand ImmOp, ImmLeaf Imm,
1227 InstrItinClass itin = NoItinerary> {
1228 dag OutOperandList = (outs ROWD:$wd);
1229 dag InOperandList = (ins ROWD:$wd_in, ROWS:$ws, ImmOp:$n);
1230 string AsmString = !strconcat(instr_asm, "\t$wd, $ws[$n]");
1231 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWD:$wd_in, ROWS:$ws,
1233 string Constraints = "$wd = $wd_in";
1234 InstrItinClass Itinerary = itin;
1237 class MSA_COPY_PSEUDO_BASE<SDPatternOperator OpNode, ValueType VecTy,
1238 Operand ImmOp, ImmLeaf Imm, RegisterClass RCD,
1239 RegisterClass RCWS> :
1240 MSAPseudo<(outs RCD:$wd), (ins RCWS:$ws, ImmOp:$n),
1241 [(set RCD:$wd, (OpNode (VecTy RCWS:$ws), Imm:$n))]> {
1242 bit usesCustomInserter = 1;
1243 bit hasNoSchedulingInfo = 1;
1246 class MSA_I5_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1247 SplatComplexPattern SplatImm, RegisterOperand ROWD,
1248 RegisterOperand ROWS = ROWD,
1249 InstrItinClass itin = NoItinerary> {
1250 dag OutOperandList = (outs ROWD:$wd);
1251 dag InOperandList = (ins ROWS:$ws, SplatImm.OpClass:$imm);
1252 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $imm");
1253 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, SplatImm:$imm))];
1254 InstrItinClass Itinerary = itin;
1257 class MSA_I8_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1258 SplatComplexPattern SplatImm, RegisterOperand ROWD,
1259 RegisterOperand ROWS = ROWD,
1260 InstrItinClass itin = NoItinerary> {
1261 dag OutOperandList = (outs ROWD:$wd);
1262 dag InOperandList = (ins ROWS:$ws, SplatImm.OpClass:$u8);
1263 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u8");
1264 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, SplatImm:$u8))];
1265 InstrItinClass Itinerary = itin;
1268 class MSA_I8_SHF_DESC_BASE<string instr_asm, RegisterOperand ROWD,
1269 RegisterOperand ROWS = ROWD,
1270 InstrItinClass itin = NoItinerary> {
1271 dag OutOperandList = (outs ROWD:$wd);
1272 dag InOperandList = (ins ROWS:$ws, uimm8:$u8);
1273 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $u8");
1274 list<dag> Pattern = [(set ROWD:$wd, (MipsSHF timmZExt8:$u8, ROWS:$ws))];
1275 InstrItinClass Itinerary = itin;
1278 class MSA_I10_LDI_DESC_BASE<string instr_asm, RegisterOperand ROWD,
1279 InstrItinClass itin = NoItinerary> {
1280 dag OutOperandList = (outs ROWD:$wd);
1281 dag InOperandList = (ins vsplat_simm10:$s10);
1282 string AsmString = !strconcat(instr_asm, "\t$wd, $s10");
1283 // LDI is matched using custom matching code in MipsSEISelDAGToDAG.cpp
1284 list<dag> Pattern = [];
1285 bit hasSideEffects = 0;
1286 bit isReMaterializable = 1;
1287 InstrItinClass Itinerary = itin;
1290 class MSA_2R_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1291 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1292 InstrItinClass itin = NoItinerary> {
1293 dag OutOperandList = (outs ROWD:$wd);
1294 dag InOperandList = (ins ROWS:$ws);
1295 string AsmString = !strconcat(instr_asm, "\t$wd, $ws");
1296 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws))];
1297 InstrItinClass Itinerary = itin;
1300 class MSA_2R_FILL_DESC_BASE<string instr_asm, ValueType VT,
1301 SDPatternOperator OpNode, RegisterOperand ROWD,
1302 RegisterOperand ROS = ROWD,
1303 InstrItinClass itin = NoItinerary> {
1304 dag OutOperandList = (outs ROWD:$wd);
1305 dag InOperandList = (ins ROS:$rs);
1306 string AsmString = !strconcat(instr_asm, "\t$wd, $rs");
1307 list<dag> Pattern = [(set ROWD:$wd, (VT (OpNode ROS:$rs)))];
1308 InstrItinClass Itinerary = itin;
1311 class MSA_2R_FILL_PSEUDO_BASE<ValueType VT, SDPatternOperator OpNode,
1312 RegisterClass RCWD, RegisterClass RCWS = RCWD> :
1313 MSAPseudo<(outs RCWD:$wd), (ins RCWS:$fs),
1314 [(set RCWD:$wd, (OpNode RCWS:$fs))]> {
1315 let usesCustomInserter = 1;
1318 class MSA_2RF_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1319 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1320 InstrItinClass itin = NoItinerary> {
1321 dag OutOperandList = (outs ROWD:$wd);
1322 dag InOperandList = (ins ROWS:$ws);
1323 string AsmString = !strconcat(instr_asm, "\t$wd, $ws");
1324 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws))];
1325 InstrItinClass Itinerary = itin;
1328 class MSA_3R_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1329 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1330 RegisterOperand ROWT = ROWD,
1331 InstrItinClass itin = NoItinerary> {
1332 dag OutOperandList = (outs ROWD:$wd);
1333 dag InOperandList = (ins ROWS:$ws, ROWT:$wt);
1334 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
1335 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, ROWT:$wt))];
1336 InstrItinClass Itinerary = itin;
1339 class MSA_3R_BINSX_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1340 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1341 RegisterOperand ROWT = ROWD,
1342 InstrItinClass itin = NoItinerary> {
1343 dag OutOperandList = (outs ROWD:$wd);
1344 dag InOperandList = (ins ROWD:$wd_in, ROWS:$ws, ROWT:$wt);
1345 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
1346 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWD:$wd_in, ROWS:$ws,
1348 string Constraints = "$wd = $wd_in";
1349 InstrItinClass Itinerary = itin;
1352 class MSA_3R_SPLAT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1353 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1354 InstrItinClass itin = NoItinerary> {
1355 dag OutOperandList = (outs ROWD:$wd);
1356 dag InOperandList = (ins ROWS:$ws, GPR32Opnd:$rt);
1357 string AsmString = !strconcat(instr_asm, "\t$wd, $ws[$rt]");
1358 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, GPR32Opnd:$rt))];
1359 InstrItinClass Itinerary = itin;
1362 class MSA_3R_VSHF_DESC_BASE<string instr_asm, RegisterOperand ROWD,
1363 RegisterOperand ROWS = ROWD,
1364 RegisterOperand ROWT = ROWD,
1365 InstrItinClass itin = NoItinerary> {
1366 dag OutOperandList = (outs ROWD:$wd);
1367 dag InOperandList = (ins ROWD:$wd_in, ROWS:$ws, ROWT:$wt);
1368 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
1369 list<dag> Pattern = [(set ROWD:$wd, (MipsVSHF ROWD:$wd_in, ROWS:$ws,
1371 string Constraints = "$wd = $wd_in";
1372 InstrItinClass Itinerary = itin;
1375 class MSA_3R_SLD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1376 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1377 InstrItinClass itin = NoItinerary> {
1378 dag OutOperandList = (outs ROWD:$wd);
1379 dag InOperandList = (ins ROWD:$wd_in, ROWS:$ws, GPR32Opnd:$rt);
1380 string AsmString = !strconcat(instr_asm, "\t$wd, $ws[$rt]");
1381 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWD:$wd_in, ROWS:$ws,
1383 InstrItinClass Itinerary = itin;
1384 string Constraints = "$wd = $wd_in";
1387 class MSA_3R_4R_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1388 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1389 RegisterOperand ROWT = ROWD,
1390 InstrItinClass itin = NoItinerary> {
1391 dag OutOperandList = (outs ROWD:$wd);
1392 dag InOperandList = (ins ROWD:$wd_in, ROWS:$ws, ROWT:$wt);
1393 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
1394 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWD:$wd_in, ROWS:$ws,
1396 InstrItinClass Itinerary = itin;
1397 string Constraints = "$wd = $wd_in";
1400 class MSA_3RF_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1401 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1402 RegisterOperand ROWT = ROWD,
1403 InstrItinClass itin = NoItinerary> :
1404 MSA_3R_DESC_BASE<instr_asm, OpNode, ROWD, ROWS, ROWT, itin>;
1406 class MSA_3RF_4RF_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1407 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1408 RegisterOperand ROWT = ROWD,
1409 InstrItinClass itin = NoItinerary> :
1410 MSA_3R_4R_DESC_BASE<instr_asm, OpNode, ROWD, ROWS, ROWT, itin>;
1412 class MSA_CBRANCH_DESC_BASE<string instr_asm, RegisterOperand ROWD> {
1413 dag OutOperandList = (outs);
1414 dag InOperandList = (ins ROWD:$wt, brtarget:$offset);
1415 string AsmString = !strconcat(instr_asm, "\t$wt, $offset");
1416 list<dag> Pattern = [];
1417 InstrItinClass Itinerary = NoItinerary;
1419 bit isTerminator = 1;
1420 bit hasDelaySlot = 1;
1421 list<Register> Defs = [AT];
1424 class MSA_INSERT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1425 Operand ImmOp, ImmLeaf Imm, RegisterOperand ROWD,
1426 RegisterOperand ROS,
1427 InstrItinClass itin = NoItinerary> {
1428 dag OutOperandList = (outs ROWD:$wd);
1429 dag InOperandList = (ins ROWD:$wd_in, ROS:$rs, ImmOp:$n);
1430 string AsmString = !strconcat(instr_asm, "\t$wd[$n], $rs");
1431 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWD:$wd_in, ROS:$rs, Imm:$n))];
1432 InstrItinClass Itinerary = itin;
1433 string Constraints = "$wd = $wd_in";
1436 class MSA_INSERT_PSEUDO_BASE<SDPatternOperator OpNode, ValueType Ty,
1437 Operand ImmOp, ImmLeaf Imm, RegisterOperand ROWD,
1438 RegisterOperand ROFS> :
1439 MSAPseudo<(outs ROWD:$wd), (ins ROWD:$wd_in, ImmOp:$n, ROFS:$fs),
1440 [(set ROWD:$wd, (OpNode (Ty ROWD:$wd_in), ROFS:$fs, Imm:$n))]> {
1441 bit usesCustomInserter = 1;
1442 string Constraints = "$wd = $wd_in";
1445 class MSA_INSERT_VIDX_PSEUDO_BASE<SDPatternOperator OpNode, ValueType Ty,
1446 RegisterOperand ROWD, RegisterOperand ROFS,
1447 RegisterOperand ROIdx> :
1448 MSAPseudo<(outs ROWD:$wd), (ins ROWD:$wd_in, ROIdx:$n, ROFS:$fs),
1449 [(set ROWD:$wd, (OpNode (Ty ROWD:$wd_in), ROFS:$fs,
1451 bit usesCustomInserter = 1;
1452 bit hasNoSchedulingInfo = 1;
1453 string Constraints = "$wd = $wd_in";
1456 class MSA_INSVE_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1457 Operand ImmOp, ImmLeaf Imm, RegisterOperand ROWD,
1458 RegisterOperand ROWS = ROWD,
1459 InstrItinClass itin = NoItinerary> {
1460 dag OutOperandList = (outs ROWD:$wd);
1461 dag InOperandList = (ins ROWD:$wd_in, ImmOp:$n, ROWS:$ws, uimmz:$n2);
1462 string AsmString = !strconcat(instr_asm, "\t$wd[$n], $ws[$n2]");
1463 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWD:$wd_in,
1467 InstrItinClass Itinerary = itin;
1468 string Constraints = "$wd = $wd_in";
1471 class MSA_VEC_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
1472 RegisterOperand ROWD, RegisterOperand ROWS = ROWD,
1473 RegisterOperand ROWT = ROWD,
1474 InstrItinClass itin = NoItinerary> {
1475 dag OutOperandList = (outs ROWD:$wd);
1476 dag InOperandList = (ins ROWS:$ws, ROWT:$wt);
1477 string AsmString = !strconcat(instr_asm, "\t$wd, $ws, $wt");
1478 list<dag> Pattern = [(set ROWD:$wd, (OpNode ROWS:$ws, ROWT:$wt))];
1479 InstrItinClass Itinerary = itin;
1482 class MSA_ELM_SPLAT_DESC_BASE<string instr_asm, SplatComplexPattern SplatImm,
1483 RegisterOperand ROWD,
1484 RegisterOperand ROWS = ROWD,
1485 InstrItinClass itin = NoItinerary> {
1486 dag OutOperandList = (outs ROWD:$wd);
1487 dag InOperandList = (ins ROWS:$ws, SplatImm.OpClass:$n);
1488 string AsmString = !strconcat(instr_asm, "\t$wd, $ws[$n]");
1489 list<dag> Pattern = [(set ROWD:$wd, (MipsVSHF SplatImm:$n, ROWS:$ws,
1491 InstrItinClass Itinerary = itin;
1494 class MSA_VEC_PSEUDO_BASE<SDPatternOperator OpNode, RegisterOperand ROWD,
1495 RegisterOperand ROWS = ROWD,
1496 RegisterOperand ROWT = ROWD> :
1497 MSAPseudo<(outs ROWD:$wd), (ins ROWS:$ws, ROWT:$wt),
1498 [(set ROWD:$wd, (OpNode ROWS:$ws, ROWT:$wt))]>;
1500 class ADD_A_B_DESC : MSA_3R_DESC_BASE<"add_a.b", int_mips_add_a_b, MSA128BOpnd>,
1502 class ADD_A_H_DESC : MSA_3R_DESC_BASE<"add_a.h", int_mips_add_a_h, MSA128HOpnd>,
1504 class ADD_A_W_DESC : MSA_3R_DESC_BASE<"add_a.w", int_mips_add_a_w, MSA128WOpnd>,
1506 class ADD_A_D_DESC : MSA_3R_DESC_BASE<"add_a.d", int_mips_add_a_d, MSA128DOpnd>,
1509 class ADDS_A_B_DESC : MSA_3R_DESC_BASE<"adds_a.b", int_mips_adds_a_b,
1510 MSA128BOpnd>, IsCommutable;
1511 class ADDS_A_H_DESC : MSA_3R_DESC_BASE<"adds_a.h", int_mips_adds_a_h,
1512 MSA128HOpnd>, IsCommutable;
1513 class ADDS_A_W_DESC : MSA_3R_DESC_BASE<"adds_a.w", int_mips_adds_a_w,
1514 MSA128WOpnd>, IsCommutable;
1515 class ADDS_A_D_DESC : MSA_3R_DESC_BASE<"adds_a.d", int_mips_adds_a_d,
1516 MSA128DOpnd>, IsCommutable;
1518 class ADDS_S_B_DESC : MSA_3R_DESC_BASE<"adds_s.b", int_mips_adds_s_b,
1519 MSA128BOpnd>, IsCommutable;
1520 class ADDS_S_H_DESC : MSA_3R_DESC_BASE<"adds_s.h", int_mips_adds_s_h,
1521 MSA128HOpnd>, IsCommutable;
1522 class ADDS_S_W_DESC : MSA_3R_DESC_BASE<"adds_s.w", int_mips_adds_s_w,
1523 MSA128WOpnd>, IsCommutable;
1524 class ADDS_S_D_DESC : MSA_3R_DESC_BASE<"adds_s.d", int_mips_adds_s_d,
1525 MSA128DOpnd>, IsCommutable;
1527 class ADDS_U_B_DESC : MSA_3R_DESC_BASE<"adds_u.b", int_mips_adds_u_b,
1528 MSA128BOpnd>, IsCommutable;
1529 class ADDS_U_H_DESC : MSA_3R_DESC_BASE<"adds_u.h", int_mips_adds_u_h,
1530 MSA128HOpnd>, IsCommutable;
1531 class ADDS_U_W_DESC : MSA_3R_DESC_BASE<"adds_u.w", int_mips_adds_u_w,
1532 MSA128WOpnd>, IsCommutable;
1533 class ADDS_U_D_DESC : MSA_3R_DESC_BASE<"adds_u.d", int_mips_adds_u_d,
1534 MSA128DOpnd>, IsCommutable;
1536 class ADDV_B_DESC : MSA_3R_DESC_BASE<"addv.b", add, MSA128BOpnd>, IsCommutable;
1537 class ADDV_H_DESC : MSA_3R_DESC_BASE<"addv.h", add, MSA128HOpnd>, IsCommutable;
1538 class ADDV_W_DESC : MSA_3R_DESC_BASE<"addv.w", add, MSA128WOpnd>, IsCommutable;
1539 class ADDV_D_DESC : MSA_3R_DESC_BASE<"addv.d", add, MSA128DOpnd>, IsCommutable;
1541 class ADDVI_B_DESC : MSA_I5_DESC_BASE<"addvi.b", add, vsplati8_uimm5,
1543 class ADDVI_H_DESC : MSA_I5_DESC_BASE<"addvi.h", add, vsplati16_uimm5,
1545 class ADDVI_W_DESC : MSA_I5_DESC_BASE<"addvi.w", add, vsplati32_uimm5,
1547 class ADDVI_D_DESC : MSA_I5_DESC_BASE<"addvi.d", add, vsplati64_uimm5,
1550 class AND_V_DESC : MSA_VEC_DESC_BASE<"and.v", and, MSA128BOpnd>;
1551 class AND_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<and, MSA128HOpnd>;
1552 class AND_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<and, MSA128WOpnd>;
1553 class AND_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<and, MSA128DOpnd>;
1555 class ANDI_B_DESC : MSA_I8_DESC_BASE<"andi.b", and, vsplati8_uimm8,
1558 class ASUB_S_B_DESC : MSA_3R_DESC_BASE<"asub_s.b", int_mips_asub_s_b,
1560 class ASUB_S_H_DESC : MSA_3R_DESC_BASE<"asub_s.h", int_mips_asub_s_h,
1562 class ASUB_S_W_DESC : MSA_3R_DESC_BASE<"asub_s.w", int_mips_asub_s_w,
1564 class ASUB_S_D_DESC : MSA_3R_DESC_BASE<"asub_s.d", int_mips_asub_s_d,
1567 class ASUB_U_B_DESC : MSA_3R_DESC_BASE<"asub_u.b", int_mips_asub_u_b,
1569 class ASUB_U_H_DESC : MSA_3R_DESC_BASE<"asub_u.h", int_mips_asub_u_h,
1571 class ASUB_U_W_DESC : MSA_3R_DESC_BASE<"asub_u.w", int_mips_asub_u_w,
1573 class ASUB_U_D_DESC : MSA_3R_DESC_BASE<"asub_u.d", int_mips_asub_u_d,
1576 class AVE_S_B_DESC : MSA_3R_DESC_BASE<"ave_s.b", int_mips_ave_s_b, MSA128BOpnd>,
1578 class AVE_S_H_DESC : MSA_3R_DESC_BASE<"ave_s.h", int_mips_ave_s_h, MSA128HOpnd>,
1580 class AVE_S_W_DESC : MSA_3R_DESC_BASE<"ave_s.w", int_mips_ave_s_w, MSA128WOpnd>,
1582 class AVE_S_D_DESC : MSA_3R_DESC_BASE<"ave_s.d", int_mips_ave_s_d, MSA128DOpnd>,
1585 class AVE_U_B_DESC : MSA_3R_DESC_BASE<"ave_u.b", int_mips_ave_u_b, MSA128BOpnd>,
1587 class AVE_U_H_DESC : MSA_3R_DESC_BASE<"ave_u.h", int_mips_ave_u_h, MSA128HOpnd>,
1589 class AVE_U_W_DESC : MSA_3R_DESC_BASE<"ave_u.w", int_mips_ave_u_w, MSA128WOpnd>,
1591 class AVE_U_D_DESC : MSA_3R_DESC_BASE<"ave_u.d", int_mips_ave_u_d, MSA128DOpnd>,
1594 class AVER_S_B_DESC : MSA_3R_DESC_BASE<"aver_s.b", int_mips_aver_s_b,
1595 MSA128BOpnd>, IsCommutable;
1596 class AVER_S_H_DESC : MSA_3R_DESC_BASE<"aver_s.h", int_mips_aver_s_h,
1597 MSA128HOpnd>, IsCommutable;
1598 class AVER_S_W_DESC : MSA_3R_DESC_BASE<"aver_s.w", int_mips_aver_s_w,
1599 MSA128WOpnd>, IsCommutable;
1600 class AVER_S_D_DESC : MSA_3R_DESC_BASE<"aver_s.d", int_mips_aver_s_d,
1601 MSA128DOpnd>, IsCommutable;
1603 class AVER_U_B_DESC : MSA_3R_DESC_BASE<"aver_u.b", int_mips_aver_u_b,
1604 MSA128BOpnd>, IsCommutable;
1605 class AVER_U_H_DESC : MSA_3R_DESC_BASE<"aver_u.h", int_mips_aver_u_h,
1606 MSA128HOpnd>, IsCommutable;
1607 class AVER_U_W_DESC : MSA_3R_DESC_BASE<"aver_u.w", int_mips_aver_u_w,
1608 MSA128WOpnd>, IsCommutable;
1609 class AVER_U_D_DESC : MSA_3R_DESC_BASE<"aver_u.d", int_mips_aver_u_d,
1610 MSA128DOpnd>, IsCommutable;
1612 class BCLR_B_DESC : MSA_3R_DESC_BASE<"bclr.b", vbclr_b, MSA128BOpnd>;
1613 class BCLR_H_DESC : MSA_3R_DESC_BASE<"bclr.h", vbclr_h, MSA128HOpnd>;
1614 class BCLR_W_DESC : MSA_3R_DESC_BASE<"bclr.w", vbclr_w, MSA128WOpnd>;
1615 class BCLR_D_DESC : MSA_3R_DESC_BASE<"bclr.d", vbclr_d, MSA128DOpnd>;
1617 class BCLRI_B_DESC : MSA_BIT_B_DESC_BASE<"bclri.b", and, vsplat_uimm_inv_pow2,
1619 class BCLRI_H_DESC : MSA_BIT_H_DESC_BASE<"bclri.h", and, vsplat_uimm_inv_pow2,
1621 class BCLRI_W_DESC : MSA_BIT_W_DESC_BASE<"bclri.w", and, vsplat_uimm_inv_pow2,
1623 class BCLRI_D_DESC : MSA_BIT_D_DESC_BASE<"bclri.d", and, vsplat_uimm_inv_pow2,
1626 class BINSL_B_DESC : MSA_3R_BINSX_DESC_BASE<"binsl.b", int_mips_binsl_b,
1628 class BINSL_H_DESC : MSA_3R_BINSX_DESC_BASE<"binsl.h", int_mips_binsl_h,
1630 class BINSL_W_DESC : MSA_3R_BINSX_DESC_BASE<"binsl.w", int_mips_binsl_w,
1632 class BINSL_D_DESC : MSA_3R_BINSX_DESC_BASE<"binsl.d", int_mips_binsl_d,
1635 class BINSLI_B_DESC : MSA_BIT_BINSLI_DESC_BASE<"binsli.b", v16i8, vsplat_maskl_bits_uimm3, MSA128BOpnd>;
1636 class BINSLI_H_DESC : MSA_BIT_BINSLI_DESC_BASE<"binsli.h", v8i16, vsplat_maskl_bits_uimm4, MSA128HOpnd>;
1637 class BINSLI_W_DESC : MSA_BIT_BINSLI_DESC_BASE<"binsli.w", v4i32, vsplat_maskl_bits_uimm5, MSA128WOpnd>;
1638 class BINSLI_D_DESC : MSA_BIT_BINSLI_DESC_BASE<"binsli.d", v2i64, vsplat_maskl_bits_uimm6, MSA128DOpnd>;
1640 class BINSR_B_DESC : MSA_3R_BINSX_DESC_BASE<"binsr.b", int_mips_binsr_b,
1642 class BINSR_H_DESC : MSA_3R_BINSX_DESC_BASE<"binsr.h", int_mips_binsr_h,
1644 class BINSR_W_DESC : MSA_3R_BINSX_DESC_BASE<"binsr.w", int_mips_binsr_w,
1646 class BINSR_D_DESC : MSA_3R_BINSX_DESC_BASE<"binsr.d", int_mips_binsr_d,
1650 : MSA_BIT_BINSRI_DESC_BASE<"binsri.b", v16i8, vsplat_maskr_bits_uimm3,
1653 : MSA_BIT_BINSRI_DESC_BASE<"binsri.h", v8i16, vsplat_maskr_bits_uimm4,
1656 : MSA_BIT_BINSRI_DESC_BASE<"binsri.w", v4i32, vsplat_maskr_bits_uimm5,
1659 : MSA_BIT_BINSRI_DESC_BASE<"binsri.d", v2i64, vsplat_maskr_bits_uimm6,
1663 dag OutOperandList = (outs MSA128BOpnd:$wd);
1664 dag InOperandList = (ins MSA128BOpnd:$wd_in, MSA128BOpnd:$ws,
1666 string AsmString = "bmnz.v\t$wd, $ws, $wt";
1667 list<dag> Pattern = [(set MSA128BOpnd:$wd, (vselect MSA128BOpnd:$wt,
1669 MSA128BOpnd:$wd_in))];
1670 InstrItinClass Itinerary = NoItinerary;
1671 string Constraints = "$wd = $wd_in";
1674 class BMNZI_B_DESC {
1675 dag OutOperandList = (outs MSA128BOpnd:$wd);
1676 dag InOperandList = (ins MSA128BOpnd:$wd_in, MSA128BOpnd:$ws,
1678 string AsmString = "bmnzi.b\t$wd, $ws, $u8";
1679 list<dag> Pattern = [(set MSA128BOpnd:$wd, (vselect vsplati8_uimm8:$u8,
1681 MSA128BOpnd:$wd_in))];
1682 InstrItinClass Itinerary = NoItinerary;
1683 string Constraints = "$wd = $wd_in";
1687 dag OutOperandList = (outs MSA128BOpnd:$wd);
1688 dag InOperandList = (ins MSA128BOpnd:$wd_in, MSA128BOpnd:$ws,
1690 string AsmString = "bmz.v\t$wd, $ws, $wt";
1691 list<dag> Pattern = [(set MSA128BOpnd:$wd, (vselect MSA128BOpnd:$wt,
1694 InstrItinClass Itinerary = NoItinerary;
1695 string Constraints = "$wd = $wd_in";
1699 dag OutOperandList = (outs MSA128BOpnd:$wd);
1700 dag InOperandList = (ins MSA128BOpnd:$wd_in, MSA128BOpnd:$ws,
1702 string AsmString = "bmzi.b\t$wd, $ws, $u8";
1703 list<dag> Pattern = [(set MSA128BOpnd:$wd, (vselect vsplati8_uimm8:$u8,
1706 InstrItinClass Itinerary = NoItinerary;
1707 string Constraints = "$wd = $wd_in";
1710 class BNEG_B_DESC : MSA_3R_DESC_BASE<"bneg.b", vbneg_b, MSA128BOpnd>;
1711 class BNEG_H_DESC : MSA_3R_DESC_BASE<"bneg.h", vbneg_h, MSA128HOpnd>;
1712 class BNEG_W_DESC : MSA_3R_DESC_BASE<"bneg.w", vbneg_w, MSA128WOpnd>;
1713 class BNEG_D_DESC : MSA_3R_DESC_BASE<"bneg.d", vbneg_d, MSA128DOpnd>;
1715 class BNEGI_B_DESC : MSA_BIT_B_DESC_BASE<"bnegi.b", xor, vsplat_uimm_pow2,
1717 class BNEGI_H_DESC : MSA_BIT_H_DESC_BASE<"bnegi.h", xor, vsplat_uimm_pow2,
1719 class BNEGI_W_DESC : MSA_BIT_W_DESC_BASE<"bnegi.w", xor, vsplat_uimm_pow2,
1721 class BNEGI_D_DESC : MSA_BIT_D_DESC_BASE<"bnegi.d", xor, vsplat_uimm_pow2,
1724 class BNZ_B_DESC : MSA_CBRANCH_DESC_BASE<"bnz.b", MSA128BOpnd>;
1725 class BNZ_H_DESC : MSA_CBRANCH_DESC_BASE<"bnz.h", MSA128HOpnd>;
1726 class BNZ_W_DESC : MSA_CBRANCH_DESC_BASE<"bnz.w", MSA128WOpnd>;
1727 class BNZ_D_DESC : MSA_CBRANCH_DESC_BASE<"bnz.d", MSA128DOpnd>;
1729 class BNZ_V_DESC : MSA_CBRANCH_DESC_BASE<"bnz.v", MSA128BOpnd>;
1732 dag OutOperandList = (outs MSA128BOpnd:$wd);
1733 dag InOperandList = (ins MSA128BOpnd:$wd_in, MSA128BOpnd:$ws,
1735 string AsmString = "bsel.v\t$wd, $ws, $wt";
1736 // Note that vselect and BSEL_V treat the condition operand the opposite way
1738 // (vselect cond, if_set, if_clear)
1739 // (BSEL_V cond, if_clear, if_set)
1740 list<dag> Pattern = [(set MSA128BOpnd:$wd,
1741 (vselect MSA128BOpnd:$wd_in, MSA128BOpnd:$wt,
1743 InstrItinClass Itinerary = NoItinerary;
1744 string Constraints = "$wd = $wd_in";
1747 class BSELI_B_DESC {
1748 dag OutOperandList = (outs MSA128BOpnd:$wd);
1749 dag InOperandList = (ins MSA128BOpnd:$wd_in, MSA128BOpnd:$ws,
1751 string AsmString = "bseli.b\t$wd, $ws, $u8";
1752 // Note that vselect and BSEL_V treat the condition operand the opposite way
1754 // (vselect cond, if_set, if_clear)
1755 // (BSEL_V cond, if_clear, if_set)
1756 list<dag> Pattern = [(set MSA128BOpnd:$wd, (vselect MSA128BOpnd:$wd_in,
1759 InstrItinClass Itinerary = NoItinerary;
1760 string Constraints = "$wd = $wd_in";
1763 class BSET_B_DESC : MSA_3R_DESC_BASE<"bset.b", vbset_b, MSA128BOpnd>;
1764 class BSET_H_DESC : MSA_3R_DESC_BASE<"bset.h", vbset_h, MSA128HOpnd>;
1765 class BSET_W_DESC : MSA_3R_DESC_BASE<"bset.w", vbset_w, MSA128WOpnd>;
1766 class BSET_D_DESC : MSA_3R_DESC_BASE<"bset.d", vbset_d, MSA128DOpnd>;
1768 class BSETI_B_DESC : MSA_BIT_B_DESC_BASE<"bseti.b", or, vsplat_uimm_pow2,
1770 class BSETI_H_DESC : MSA_BIT_H_DESC_BASE<"bseti.h", or, vsplat_uimm_pow2,
1772 class BSETI_W_DESC : MSA_BIT_W_DESC_BASE<"bseti.w", or, vsplat_uimm_pow2,
1774 class BSETI_D_DESC : MSA_BIT_D_DESC_BASE<"bseti.d", or, vsplat_uimm_pow2,
1777 class BZ_B_DESC : MSA_CBRANCH_DESC_BASE<"bz.b", MSA128BOpnd>;
1778 class BZ_H_DESC : MSA_CBRANCH_DESC_BASE<"bz.h", MSA128HOpnd>;
1779 class BZ_W_DESC : MSA_CBRANCH_DESC_BASE<"bz.w", MSA128WOpnd>;
1780 class BZ_D_DESC : MSA_CBRANCH_DESC_BASE<"bz.d", MSA128DOpnd>;
1782 class BZ_V_DESC : MSA_CBRANCH_DESC_BASE<"bz.v", MSA128BOpnd>;
1784 class CEQ_B_DESC : MSA_3R_DESC_BASE<"ceq.b", vseteq_v16i8, MSA128BOpnd>,
1786 class CEQ_H_DESC : MSA_3R_DESC_BASE<"ceq.h", vseteq_v8i16, MSA128HOpnd>,
1788 class CEQ_W_DESC : MSA_3R_DESC_BASE<"ceq.w", vseteq_v4i32, MSA128WOpnd>,
1790 class CEQ_D_DESC : MSA_3R_DESC_BASE<"ceq.d", vseteq_v2i64, MSA128DOpnd>,
1793 class CEQI_B_DESC : MSA_I5_DESC_BASE<"ceqi.b", vseteq_v16i8, vsplati8_simm5,
1795 class CEQI_H_DESC : MSA_I5_DESC_BASE<"ceqi.h", vseteq_v8i16, vsplati16_simm5,
1797 class CEQI_W_DESC : MSA_I5_DESC_BASE<"ceqi.w", vseteq_v4i32, vsplati32_simm5,
1799 class CEQI_D_DESC : MSA_I5_DESC_BASE<"ceqi.d", vseteq_v2i64, vsplati64_simm5,
1803 dag OutOperandList = (outs GPR32Opnd:$rd);
1804 dag InOperandList = (ins MSA128CROpnd:$cs);
1805 string AsmString = "cfcmsa\t$rd, $cs";
1806 InstrItinClass Itinerary = NoItinerary;
1807 bit hasSideEffects = 1;
1811 class CLE_S_B_DESC : MSA_3R_DESC_BASE<"cle_s.b", vsetle_v16i8, MSA128BOpnd>;
1812 class CLE_S_H_DESC : MSA_3R_DESC_BASE<"cle_s.h", vsetle_v8i16, MSA128HOpnd>;
1813 class CLE_S_W_DESC : MSA_3R_DESC_BASE<"cle_s.w", vsetle_v4i32, MSA128WOpnd>;
1814 class CLE_S_D_DESC : MSA_3R_DESC_BASE<"cle_s.d", vsetle_v2i64, MSA128DOpnd>;
1816 class CLE_U_B_DESC : MSA_3R_DESC_BASE<"cle_u.b", vsetule_v16i8, MSA128BOpnd>;
1817 class CLE_U_H_DESC : MSA_3R_DESC_BASE<"cle_u.h", vsetule_v8i16, MSA128HOpnd>;
1818 class CLE_U_W_DESC : MSA_3R_DESC_BASE<"cle_u.w", vsetule_v4i32, MSA128WOpnd>;
1819 class CLE_U_D_DESC : MSA_3R_DESC_BASE<"cle_u.d", vsetule_v2i64, MSA128DOpnd>;
1821 class CLEI_S_B_DESC : MSA_I5_DESC_BASE<"clei_s.b", vsetle_v16i8,
1822 vsplati8_simm5, MSA128BOpnd>;
1823 class CLEI_S_H_DESC : MSA_I5_DESC_BASE<"clei_s.h", vsetle_v8i16,
1824 vsplati16_simm5, MSA128HOpnd>;
1825 class CLEI_S_W_DESC : MSA_I5_DESC_BASE<"clei_s.w", vsetle_v4i32,
1826 vsplati32_simm5, MSA128WOpnd>;
1827 class CLEI_S_D_DESC : MSA_I5_DESC_BASE<"clei_s.d", vsetle_v2i64,
1828 vsplati64_simm5, MSA128DOpnd>;
1830 class CLEI_U_B_DESC : MSA_I5_DESC_BASE<"clei_u.b", vsetule_v16i8,
1831 vsplati8_uimm5, MSA128BOpnd>;
1832 class CLEI_U_H_DESC : MSA_I5_DESC_BASE<"clei_u.h", vsetule_v8i16,
1833 vsplati16_uimm5, MSA128HOpnd>;
1834 class CLEI_U_W_DESC : MSA_I5_DESC_BASE<"clei_u.w", vsetule_v4i32,
1835 vsplati32_uimm5, MSA128WOpnd>;
1836 class CLEI_U_D_DESC : MSA_I5_DESC_BASE<"clei_u.d", vsetule_v2i64,
1837 vsplati64_uimm5, MSA128DOpnd>;
1839 class CLT_S_B_DESC : MSA_3R_DESC_BASE<"clt_s.b", vsetlt_v16i8, MSA128BOpnd>;
1840 class CLT_S_H_DESC : MSA_3R_DESC_BASE<"clt_s.h", vsetlt_v8i16, MSA128HOpnd>;
1841 class CLT_S_W_DESC : MSA_3R_DESC_BASE<"clt_s.w", vsetlt_v4i32, MSA128WOpnd>;
1842 class CLT_S_D_DESC : MSA_3R_DESC_BASE<"clt_s.d", vsetlt_v2i64, MSA128DOpnd>;
1844 class CLT_U_B_DESC : MSA_3R_DESC_BASE<"clt_u.b", vsetult_v16i8, MSA128BOpnd>;
1845 class CLT_U_H_DESC : MSA_3R_DESC_BASE<"clt_u.h", vsetult_v8i16, MSA128HOpnd>;
1846 class CLT_U_W_DESC : MSA_3R_DESC_BASE<"clt_u.w", vsetult_v4i32, MSA128WOpnd>;
1847 class CLT_U_D_DESC : MSA_3R_DESC_BASE<"clt_u.d", vsetult_v2i64, MSA128DOpnd>;
1849 class CLTI_S_B_DESC : MSA_I5_DESC_BASE<"clti_s.b", vsetlt_v16i8,
1850 vsplati8_simm5, MSA128BOpnd>;
1851 class CLTI_S_H_DESC : MSA_I5_DESC_BASE<"clti_s.h", vsetlt_v8i16,
1852 vsplati16_simm5, MSA128HOpnd>;
1853 class CLTI_S_W_DESC : MSA_I5_DESC_BASE<"clti_s.w", vsetlt_v4i32,
1854 vsplati32_simm5, MSA128WOpnd>;
1855 class CLTI_S_D_DESC : MSA_I5_DESC_BASE<"clti_s.d", vsetlt_v2i64,
1856 vsplati64_simm5, MSA128DOpnd>;
1858 class CLTI_U_B_DESC : MSA_I5_DESC_BASE<"clti_u.b", vsetult_v16i8,
1859 vsplati8_uimm5, MSA128BOpnd>;
1860 class CLTI_U_H_DESC : MSA_I5_DESC_BASE<"clti_u.h", vsetult_v8i16,
1861 vsplati16_uimm5, MSA128HOpnd>;
1862 class CLTI_U_W_DESC : MSA_I5_DESC_BASE<"clti_u.w", vsetult_v4i32,
1863 vsplati32_uimm5, MSA128WOpnd>;
1864 class CLTI_U_D_DESC : MSA_I5_DESC_BASE<"clti_u.d", vsetult_v2i64,
1865 vsplati64_uimm5, MSA128DOpnd>;
1867 class COPY_S_B_DESC : MSA_COPY_DESC_BASE<"copy_s.b", vextract_sext_i8, v16i8,
1868 uimm4_ptr, immZExt4Ptr, GPR32Opnd,
1870 class COPY_S_H_DESC : MSA_COPY_DESC_BASE<"copy_s.h", vextract_sext_i16, v8i16,
1871 uimm3_ptr, immZExt3Ptr, GPR32Opnd,
1873 class COPY_S_W_DESC : MSA_COPY_DESC_BASE<"copy_s.w", vextract_sext_i32, v4i32,
1874 uimm2_ptr, immZExt2Ptr, GPR32Opnd,
1876 class COPY_S_D_DESC : MSA_COPY_DESC_BASE<"copy_s.d", vextract_sext_i64, v2i64,
1877 uimm1_ptr, immZExt1Ptr, GPR64Opnd,
1880 class COPY_U_B_DESC : MSA_COPY_DESC_BASE<"copy_u.b", vextract_zext_i8, v16i8,
1881 uimm4_ptr, immZExt4Ptr, GPR32Opnd,
1883 class COPY_U_H_DESC : MSA_COPY_DESC_BASE<"copy_u.h", vextract_zext_i16, v8i16,
1884 uimm3_ptr, immZExt3Ptr, GPR32Opnd,
1886 class COPY_U_W_DESC : MSA_COPY_DESC_BASE<"copy_u.w", vextract_zext_i32, v4i32,
1887 uimm2_ptr, immZExt2Ptr, GPR32Opnd,
1890 class COPY_FW_PSEUDO_DESC : MSA_COPY_PSEUDO_BASE<vector_extract, v4f32,
1891 uimm2_ptr, immZExt2Ptr, FGR32,
1893 class COPY_FD_PSEUDO_DESC : MSA_COPY_PSEUDO_BASE<vector_extract, v2f64,
1894 uimm1_ptr, immZExt1Ptr, FGR64,
1898 dag OutOperandList = (outs);
1899 dag InOperandList = (ins MSA128CROpnd:$cd, GPR32Opnd:$rs);
1900 string AsmString = "ctcmsa\t$cd, $rs";
1901 InstrItinClass Itinerary = NoItinerary;
1902 bit hasSideEffects = 1;
1906 class DIV_S_B_DESC : MSA_3R_DESC_BASE<"div_s.b", sdiv, MSA128BOpnd>;
1907 class DIV_S_H_DESC : MSA_3R_DESC_BASE<"div_s.h", sdiv, MSA128HOpnd>;
1908 class DIV_S_W_DESC : MSA_3R_DESC_BASE<"div_s.w", sdiv, MSA128WOpnd>;
1909 class DIV_S_D_DESC : MSA_3R_DESC_BASE<"div_s.d", sdiv, MSA128DOpnd>;
1911 class DIV_U_B_DESC : MSA_3R_DESC_BASE<"div_u.b", udiv, MSA128BOpnd>;
1912 class DIV_U_H_DESC : MSA_3R_DESC_BASE<"div_u.h", udiv, MSA128HOpnd>;
1913 class DIV_U_W_DESC : MSA_3R_DESC_BASE<"div_u.w", udiv, MSA128WOpnd>;
1914 class DIV_U_D_DESC : MSA_3R_DESC_BASE<"div_u.d", udiv, MSA128DOpnd>;
1916 class DOTP_S_H_DESC : MSA_3R_DESC_BASE<"dotp_s.h", int_mips_dotp_s_h,
1917 MSA128HOpnd, MSA128BOpnd, MSA128BOpnd>,
1919 class DOTP_S_W_DESC : MSA_3R_DESC_BASE<"dotp_s.w", int_mips_dotp_s_w,
1920 MSA128WOpnd, MSA128HOpnd, MSA128HOpnd>,
1922 class DOTP_S_D_DESC : MSA_3R_DESC_BASE<"dotp_s.d", int_mips_dotp_s_d,
1923 MSA128DOpnd, MSA128WOpnd, MSA128WOpnd>,
1926 class DOTP_U_H_DESC : MSA_3R_DESC_BASE<"dotp_u.h", int_mips_dotp_u_h,
1927 MSA128HOpnd, MSA128BOpnd, MSA128BOpnd>,
1929 class DOTP_U_W_DESC : MSA_3R_DESC_BASE<"dotp_u.w", int_mips_dotp_u_w,
1930 MSA128WOpnd, MSA128HOpnd, MSA128HOpnd>,
1932 class DOTP_U_D_DESC : MSA_3R_DESC_BASE<"dotp_u.d", int_mips_dotp_u_d,
1933 MSA128DOpnd, MSA128WOpnd, MSA128WOpnd>,
1936 class DPADD_S_H_DESC : MSA_3R_4R_DESC_BASE<"dpadd_s.h", int_mips_dpadd_s_h,
1937 MSA128HOpnd, MSA128BOpnd,
1938 MSA128BOpnd>, IsCommutable;
1939 class DPADD_S_W_DESC : MSA_3R_4R_DESC_BASE<"dpadd_s.w", int_mips_dpadd_s_w,
1940 MSA128WOpnd, MSA128HOpnd,
1941 MSA128HOpnd>, IsCommutable;
1942 class DPADD_S_D_DESC : MSA_3R_4R_DESC_BASE<"dpadd_s.d", int_mips_dpadd_s_d,
1943 MSA128DOpnd, MSA128WOpnd,
1944 MSA128WOpnd>, IsCommutable;
1946 class DPADD_U_H_DESC : MSA_3R_4R_DESC_BASE<"dpadd_u.h", int_mips_dpadd_u_h,
1947 MSA128HOpnd, MSA128BOpnd,
1948 MSA128BOpnd>, IsCommutable;
1949 class DPADD_U_W_DESC : MSA_3R_4R_DESC_BASE<"dpadd_u.w", int_mips_dpadd_u_w,
1950 MSA128WOpnd, MSA128HOpnd,
1951 MSA128HOpnd>, IsCommutable;
1952 class DPADD_U_D_DESC : MSA_3R_4R_DESC_BASE<"dpadd_u.d", int_mips_dpadd_u_d,
1953 MSA128DOpnd, MSA128WOpnd,
1954 MSA128WOpnd>, IsCommutable;
1956 class DPSUB_S_H_DESC : MSA_3R_4R_DESC_BASE<"dpsub_s.h", int_mips_dpsub_s_h,
1957 MSA128HOpnd, MSA128BOpnd,
1959 class DPSUB_S_W_DESC : MSA_3R_4R_DESC_BASE<"dpsub_s.w", int_mips_dpsub_s_w,
1960 MSA128WOpnd, MSA128HOpnd,
1962 class DPSUB_S_D_DESC : MSA_3R_4R_DESC_BASE<"dpsub_s.d", int_mips_dpsub_s_d,
1963 MSA128DOpnd, MSA128WOpnd,
1966 class DPSUB_U_H_DESC : MSA_3R_4R_DESC_BASE<"dpsub_u.h", int_mips_dpsub_u_h,
1967 MSA128HOpnd, MSA128BOpnd,
1969 class DPSUB_U_W_DESC : MSA_3R_4R_DESC_BASE<"dpsub_u.w", int_mips_dpsub_u_w,
1970 MSA128WOpnd, MSA128HOpnd,
1972 class DPSUB_U_D_DESC : MSA_3R_4R_DESC_BASE<"dpsub_u.d", int_mips_dpsub_u_d,
1973 MSA128DOpnd, MSA128WOpnd,
1976 class FADD_W_DESC : MSA_3RF_DESC_BASE<"fadd.w", fadd, MSA128WOpnd>,
1978 class FADD_D_DESC : MSA_3RF_DESC_BASE<"fadd.d", fadd, MSA128DOpnd>,
1981 class FCAF_W_DESC : MSA_3RF_DESC_BASE<"fcaf.w", int_mips_fcaf_w, MSA128WOpnd>,
1983 class FCAF_D_DESC : MSA_3RF_DESC_BASE<"fcaf.d", int_mips_fcaf_d, MSA128DOpnd>,
1986 class FCEQ_W_DESC : MSA_3RF_DESC_BASE<"fceq.w", vfsetoeq_v4f32, MSA128WOpnd>,
1988 class FCEQ_D_DESC : MSA_3RF_DESC_BASE<"fceq.d", vfsetoeq_v2f64, MSA128DOpnd>,
1991 class FCLASS_W_DESC : MSA_2RF_DESC_BASE<"fclass.w", int_mips_fclass_w,
1993 class FCLASS_D_DESC : MSA_2RF_DESC_BASE<"fclass.d", int_mips_fclass_d,
1996 class FCLE_W_DESC : MSA_3RF_DESC_BASE<"fcle.w", vfsetole_v4f32, MSA128WOpnd>;
1997 class FCLE_D_DESC : MSA_3RF_DESC_BASE<"fcle.d", vfsetole_v2f64, MSA128DOpnd>;
1999 class FCLT_W_DESC : MSA_3RF_DESC_BASE<"fclt.w", vfsetolt_v4f32, MSA128WOpnd>;
2000 class FCLT_D_DESC : MSA_3RF_DESC_BASE<"fclt.d", vfsetolt_v2f64, MSA128DOpnd>;
2002 class FCNE_W_DESC : MSA_3RF_DESC_BASE<"fcne.w", vfsetone_v4f32, MSA128WOpnd>,
2004 class FCNE_D_DESC : MSA_3RF_DESC_BASE<"fcne.d", vfsetone_v2f64, MSA128DOpnd>,
2007 class FCOR_W_DESC : MSA_3RF_DESC_BASE<"fcor.w", vfsetord_v4f32, MSA128WOpnd>,
2009 class FCOR_D_DESC : MSA_3RF_DESC_BASE<"fcor.d", vfsetord_v2f64, MSA128DOpnd>,
2012 class FCUEQ_W_DESC : MSA_3RF_DESC_BASE<"fcueq.w", vfsetueq_v4f32, MSA128WOpnd>,
2014 class FCUEQ_D_DESC : MSA_3RF_DESC_BASE<"fcueq.d", vfsetueq_v2f64, MSA128DOpnd>,
2017 class FCULE_W_DESC : MSA_3RF_DESC_BASE<"fcule.w", vfsetule_v4f32, MSA128WOpnd>,
2019 class FCULE_D_DESC : MSA_3RF_DESC_BASE<"fcule.d", vfsetule_v2f64, MSA128DOpnd>,
2022 class FCULT_W_DESC : MSA_3RF_DESC_BASE<"fcult.w", vfsetult_v4f32, MSA128WOpnd>,
2024 class FCULT_D_DESC : MSA_3RF_DESC_BASE<"fcult.d", vfsetult_v2f64, MSA128DOpnd>,
2027 class FCUN_W_DESC : MSA_3RF_DESC_BASE<"fcun.w", vfsetun_v4f32, MSA128WOpnd>,
2029 class FCUN_D_DESC : MSA_3RF_DESC_BASE<"fcun.d", vfsetun_v2f64, MSA128DOpnd>,
2032 class FCUNE_W_DESC : MSA_3RF_DESC_BASE<"fcune.w", vfsetune_v4f32, MSA128WOpnd>,
2034 class FCUNE_D_DESC : MSA_3RF_DESC_BASE<"fcune.d", vfsetune_v2f64, MSA128DOpnd>,
2037 class FDIV_W_DESC : MSA_3RF_DESC_BASE<"fdiv.w", fdiv, MSA128WOpnd>;
2038 class FDIV_D_DESC : MSA_3RF_DESC_BASE<"fdiv.d", fdiv, MSA128DOpnd>;
2040 class FEXDO_H_DESC : MSA_3RF_DESC_BASE<"fexdo.h", int_mips_fexdo_h,
2041 MSA128HOpnd, MSA128WOpnd, MSA128WOpnd>;
2042 class FEXDO_W_DESC : MSA_3RF_DESC_BASE<"fexdo.w", int_mips_fexdo_w,
2043 MSA128WOpnd, MSA128DOpnd, MSA128DOpnd>;
2045 // The fexp2.df instruction multiplies the first operand by 2 to the power of
2046 // the second operand. We therefore need a pseudo-insn in order to invent the
2047 // 1.0 when we only need to match ISD::FEXP2.
2048 class FEXP2_W_DESC : MSA_3RF_DESC_BASE<"fexp2.w", mul_fexp2, MSA128WOpnd>;
2049 class FEXP2_D_DESC : MSA_3RF_DESC_BASE<"fexp2.d", mul_fexp2, MSA128DOpnd>;
2050 let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in {
2051 class FEXP2_W_1_PSEUDO_DESC :
2052 MSAPseudo<(outs MSA128W:$wd), (ins MSA128W:$ws),
2053 [(set MSA128W:$wd, (fexp2 MSA128W:$ws))]>;
2054 class FEXP2_D_1_PSEUDO_DESC :
2055 MSAPseudo<(outs MSA128D:$wd), (ins MSA128D:$ws),
2056 [(set MSA128D:$wd, (fexp2 MSA128D:$ws))]>;
2059 class FEXUPL_W_DESC : MSA_2RF_DESC_BASE<"fexupl.w", int_mips_fexupl_w,
2060 MSA128WOpnd, MSA128HOpnd>;
2061 class FEXUPL_D_DESC : MSA_2RF_DESC_BASE<"fexupl.d", int_mips_fexupl_d,
2062 MSA128DOpnd, MSA128WOpnd>;
2064 class FEXUPR_W_DESC : MSA_2RF_DESC_BASE<"fexupr.w", int_mips_fexupr_w,
2065 MSA128WOpnd, MSA128HOpnd>;
2066 class FEXUPR_D_DESC : MSA_2RF_DESC_BASE<"fexupr.d", int_mips_fexupr_d,
2067 MSA128DOpnd, MSA128WOpnd>;
2069 class FFINT_S_W_DESC : MSA_2RF_DESC_BASE<"ffint_s.w", sint_to_fp, MSA128WOpnd>;
2070 class FFINT_S_D_DESC : MSA_2RF_DESC_BASE<"ffint_s.d", sint_to_fp, MSA128DOpnd>;
2072 class FFINT_U_W_DESC : MSA_2RF_DESC_BASE<"ffint_u.w", uint_to_fp, MSA128WOpnd>;
2073 class FFINT_U_D_DESC : MSA_2RF_DESC_BASE<"ffint_u.d", uint_to_fp, MSA128DOpnd>;
2075 class FFQL_W_DESC : MSA_2RF_DESC_BASE<"ffql.w", int_mips_ffql_w,
2076 MSA128WOpnd, MSA128HOpnd>;
2077 class FFQL_D_DESC : MSA_2RF_DESC_BASE<"ffql.d", int_mips_ffql_d,
2078 MSA128DOpnd, MSA128WOpnd>;
2080 class FFQR_W_DESC : MSA_2RF_DESC_BASE<"ffqr.w", int_mips_ffqr_w,
2081 MSA128WOpnd, MSA128HOpnd>;
2082 class FFQR_D_DESC : MSA_2RF_DESC_BASE<"ffqr.d", int_mips_ffqr_d,
2083 MSA128DOpnd, MSA128WOpnd>;
2085 class FILL_B_DESC : MSA_2R_FILL_DESC_BASE<"fill.b", v16i8, vsplati8,
2086 MSA128BOpnd, GPR32Opnd>;
2087 class FILL_H_DESC : MSA_2R_FILL_DESC_BASE<"fill.h", v8i16, vsplati16,
2088 MSA128HOpnd, GPR32Opnd>;
2089 class FILL_W_DESC : MSA_2R_FILL_DESC_BASE<"fill.w", v4i32, vsplati32,
2090 MSA128WOpnd, GPR32Opnd>;
2091 class FILL_D_DESC : MSA_2R_FILL_DESC_BASE<"fill.d", v2i64, vsplati64,
2092 MSA128DOpnd, GPR64Opnd>;
2094 class FILL_FW_PSEUDO_DESC : MSA_2R_FILL_PSEUDO_BASE<v4f32, vsplatf32, MSA128W,
2096 class FILL_FD_PSEUDO_DESC : MSA_2R_FILL_PSEUDO_BASE<v2f64, vsplatf64, MSA128D,
2099 class FLOG2_W_DESC : MSA_2RF_DESC_BASE<"flog2.w", flog2, MSA128WOpnd>;
2100 class FLOG2_D_DESC : MSA_2RF_DESC_BASE<"flog2.d", flog2, MSA128DOpnd>;
2102 class FMADD_W_DESC : MSA_3RF_4RF_DESC_BASE<"fmadd.w", fma, MSA128WOpnd>;
2103 class FMADD_D_DESC : MSA_3RF_4RF_DESC_BASE<"fmadd.d", fma, MSA128DOpnd>;
2105 class FMAX_W_DESC : MSA_3RF_DESC_BASE<"fmax.w", int_mips_fmax_w, MSA128WOpnd>;
2106 class FMAX_D_DESC : MSA_3RF_DESC_BASE<"fmax.d", int_mips_fmax_d, MSA128DOpnd>;
2108 class FMAX_A_W_DESC : MSA_3RF_DESC_BASE<"fmax_a.w", int_mips_fmax_a_w,
2110 class FMAX_A_D_DESC : MSA_3RF_DESC_BASE<"fmax_a.d", int_mips_fmax_a_d,
2113 class FMIN_W_DESC : MSA_3RF_DESC_BASE<"fmin.w", int_mips_fmin_w, MSA128WOpnd>;
2114 class FMIN_D_DESC : MSA_3RF_DESC_BASE<"fmin.d", int_mips_fmin_d, MSA128DOpnd>;
2116 class FMIN_A_W_DESC : MSA_3RF_DESC_BASE<"fmin_a.w", int_mips_fmin_a_w,
2118 class FMIN_A_D_DESC : MSA_3RF_DESC_BASE<"fmin_a.d", int_mips_fmin_a_d,
2121 class FMSUB_W_DESC : MSA_3RF_4RF_DESC_BASE<"fmsub.w", MipsFMS, MSA128WOpnd>;
2122 class FMSUB_D_DESC : MSA_3RF_4RF_DESC_BASE<"fmsub.d", MipsFMS, MSA128DOpnd>;
2124 class FMUL_W_DESC : MSA_3RF_DESC_BASE<"fmul.w", fmul, MSA128WOpnd>;
2125 class FMUL_D_DESC : MSA_3RF_DESC_BASE<"fmul.d", fmul, MSA128DOpnd>;
2127 class FRINT_W_DESC : MSA_2RF_DESC_BASE<"frint.w", frint, MSA128WOpnd>;
2128 class FRINT_D_DESC : MSA_2RF_DESC_BASE<"frint.d", frint, MSA128DOpnd>;
2130 class FRCP_W_DESC : MSA_2RF_DESC_BASE<"frcp.w", int_mips_frcp_w, MSA128WOpnd>;
2131 class FRCP_D_DESC : MSA_2RF_DESC_BASE<"frcp.d", int_mips_frcp_d, MSA128DOpnd>;
2133 class FRSQRT_W_DESC : MSA_2RF_DESC_BASE<"frsqrt.w", int_mips_frsqrt_w,
2135 class FRSQRT_D_DESC : MSA_2RF_DESC_BASE<"frsqrt.d", int_mips_frsqrt_d,
2138 class FSAF_W_DESC : MSA_3RF_DESC_BASE<"fsaf.w", int_mips_fsaf_w, MSA128WOpnd>;
2139 class FSAF_D_DESC : MSA_3RF_DESC_BASE<"fsaf.d", int_mips_fsaf_d, MSA128DOpnd>;
2141 class FSEQ_W_DESC : MSA_3RF_DESC_BASE<"fseq.w", int_mips_fseq_w, MSA128WOpnd>;
2142 class FSEQ_D_DESC : MSA_3RF_DESC_BASE<"fseq.d", int_mips_fseq_d, MSA128DOpnd>;
2144 class FSLE_W_DESC : MSA_3RF_DESC_BASE<"fsle.w", int_mips_fsle_w, MSA128WOpnd>;
2145 class FSLE_D_DESC : MSA_3RF_DESC_BASE<"fsle.d", int_mips_fsle_d, MSA128DOpnd>;
2147 class FSLT_W_DESC : MSA_3RF_DESC_BASE<"fslt.w", int_mips_fslt_w, MSA128WOpnd>;
2148 class FSLT_D_DESC : MSA_3RF_DESC_BASE<"fslt.d", int_mips_fslt_d, MSA128DOpnd>;
2150 class FSNE_W_DESC : MSA_3RF_DESC_BASE<"fsne.w", int_mips_fsne_w, MSA128WOpnd>;
2151 class FSNE_D_DESC : MSA_3RF_DESC_BASE<"fsne.d", int_mips_fsne_d, MSA128DOpnd>;
2153 class FSOR_W_DESC : MSA_3RF_DESC_BASE<"fsor.w", int_mips_fsor_w, MSA128WOpnd>;
2154 class FSOR_D_DESC : MSA_3RF_DESC_BASE<"fsor.d", int_mips_fsor_d, MSA128DOpnd>;
2156 class FSQRT_W_DESC : MSA_2RF_DESC_BASE<"fsqrt.w", fsqrt, MSA128WOpnd>;
2157 class FSQRT_D_DESC : MSA_2RF_DESC_BASE<"fsqrt.d", fsqrt, MSA128DOpnd>;
2159 class FSUB_W_DESC : MSA_3RF_DESC_BASE<"fsub.w", fsub, MSA128WOpnd>;
2160 class FSUB_D_DESC : MSA_3RF_DESC_BASE<"fsub.d", fsub, MSA128DOpnd>;
2162 class FSUEQ_W_DESC : MSA_3RF_DESC_BASE<"fsueq.w", int_mips_fsueq_w,
2164 class FSUEQ_D_DESC : MSA_3RF_DESC_BASE<"fsueq.d", int_mips_fsueq_d,
2167 class FSULE_W_DESC : MSA_3RF_DESC_BASE<"fsule.w", int_mips_fsule_w,
2169 class FSULE_D_DESC : MSA_3RF_DESC_BASE<"fsule.d", int_mips_fsule_d,
2172 class FSULT_W_DESC : MSA_3RF_DESC_BASE<"fsult.w", int_mips_fsult_w,
2174 class FSULT_D_DESC : MSA_3RF_DESC_BASE<"fsult.d", int_mips_fsult_d,
2177 class FSUN_W_DESC : MSA_3RF_DESC_BASE<"fsun.w", int_mips_fsun_w,
2179 class FSUN_D_DESC : MSA_3RF_DESC_BASE<"fsun.d", int_mips_fsun_d,
2182 class FSUNE_W_DESC : MSA_3RF_DESC_BASE<"fsune.w", int_mips_fsune_w,
2184 class FSUNE_D_DESC : MSA_3RF_DESC_BASE<"fsune.d", int_mips_fsune_d,
2187 class FTINT_S_W_DESC : MSA_2RF_DESC_BASE<"ftint_s.w", int_mips_ftint_s_w,
2189 class FTINT_S_D_DESC : MSA_2RF_DESC_BASE<"ftint_s.d", int_mips_ftint_s_d,
2192 class FTINT_U_W_DESC : MSA_2RF_DESC_BASE<"ftint_u.w", int_mips_ftint_u_w,
2194 class FTINT_U_D_DESC : MSA_2RF_DESC_BASE<"ftint_u.d", int_mips_ftint_u_d,
2197 class FTQ_H_DESC : MSA_3RF_DESC_BASE<"ftq.h", int_mips_ftq_h,
2198 MSA128HOpnd, MSA128WOpnd, MSA128WOpnd>;
2199 class FTQ_W_DESC : MSA_3RF_DESC_BASE<"ftq.w", int_mips_ftq_w,
2200 MSA128WOpnd, MSA128DOpnd, MSA128DOpnd>;
2202 class FTRUNC_S_W_DESC : MSA_2RF_DESC_BASE<"ftrunc_s.w", fp_to_sint,
2204 class FTRUNC_S_D_DESC : MSA_2RF_DESC_BASE<"ftrunc_s.d", fp_to_sint,
2207 class FTRUNC_U_W_DESC : MSA_2RF_DESC_BASE<"ftrunc_u.w", fp_to_uint,
2209 class FTRUNC_U_D_DESC : MSA_2RF_DESC_BASE<"ftrunc_u.d", fp_to_uint,
2212 class HADD_S_H_DESC : MSA_3R_DESC_BASE<"hadd_s.h", int_mips_hadd_s_h,
2213 MSA128HOpnd, MSA128BOpnd, MSA128BOpnd>;
2214 class HADD_S_W_DESC : MSA_3R_DESC_BASE<"hadd_s.w", int_mips_hadd_s_w,
2215 MSA128WOpnd, MSA128HOpnd, MSA128HOpnd>;
2216 class HADD_S_D_DESC : MSA_3R_DESC_BASE<"hadd_s.d", int_mips_hadd_s_d,
2217 MSA128DOpnd, MSA128WOpnd, MSA128WOpnd>;
2219 class HADD_U_H_DESC : MSA_3R_DESC_BASE<"hadd_u.h", int_mips_hadd_u_h,
2220 MSA128HOpnd, MSA128BOpnd, MSA128BOpnd>;
2221 class HADD_U_W_DESC : MSA_3R_DESC_BASE<"hadd_u.w", int_mips_hadd_u_w,
2222 MSA128WOpnd, MSA128HOpnd, MSA128HOpnd>;
2223 class HADD_U_D_DESC : MSA_3R_DESC_BASE<"hadd_u.d", int_mips_hadd_u_d,
2224 MSA128DOpnd, MSA128WOpnd, MSA128WOpnd>;
2226 class HSUB_S_H_DESC : MSA_3R_DESC_BASE<"hsub_s.h", int_mips_hsub_s_h,
2227 MSA128HOpnd, MSA128BOpnd, MSA128BOpnd>;
2228 class HSUB_S_W_DESC : MSA_3R_DESC_BASE<"hsub_s.w", int_mips_hsub_s_w,
2229 MSA128WOpnd, MSA128HOpnd, MSA128HOpnd>;
2230 class HSUB_S_D_DESC : MSA_3R_DESC_BASE<"hsub_s.d", int_mips_hsub_s_d,
2231 MSA128DOpnd, MSA128WOpnd, MSA128WOpnd>;
2233 class HSUB_U_H_DESC : MSA_3R_DESC_BASE<"hsub_u.h", int_mips_hsub_u_h,
2234 MSA128HOpnd, MSA128BOpnd, MSA128BOpnd>;
2235 class HSUB_U_W_DESC : MSA_3R_DESC_BASE<"hsub_u.w", int_mips_hsub_u_w,
2236 MSA128WOpnd, MSA128HOpnd, MSA128HOpnd>;
2237 class HSUB_U_D_DESC : MSA_3R_DESC_BASE<"hsub_u.d", int_mips_hsub_u_d,
2238 MSA128DOpnd, MSA128WOpnd, MSA128WOpnd>;
2240 class ILVEV_B_DESC : MSA_3R_DESC_BASE<"ilvev.b", MipsILVEV, MSA128BOpnd>;
2241 class ILVEV_H_DESC : MSA_3R_DESC_BASE<"ilvev.h", MipsILVEV, MSA128HOpnd>;
2242 class ILVEV_W_DESC : MSA_3R_DESC_BASE<"ilvev.w", MipsILVEV, MSA128WOpnd>;
2243 class ILVEV_D_DESC : MSA_3R_DESC_BASE<"ilvev.d", MipsILVEV, MSA128DOpnd>;
2245 class ILVL_B_DESC : MSA_3R_DESC_BASE<"ilvl.b", MipsILVL, MSA128BOpnd>;
2246 class ILVL_H_DESC : MSA_3R_DESC_BASE<"ilvl.h", MipsILVL, MSA128HOpnd>;
2247 class ILVL_W_DESC : MSA_3R_DESC_BASE<"ilvl.w", MipsILVL, MSA128WOpnd>;
2248 class ILVL_D_DESC : MSA_3R_DESC_BASE<"ilvl.d", MipsILVL, MSA128DOpnd>;
2250 class ILVOD_B_DESC : MSA_3R_DESC_BASE<"ilvod.b", MipsILVOD, MSA128BOpnd>;
2251 class ILVOD_H_DESC : MSA_3R_DESC_BASE<"ilvod.h", MipsILVOD, MSA128HOpnd>;
2252 class ILVOD_W_DESC : MSA_3R_DESC_BASE<"ilvod.w", MipsILVOD, MSA128WOpnd>;
2253 class ILVOD_D_DESC : MSA_3R_DESC_BASE<"ilvod.d", MipsILVOD, MSA128DOpnd>;
2255 class ILVR_B_DESC : MSA_3R_DESC_BASE<"ilvr.b", MipsILVR, MSA128BOpnd>;
2256 class ILVR_H_DESC : MSA_3R_DESC_BASE<"ilvr.h", MipsILVR, MSA128HOpnd>;
2257 class ILVR_W_DESC : MSA_3R_DESC_BASE<"ilvr.w", MipsILVR, MSA128WOpnd>;
2258 class ILVR_D_DESC : MSA_3R_DESC_BASE<"ilvr.d", MipsILVR, MSA128DOpnd>;
2260 class INSERT_B_DESC : MSA_INSERT_DESC_BASE<"insert.b", vinsert_v16i8, uimm4,
2261 immZExt4Ptr, MSA128BOpnd, GPR32Opnd>;
2262 class INSERT_H_DESC : MSA_INSERT_DESC_BASE<"insert.h", vinsert_v8i16, uimm3,
2263 immZExt3Ptr, MSA128HOpnd, GPR32Opnd>;
2264 class INSERT_W_DESC : MSA_INSERT_DESC_BASE<"insert.w", vinsert_v4i32, uimm2,
2265 immZExt2Ptr, MSA128WOpnd, GPR32Opnd>;
2266 class INSERT_D_DESC : MSA_INSERT_DESC_BASE<"insert.d", vinsert_v2i64, uimm1,
2267 immZExt1Ptr, MSA128DOpnd, GPR64Opnd>;
2269 class INSERT_B_VIDX_PSEUDO_DESC :
2270 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v16i8, MSA128BOpnd, GPR32Opnd, GPR32Opnd>;
2271 class INSERT_H_VIDX_PSEUDO_DESC :
2272 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v8i16, MSA128HOpnd, GPR32Opnd, GPR32Opnd>;
2273 class INSERT_W_VIDX_PSEUDO_DESC :
2274 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v4i32, MSA128WOpnd, GPR32Opnd, GPR32Opnd>;
2275 class INSERT_D_VIDX_PSEUDO_DESC :
2276 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v2i64, MSA128DOpnd, GPR64Opnd, GPR32Opnd>;
2278 class INSERT_FW_PSEUDO_DESC : MSA_INSERT_PSEUDO_BASE<vector_insert, v4f32,
2280 MSA128WOpnd, FGR32Opnd>;
2281 class INSERT_FD_PSEUDO_DESC : MSA_INSERT_PSEUDO_BASE<vector_insert, v2f64,
2283 MSA128DOpnd, FGR64Opnd>;
2285 class INSERT_FW_VIDX_PSEUDO_DESC :
2286 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v4f32, MSA128WOpnd, FGR32Opnd, GPR32Opnd>;
2287 class INSERT_FD_VIDX_PSEUDO_DESC :
2288 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v2f64, MSA128DOpnd, FGR64Opnd, GPR32Opnd>;
2290 class INSERT_B_VIDX64_PSEUDO_DESC :
2291 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v16i8, MSA128BOpnd, GPR32Opnd, GPR64Opnd>;
2292 class INSERT_H_VIDX64_PSEUDO_DESC :
2293 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v8i16, MSA128HOpnd, GPR32Opnd, GPR64Opnd>;
2294 class INSERT_W_VIDX64_PSEUDO_DESC :
2295 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v4i32, MSA128WOpnd, GPR32Opnd, GPR64Opnd>;
2296 class INSERT_D_VIDX64_PSEUDO_DESC :
2297 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v2i64, MSA128DOpnd, GPR64Opnd, GPR64Opnd>;
2299 class INSERT_FW_VIDX64_PSEUDO_DESC :
2300 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v4f32, MSA128WOpnd, FGR32Opnd, GPR64Opnd>;
2301 class INSERT_FD_VIDX64_PSEUDO_DESC :
2302 MSA_INSERT_VIDX_PSEUDO_BASE<vector_insert, v2f64, MSA128DOpnd, FGR64Opnd, GPR64Opnd>;
2304 class INSVE_B_DESC : MSA_INSVE_DESC_BASE<"insve.b", insve_v16i8, uimm4, timmZExt4,
2306 class INSVE_H_DESC : MSA_INSVE_DESC_BASE<"insve.h", insve_v8i16, uimm3, timmZExt3,
2308 class INSVE_W_DESC : MSA_INSVE_DESC_BASE<"insve.w", insve_v4i32, uimm2, timmZExt2,
2310 class INSVE_D_DESC : MSA_INSVE_DESC_BASE<"insve.d", insve_v2i64, uimm1, timmZExt1,
2313 class LD_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
2314 ValueType TyNode, RegisterOperand ROWD,
2315 Operand MemOpnd, ComplexPattern Addr = addrimm10,
2316 InstrItinClass itin = NoItinerary> {
2317 dag OutOperandList = (outs ROWD:$wd);
2318 dag InOperandList = (ins MemOpnd:$addr);
2319 string AsmString = !strconcat(instr_asm, "\t$wd, $addr");
2320 list<dag> Pattern = [(set ROWD:$wd, (TyNode (OpNode Addr:$addr)))];
2321 InstrItinClass Itinerary = itin;
2322 string DecoderMethod = "DecodeMSA128Mem";
2325 class LD_B_DESC : LD_DESC_BASE<"ld.b", load, v16i8, MSA128BOpnd, mem_simm10>;
2326 class LD_H_DESC : LD_DESC_BASE<"ld.h", load, v8i16, MSA128HOpnd,
2327 mem_simm10_lsl1, addrimm10lsl1>;
2328 class LD_W_DESC : LD_DESC_BASE<"ld.w", load, v4i32, MSA128WOpnd,
2329 mem_simm10_lsl2, addrimm10lsl2>;
2330 class LD_D_DESC : LD_DESC_BASE<"ld.d", load, v2i64, MSA128DOpnd,
2331 mem_simm10_lsl3, addrimm10lsl3>;
2333 class LDI_B_DESC : MSA_I10_LDI_DESC_BASE<"ldi.b", MSA128BOpnd>;
2334 class LDI_H_DESC : MSA_I10_LDI_DESC_BASE<"ldi.h", MSA128HOpnd>;
2335 class LDI_W_DESC : MSA_I10_LDI_DESC_BASE<"ldi.w", MSA128WOpnd>;
2336 class LDI_D_DESC : MSA_I10_LDI_DESC_BASE<"ldi.d", MSA128DOpnd>;
2338 class MSA_LOAD_PSEUDO_BASE<SDPatternOperator intrinsic, RegisterOperand RO> :
2339 PseudoSE<(outs RO:$dst), (ins PtrRC:$ptr, GPR32:$imm),
2340 [(set RO:$dst, (intrinsic iPTR:$ptr, GPR32:$imm))]> {
2341 let hasNoSchedulingInfo = 1;
2342 let usesCustomInserter = 1;
2345 def LDR_D : MSA_LOAD_PSEUDO_BASE<int_mips_ldr_d, MSA128DOpnd>;
2346 def LDR_W : MSA_LOAD_PSEUDO_BASE<int_mips_ldr_w, MSA128WOpnd>;
2348 class LSA_DESC_BASE<string instr_asm, RegisterOperand RORD,
2349 InstrItinClass itin = NoItinerary> {
2350 dag OutOperandList = (outs RORD:$rd);
2351 dag InOperandList = (ins RORD:$rs, RORD:$rt, uimm2_plus1:$sa);
2352 string AsmString = !strconcat(instr_asm, "\t$rd, $rs, $rt, $sa");
2353 list<dag> Pattern = [(set RORD:$rd, (add RORD:$rt,
2355 immZExt2Lsa:$sa)))];
2356 InstrItinClass Itinerary = itin;
2359 class LSA_DESC : LSA_DESC_BASE<"lsa", GPR32Opnd, II_LSA>;
2360 class DLSA_DESC : LSA_DESC_BASE<"dlsa", GPR64Opnd, II_DLSA>;
2362 class MADD_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"madd_q.h", int_mips_madd_q_h,
2364 class MADD_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"madd_q.w", int_mips_madd_q_w,
2367 class MADDR_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"maddr_q.h", int_mips_maddr_q_h,
2369 class MADDR_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"maddr_q.w", int_mips_maddr_q_w,
2372 class MADDV_B_DESC : MSA_3R_4R_DESC_BASE<"maddv.b", muladd, MSA128BOpnd>;
2373 class MADDV_H_DESC : MSA_3R_4R_DESC_BASE<"maddv.h", muladd, MSA128HOpnd>;
2374 class MADDV_W_DESC : MSA_3R_4R_DESC_BASE<"maddv.w", muladd, MSA128WOpnd>;
2375 class MADDV_D_DESC : MSA_3R_4R_DESC_BASE<"maddv.d", muladd, MSA128DOpnd>;
2377 class MAX_A_B_DESC : MSA_3R_DESC_BASE<"max_a.b", int_mips_max_a_b, MSA128BOpnd>;
2378 class MAX_A_H_DESC : MSA_3R_DESC_BASE<"max_a.h", int_mips_max_a_h, MSA128HOpnd>;
2379 class MAX_A_W_DESC : MSA_3R_DESC_BASE<"max_a.w", int_mips_max_a_w, MSA128WOpnd>;
2380 class MAX_A_D_DESC : MSA_3R_DESC_BASE<"max_a.d", int_mips_max_a_d, MSA128DOpnd>;
2382 class MAX_S_B_DESC : MSA_3R_DESC_BASE<"max_s.b", smax, MSA128BOpnd>;
2383 class MAX_S_H_DESC : MSA_3R_DESC_BASE<"max_s.h", smax, MSA128HOpnd>;
2384 class MAX_S_W_DESC : MSA_3R_DESC_BASE<"max_s.w", smax, MSA128WOpnd>;
2385 class MAX_S_D_DESC : MSA_3R_DESC_BASE<"max_s.d", smax, MSA128DOpnd>;
2387 class MAX_U_B_DESC : MSA_3R_DESC_BASE<"max_u.b", umax, MSA128BOpnd>;
2388 class MAX_U_H_DESC : MSA_3R_DESC_BASE<"max_u.h", umax, MSA128HOpnd>;
2389 class MAX_U_W_DESC : MSA_3R_DESC_BASE<"max_u.w", umax, MSA128WOpnd>;
2390 class MAX_U_D_DESC : MSA_3R_DESC_BASE<"max_u.d", umax, MSA128DOpnd>;
2392 class MAXI_S_B_DESC : MSA_I5_DESC_BASE<"maxi_s.b", smax, vsplati8_simm5,
2394 class MAXI_S_H_DESC : MSA_I5_DESC_BASE<"maxi_s.h", smax, vsplati16_simm5,
2396 class MAXI_S_W_DESC : MSA_I5_DESC_BASE<"maxi_s.w", smax, vsplati32_simm5,
2398 class MAXI_S_D_DESC : MSA_I5_DESC_BASE<"maxi_s.d", smax, vsplati64_simm5,
2401 class MAXI_U_B_DESC : MSA_I5_DESC_BASE<"maxi_u.b", umax, vsplati8_uimm5,
2403 class MAXI_U_H_DESC : MSA_I5_DESC_BASE<"maxi_u.h", umax, vsplati16_uimm5,
2405 class MAXI_U_W_DESC : MSA_I5_DESC_BASE<"maxi_u.w", umax, vsplati32_uimm5,
2407 class MAXI_U_D_DESC : MSA_I5_DESC_BASE<"maxi_u.d", umax, vsplati64_uimm5,
2410 class MIN_A_B_DESC : MSA_3R_DESC_BASE<"min_a.b", int_mips_min_a_b, MSA128BOpnd>;
2411 class MIN_A_H_DESC : MSA_3R_DESC_BASE<"min_a.h", int_mips_min_a_h, MSA128HOpnd>;
2412 class MIN_A_W_DESC : MSA_3R_DESC_BASE<"min_a.w", int_mips_min_a_w, MSA128WOpnd>;
2413 class MIN_A_D_DESC : MSA_3R_DESC_BASE<"min_a.d", int_mips_min_a_d, MSA128DOpnd>;
2415 class MIN_S_B_DESC : MSA_3R_DESC_BASE<"min_s.b", smin, MSA128BOpnd>;
2416 class MIN_S_H_DESC : MSA_3R_DESC_BASE<"min_s.h", smin, MSA128HOpnd>;
2417 class MIN_S_W_DESC : MSA_3R_DESC_BASE<"min_s.w", smin, MSA128WOpnd>;
2418 class MIN_S_D_DESC : MSA_3R_DESC_BASE<"min_s.d", smin, MSA128DOpnd>;
2420 class MIN_U_B_DESC : MSA_3R_DESC_BASE<"min_u.b", umin, MSA128BOpnd>;
2421 class MIN_U_H_DESC : MSA_3R_DESC_BASE<"min_u.h", umin, MSA128HOpnd>;
2422 class MIN_U_W_DESC : MSA_3R_DESC_BASE<"min_u.w", umin, MSA128WOpnd>;
2423 class MIN_U_D_DESC : MSA_3R_DESC_BASE<"min_u.d", umin, MSA128DOpnd>;
2425 class MINI_S_B_DESC : MSA_I5_DESC_BASE<"mini_s.b", smin, vsplati8_simm5,
2427 class MINI_S_H_DESC : MSA_I5_DESC_BASE<"mini_s.h", smin, vsplati16_simm5,
2429 class MINI_S_W_DESC : MSA_I5_DESC_BASE<"mini_s.w", smin, vsplati32_simm5,
2431 class MINI_S_D_DESC : MSA_I5_DESC_BASE<"mini_s.d", smin, vsplati64_simm5,
2434 class MINI_U_B_DESC : MSA_I5_DESC_BASE<"mini_u.b", umin, vsplati8_uimm5,
2436 class MINI_U_H_DESC : MSA_I5_DESC_BASE<"mini_u.h", umin, vsplati16_uimm5,
2438 class MINI_U_W_DESC : MSA_I5_DESC_BASE<"mini_u.w", umin, vsplati32_uimm5,
2440 class MINI_U_D_DESC : MSA_I5_DESC_BASE<"mini_u.d", umin, vsplati64_uimm5,
2443 class MOD_S_B_DESC : MSA_3R_DESC_BASE<"mod_s.b", srem, MSA128BOpnd>;
2444 class MOD_S_H_DESC : MSA_3R_DESC_BASE<"mod_s.h", srem, MSA128HOpnd>;
2445 class MOD_S_W_DESC : MSA_3R_DESC_BASE<"mod_s.w", srem, MSA128WOpnd>;
2446 class MOD_S_D_DESC : MSA_3R_DESC_BASE<"mod_s.d", srem, MSA128DOpnd>;
2448 class MOD_U_B_DESC : MSA_3R_DESC_BASE<"mod_u.b", urem, MSA128BOpnd>;
2449 class MOD_U_H_DESC : MSA_3R_DESC_BASE<"mod_u.h", urem, MSA128HOpnd>;
2450 class MOD_U_W_DESC : MSA_3R_DESC_BASE<"mod_u.w", urem, MSA128WOpnd>;
2451 class MOD_U_D_DESC : MSA_3R_DESC_BASE<"mod_u.d", urem, MSA128DOpnd>;
2454 dag OutOperandList = (outs MSA128BOpnd:$wd);
2455 dag InOperandList = (ins MSA128BOpnd:$ws);
2456 string AsmString = "move.v\t$wd, $ws";
2457 list<dag> Pattern = [];
2458 InstrItinClass Itinerary = NoItinerary;
2462 class MSUB_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"msub_q.h", int_mips_msub_q_h,
2464 class MSUB_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"msub_q.w", int_mips_msub_q_w,
2467 class MSUBR_Q_H_DESC : MSA_3RF_4RF_DESC_BASE<"msubr_q.h", int_mips_msubr_q_h,
2469 class MSUBR_Q_W_DESC : MSA_3RF_4RF_DESC_BASE<"msubr_q.w", int_mips_msubr_q_w,
2472 class MSUBV_B_DESC : MSA_3R_4R_DESC_BASE<"msubv.b", mulsub, MSA128BOpnd>;
2473 class MSUBV_H_DESC : MSA_3R_4R_DESC_BASE<"msubv.h", mulsub, MSA128HOpnd>;
2474 class MSUBV_W_DESC : MSA_3R_4R_DESC_BASE<"msubv.w", mulsub, MSA128WOpnd>;
2475 class MSUBV_D_DESC : MSA_3R_4R_DESC_BASE<"msubv.d", mulsub, MSA128DOpnd>;
2477 class MUL_Q_H_DESC : MSA_3RF_DESC_BASE<"mul_q.h", int_mips_mul_q_h,
2479 class MUL_Q_W_DESC : MSA_3RF_DESC_BASE<"mul_q.w", int_mips_mul_q_w,
2482 class MULR_Q_H_DESC : MSA_3RF_DESC_BASE<"mulr_q.h", int_mips_mulr_q_h,
2484 class MULR_Q_W_DESC : MSA_3RF_DESC_BASE<"mulr_q.w", int_mips_mulr_q_w,
2487 class MULV_B_DESC : MSA_3R_DESC_BASE<"mulv.b", mul, MSA128BOpnd>;
2488 class MULV_H_DESC : MSA_3R_DESC_BASE<"mulv.h", mul, MSA128HOpnd>;
2489 class MULV_W_DESC : MSA_3R_DESC_BASE<"mulv.w", mul, MSA128WOpnd>;
2490 class MULV_D_DESC : MSA_3R_DESC_BASE<"mulv.d", mul, MSA128DOpnd>;
2492 class NLOC_B_DESC : MSA_2R_DESC_BASE<"nloc.b", int_mips_nloc_b, MSA128BOpnd>;
2493 class NLOC_H_DESC : MSA_2R_DESC_BASE<"nloc.h", int_mips_nloc_h, MSA128HOpnd>;
2494 class NLOC_W_DESC : MSA_2R_DESC_BASE<"nloc.w", int_mips_nloc_w, MSA128WOpnd>;
2495 class NLOC_D_DESC : MSA_2R_DESC_BASE<"nloc.d", int_mips_nloc_d, MSA128DOpnd>;
2497 class NLZC_B_DESC : MSA_2R_DESC_BASE<"nlzc.b", ctlz, MSA128BOpnd>;
2498 class NLZC_H_DESC : MSA_2R_DESC_BASE<"nlzc.h", ctlz, MSA128HOpnd>;
2499 class NLZC_W_DESC : MSA_2R_DESC_BASE<"nlzc.w", ctlz, MSA128WOpnd>;
2500 class NLZC_D_DESC : MSA_2R_DESC_BASE<"nlzc.d", ctlz, MSA128DOpnd>;
2502 class NOR_V_DESC : MSA_VEC_DESC_BASE<"nor.v", MipsVNOR, MSA128BOpnd>;
2503 class NOR_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<MipsVNOR, MSA128HOpnd>;
2504 class NOR_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<MipsVNOR, MSA128WOpnd>;
2505 class NOR_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<MipsVNOR, MSA128DOpnd>;
2507 class NORI_B_DESC : MSA_I8_DESC_BASE<"nori.b", MipsVNOR, vsplati8_uimm8,
2510 class OR_V_DESC : MSA_VEC_DESC_BASE<"or.v", or, MSA128BOpnd>;
2511 class OR_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<or, MSA128HOpnd>;
2512 class OR_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<or, MSA128WOpnd>;
2513 class OR_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<or, MSA128DOpnd>;
2515 class ORI_B_DESC : MSA_I8_DESC_BASE<"ori.b", or, vsplati8_uimm8, MSA128BOpnd>;
2517 class PCKEV_B_DESC : MSA_3R_DESC_BASE<"pckev.b", MipsPCKEV, MSA128BOpnd>;
2518 class PCKEV_H_DESC : MSA_3R_DESC_BASE<"pckev.h", MipsPCKEV, MSA128HOpnd>;
2519 class PCKEV_W_DESC : MSA_3R_DESC_BASE<"pckev.w", MipsPCKEV, MSA128WOpnd>;
2520 class PCKEV_D_DESC : MSA_3R_DESC_BASE<"pckev.d", MipsPCKEV, MSA128DOpnd>;
2522 class PCKOD_B_DESC : MSA_3R_DESC_BASE<"pckod.b", MipsPCKOD, MSA128BOpnd>;
2523 class PCKOD_H_DESC : MSA_3R_DESC_BASE<"pckod.h", MipsPCKOD, MSA128HOpnd>;
2524 class PCKOD_W_DESC : MSA_3R_DESC_BASE<"pckod.w", MipsPCKOD, MSA128WOpnd>;
2525 class PCKOD_D_DESC : MSA_3R_DESC_BASE<"pckod.d", MipsPCKOD, MSA128DOpnd>;
2527 class PCNT_B_DESC : MSA_2R_DESC_BASE<"pcnt.b", ctpop, MSA128BOpnd>;
2528 class PCNT_H_DESC : MSA_2R_DESC_BASE<"pcnt.h", ctpop, MSA128HOpnd>;
2529 class PCNT_W_DESC : MSA_2R_DESC_BASE<"pcnt.w", ctpop, MSA128WOpnd>;
2530 class PCNT_D_DESC : MSA_2R_DESC_BASE<"pcnt.d", ctpop, MSA128DOpnd>;
2532 class SAT_S_B_DESC : MSA_BIT_X_DESC_BASE<"sat_s.b", int_mips_sat_s_b, uimm3,
2533 timmZExt3, MSA128BOpnd>;
2534 class SAT_S_H_DESC : MSA_BIT_X_DESC_BASE<"sat_s.h", int_mips_sat_s_h, uimm4,
2535 timmZExt4, MSA128HOpnd>;
2536 class SAT_S_W_DESC : MSA_BIT_X_DESC_BASE<"sat_s.w", int_mips_sat_s_w, uimm5,
2537 timmZExt5, MSA128WOpnd>;
2538 class SAT_S_D_DESC : MSA_BIT_X_DESC_BASE<"sat_s.d", int_mips_sat_s_d, uimm6,
2539 timmZExt6, MSA128DOpnd>;
2541 class SAT_U_B_DESC : MSA_BIT_X_DESC_BASE<"sat_u.b", int_mips_sat_u_b, uimm3,
2542 timmZExt3, MSA128BOpnd>;
2543 class SAT_U_H_DESC : MSA_BIT_X_DESC_BASE<"sat_u.h", int_mips_sat_u_h, uimm4,
2544 timmZExt4, MSA128HOpnd>;
2545 class SAT_U_W_DESC : MSA_BIT_X_DESC_BASE<"sat_u.w", int_mips_sat_u_w, uimm5,
2546 timmZExt5, MSA128WOpnd>;
2547 class SAT_U_D_DESC : MSA_BIT_X_DESC_BASE<"sat_u.d", int_mips_sat_u_d, uimm6,
2548 timmZExt6, MSA128DOpnd>;
2550 class SHF_B_DESC : MSA_I8_SHF_DESC_BASE<"shf.b", MSA128BOpnd>;
2551 class SHF_H_DESC : MSA_I8_SHF_DESC_BASE<"shf.h", MSA128HOpnd>;
2552 class SHF_W_DESC : MSA_I8_SHF_DESC_BASE<"shf.w", MSA128WOpnd>;
2554 class SLD_B_DESC : MSA_3R_SLD_DESC_BASE<"sld.b", int_mips_sld_b, MSA128BOpnd>;
2555 class SLD_H_DESC : MSA_3R_SLD_DESC_BASE<"sld.h", int_mips_sld_h, MSA128HOpnd>;
2556 class SLD_W_DESC : MSA_3R_SLD_DESC_BASE<"sld.w", int_mips_sld_w, MSA128WOpnd>;
2557 class SLD_D_DESC : MSA_3R_SLD_DESC_BASE<"sld.d", int_mips_sld_d, MSA128DOpnd>;
2559 class SLDI_B_DESC : MSA_ELM_SLD_DESC_BASE<"sldi.b", int_mips_sldi_b,
2560 MSA128BOpnd, MSA128BOpnd, uimm4,
2562 class SLDI_H_DESC : MSA_ELM_SLD_DESC_BASE<"sldi.h", int_mips_sldi_h,
2563 MSA128HOpnd, MSA128HOpnd, uimm3,
2565 class SLDI_W_DESC : MSA_ELM_SLD_DESC_BASE<"sldi.w", int_mips_sldi_w,
2566 MSA128WOpnd, MSA128WOpnd, uimm2,
2568 class SLDI_D_DESC : MSA_ELM_SLD_DESC_BASE<"sldi.d", int_mips_sldi_d,
2569 MSA128DOpnd, MSA128DOpnd, uimm1,
2572 class SLL_B_DESC : MSA_3R_DESC_BASE<"sll.b", shl, MSA128BOpnd>;
2573 class SLL_H_DESC : MSA_3R_DESC_BASE<"sll.h", shl, MSA128HOpnd>;
2574 class SLL_W_DESC : MSA_3R_DESC_BASE<"sll.w", shl, MSA128WOpnd>;
2575 class SLL_D_DESC : MSA_3R_DESC_BASE<"sll.d", shl, MSA128DOpnd>;
2577 class SLLI_B_DESC : MSA_BIT_SPLAT_DESC_BASE<"slli.b", shl, vsplati8_uimm3,
2579 class SLLI_H_DESC : MSA_BIT_SPLAT_DESC_BASE<"slli.h", shl, vsplati16_uimm4,
2581 class SLLI_W_DESC : MSA_BIT_SPLAT_DESC_BASE<"slli.w", shl, vsplati32_uimm5,
2583 class SLLI_D_DESC : MSA_BIT_SPLAT_DESC_BASE<"slli.d", shl, vsplati64_uimm6,
2586 class SPLAT_B_DESC : MSA_3R_SPLAT_DESC_BASE<"splat.b", vsplati8_elt,
2588 class SPLAT_H_DESC : MSA_3R_SPLAT_DESC_BASE<"splat.h", vsplati16_elt,
2590 class SPLAT_W_DESC : MSA_3R_SPLAT_DESC_BASE<"splat.w", vsplati32_elt,
2592 class SPLAT_D_DESC : MSA_3R_SPLAT_DESC_BASE<"splat.d", vsplati64_elt,
2595 class SPLATI_B_DESC : MSA_ELM_SPLAT_DESC_BASE<"splati.b", vsplati8_uimm4,
2597 class SPLATI_H_DESC : MSA_ELM_SPLAT_DESC_BASE<"splati.h", vsplati16_uimm3,
2599 class SPLATI_W_DESC : MSA_ELM_SPLAT_DESC_BASE<"splati.w", vsplati32_uimm2,
2601 class SPLATI_D_DESC : MSA_ELM_SPLAT_DESC_BASE<"splati.d", vsplati64_uimm1,
2604 class SRA_B_DESC : MSA_3R_DESC_BASE<"sra.b", sra, MSA128BOpnd>;
2605 class SRA_H_DESC : MSA_3R_DESC_BASE<"sra.h", sra, MSA128HOpnd>;
2606 class SRA_W_DESC : MSA_3R_DESC_BASE<"sra.w", sra, MSA128WOpnd>;
2607 class SRA_D_DESC : MSA_3R_DESC_BASE<"sra.d", sra, MSA128DOpnd>;
2609 class SRAI_B_DESC : MSA_BIT_SPLAT_DESC_BASE<"srai.b", sra, vsplati8_uimm3,
2611 class SRAI_H_DESC : MSA_BIT_SPLAT_DESC_BASE<"srai.h", sra, vsplati16_uimm4,
2613 class SRAI_W_DESC : MSA_BIT_SPLAT_DESC_BASE<"srai.w", sra, vsplati32_uimm5,
2615 class SRAI_D_DESC : MSA_BIT_SPLAT_DESC_BASE<"srai.d", sra, vsplati64_uimm6,
2618 class SRAR_B_DESC : MSA_3R_DESC_BASE<"srar.b", int_mips_srar_b, MSA128BOpnd>;
2619 class SRAR_H_DESC : MSA_3R_DESC_BASE<"srar.h", int_mips_srar_h, MSA128HOpnd>;
2620 class SRAR_W_DESC : MSA_3R_DESC_BASE<"srar.w", int_mips_srar_w, MSA128WOpnd>;
2621 class SRAR_D_DESC : MSA_3R_DESC_BASE<"srar.d", int_mips_srar_d, MSA128DOpnd>;
2623 class SRARI_B_DESC : MSA_BIT_X_DESC_BASE<"srari.b", int_mips_srari_b, uimm3,
2624 timmZExt3, MSA128BOpnd>;
2625 class SRARI_H_DESC : MSA_BIT_X_DESC_BASE<"srari.h", int_mips_srari_h, uimm4,
2626 timmZExt4, MSA128HOpnd>;
2627 class SRARI_W_DESC : MSA_BIT_X_DESC_BASE<"srari.w", int_mips_srari_w, uimm5,
2628 timmZExt5, MSA128WOpnd>;
2629 class SRARI_D_DESC : MSA_BIT_X_DESC_BASE<"srari.d", int_mips_srari_d, uimm6,
2630 timmZExt6, MSA128DOpnd>;
2632 class SRL_B_DESC : MSA_3R_DESC_BASE<"srl.b", srl, MSA128BOpnd>;
2633 class SRL_H_DESC : MSA_3R_DESC_BASE<"srl.h", srl, MSA128HOpnd>;
2634 class SRL_W_DESC : MSA_3R_DESC_BASE<"srl.w", srl, MSA128WOpnd>;
2635 class SRL_D_DESC : MSA_3R_DESC_BASE<"srl.d", srl, MSA128DOpnd>;
2637 class SRLI_B_DESC : MSA_BIT_SPLAT_DESC_BASE<"srli.b", srl, vsplati8_uimm3,
2639 class SRLI_H_DESC : MSA_BIT_SPLAT_DESC_BASE<"srli.h", srl, vsplati16_uimm4,
2641 class SRLI_W_DESC : MSA_BIT_SPLAT_DESC_BASE<"srli.w", srl, vsplati32_uimm5,
2643 class SRLI_D_DESC : MSA_BIT_SPLAT_DESC_BASE<"srli.d", srl, vsplati64_uimm6,
2646 class SRLR_B_DESC : MSA_3R_DESC_BASE<"srlr.b", int_mips_srlr_b, MSA128BOpnd>;
2647 class SRLR_H_DESC : MSA_3R_DESC_BASE<"srlr.h", int_mips_srlr_h, MSA128HOpnd>;
2648 class SRLR_W_DESC : MSA_3R_DESC_BASE<"srlr.w", int_mips_srlr_w, MSA128WOpnd>;
2649 class SRLR_D_DESC : MSA_3R_DESC_BASE<"srlr.d", int_mips_srlr_d, MSA128DOpnd>;
2651 class SRLRI_B_DESC : MSA_BIT_X_DESC_BASE<"srlri.b", int_mips_srlri_b, uimm3,
2652 timmZExt3, MSA128BOpnd>;
2653 class SRLRI_H_DESC : MSA_BIT_X_DESC_BASE<"srlri.h", int_mips_srlri_h, uimm4,
2654 timmZExt4, MSA128HOpnd>;
2655 class SRLRI_W_DESC : MSA_BIT_X_DESC_BASE<"srlri.w", int_mips_srlri_w, uimm5,
2656 timmZExt5, MSA128WOpnd>;
2657 class SRLRI_D_DESC : MSA_BIT_X_DESC_BASE<"srlri.d", int_mips_srlri_d, uimm6,
2658 timmZExt6, MSA128DOpnd>;
2660 class ST_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
2661 ValueType TyNode, RegisterOperand ROWD,
2662 Operand MemOpnd, ComplexPattern Addr = addrimm10,
2663 InstrItinClass itin = NoItinerary> {
2664 dag OutOperandList = (outs);
2665 dag InOperandList = (ins ROWD:$wd, MemOpnd:$addr);
2666 string AsmString = !strconcat(instr_asm, "\t$wd, $addr");
2667 list<dag> Pattern = [(OpNode (TyNode ROWD:$wd), Addr:$addr)];
2668 InstrItinClass Itinerary = itin;
2669 string DecoderMethod = "DecodeMSA128Mem";
2672 class ST_B_DESC : ST_DESC_BASE<"st.b", store, v16i8, MSA128BOpnd, mem_simm10>;
2673 class ST_H_DESC : ST_DESC_BASE<"st.h", store, v8i16, MSA128HOpnd,
2674 mem_simm10_lsl1, addrimm10lsl1>;
2675 class ST_W_DESC : ST_DESC_BASE<"st.w", store, v4i32, MSA128WOpnd,
2676 mem_simm10_lsl2, addrimm10lsl2>;
2677 class ST_D_DESC : ST_DESC_BASE<"st.d", store, v2i64, MSA128DOpnd,
2678 mem_simm10_lsl3, addrimm10lsl3>;
2680 class MSA_STORE_PSEUDO_BASE<SDPatternOperator intrinsic, RegisterOperand RO> :
2681 PseudoSE<(outs), (ins RO:$dst, PtrRC:$ptr, GPR32:$imm),
2682 [(intrinsic RO:$dst, iPTR:$ptr, GPR32:$imm)]> {
2683 let hasNoSchedulingInfo = 1;
2684 let usesCustomInserter = 1;
2687 def STR_D : MSA_STORE_PSEUDO_BASE<int_mips_str_d, MSA128DOpnd>;
2688 def STR_W : MSA_STORE_PSEUDO_BASE<int_mips_str_w, MSA128WOpnd>;
2690 class SUBS_S_B_DESC : MSA_3R_DESC_BASE<"subs_s.b", int_mips_subs_s_b,
2692 class SUBS_S_H_DESC : MSA_3R_DESC_BASE<"subs_s.h", int_mips_subs_s_h,
2694 class SUBS_S_W_DESC : MSA_3R_DESC_BASE<"subs_s.w", int_mips_subs_s_w,
2696 class SUBS_S_D_DESC : MSA_3R_DESC_BASE<"subs_s.d", int_mips_subs_s_d,
2699 class SUBS_U_B_DESC : MSA_3R_DESC_BASE<"subs_u.b", int_mips_subs_u_b,
2701 class SUBS_U_H_DESC : MSA_3R_DESC_BASE<"subs_u.h", int_mips_subs_u_h,
2703 class SUBS_U_W_DESC : MSA_3R_DESC_BASE<"subs_u.w", int_mips_subs_u_w,
2705 class SUBS_U_D_DESC : MSA_3R_DESC_BASE<"subs_u.d", int_mips_subs_u_d,
2708 class SUBSUS_U_B_DESC : MSA_3R_DESC_BASE<"subsus_u.b", int_mips_subsus_u_b,
2710 class SUBSUS_U_H_DESC : MSA_3R_DESC_BASE<"subsus_u.h", int_mips_subsus_u_h,
2712 class SUBSUS_U_W_DESC : MSA_3R_DESC_BASE<"subsus_u.w", int_mips_subsus_u_w,
2714 class SUBSUS_U_D_DESC : MSA_3R_DESC_BASE<"subsus_u.d", int_mips_subsus_u_d,
2717 class SUBSUU_S_B_DESC : MSA_3R_DESC_BASE<"subsuu_s.b", int_mips_subsuu_s_b,
2719 class SUBSUU_S_H_DESC : MSA_3R_DESC_BASE<"subsuu_s.h", int_mips_subsuu_s_h,
2721 class SUBSUU_S_W_DESC : MSA_3R_DESC_BASE<"subsuu_s.w", int_mips_subsuu_s_w,
2723 class SUBSUU_S_D_DESC : MSA_3R_DESC_BASE<"subsuu_s.d", int_mips_subsuu_s_d,
2726 class SUBV_B_DESC : MSA_3R_DESC_BASE<"subv.b", sub, MSA128BOpnd>;
2727 class SUBV_H_DESC : MSA_3R_DESC_BASE<"subv.h", sub, MSA128HOpnd>;
2728 class SUBV_W_DESC : MSA_3R_DESC_BASE<"subv.w", sub, MSA128WOpnd>;
2729 class SUBV_D_DESC : MSA_3R_DESC_BASE<"subv.d", sub, MSA128DOpnd>;
2731 class SUBVI_B_DESC : MSA_I5_DESC_BASE<"subvi.b", sub, vsplati8_uimm5,
2733 class SUBVI_H_DESC : MSA_I5_DESC_BASE<"subvi.h", sub, vsplati16_uimm5,
2735 class SUBVI_W_DESC : MSA_I5_DESC_BASE<"subvi.w", sub, vsplati32_uimm5,
2737 class SUBVI_D_DESC : MSA_I5_DESC_BASE<"subvi.d", sub, vsplati64_uimm5,
2740 class VSHF_B_DESC : MSA_3R_VSHF_DESC_BASE<"vshf.b", MSA128BOpnd>;
2741 class VSHF_H_DESC : MSA_3R_VSHF_DESC_BASE<"vshf.h", MSA128HOpnd>;
2742 class VSHF_W_DESC : MSA_3R_VSHF_DESC_BASE<"vshf.w", MSA128WOpnd>;
2743 class VSHF_D_DESC : MSA_3R_VSHF_DESC_BASE<"vshf.d", MSA128DOpnd>;
2745 class XOR_V_DESC : MSA_VEC_DESC_BASE<"xor.v", xor, MSA128BOpnd>;
2746 class XOR_V_H_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<xor, MSA128HOpnd>;
2747 class XOR_V_W_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<xor, MSA128WOpnd>;
2748 class XOR_V_D_PSEUDO_DESC : MSA_VEC_PSEUDO_BASE<xor, MSA128DOpnd>;
2750 class XORI_B_DESC : MSA_I8_DESC_BASE<"xori.b", xor, vsplati8_uimm8,
2753 // Instruction defs.
2754 def ADD_A_B : ADD_A_B_ENC, ADD_A_B_DESC;
2755 def ADD_A_H : ADD_A_H_ENC, ADD_A_H_DESC;
2756 def ADD_A_W : ADD_A_W_ENC, ADD_A_W_DESC;
2757 def ADD_A_D : ADD_A_D_ENC, ADD_A_D_DESC;
2759 def ADDS_A_B : ADDS_A_B_ENC, ADDS_A_B_DESC;
2760 def ADDS_A_H : ADDS_A_H_ENC, ADDS_A_H_DESC;
2761 def ADDS_A_W : ADDS_A_W_ENC, ADDS_A_W_DESC;
2762 def ADDS_A_D : ADDS_A_D_ENC, ADDS_A_D_DESC;
2764 def ADDS_S_B : ADDS_S_B_ENC, ADDS_S_B_DESC;
2765 def ADDS_S_H : ADDS_S_H_ENC, ADDS_S_H_DESC;
2766 def ADDS_S_W : ADDS_S_W_ENC, ADDS_S_W_DESC;
2767 def ADDS_S_D : ADDS_S_D_ENC, ADDS_S_D_DESC;
2769 def ADDS_U_B : ADDS_U_B_ENC, ADDS_U_B_DESC;
2770 def ADDS_U_H : ADDS_U_H_ENC, ADDS_U_H_DESC;
2771 def ADDS_U_W : ADDS_U_W_ENC, ADDS_U_W_DESC;
2772 def ADDS_U_D : ADDS_U_D_ENC, ADDS_U_D_DESC;
2774 def ADDV_B : ADDV_B_ENC, ADDV_B_DESC;
2775 def ADDV_H : ADDV_H_ENC, ADDV_H_DESC;
2776 def ADDV_W : ADDV_W_ENC, ADDV_W_DESC;
2777 def ADDV_D : ADDV_D_ENC, ADDV_D_DESC;
2779 def ADDVI_B : ADDVI_B_ENC, ADDVI_B_DESC;
2780 def ADDVI_H : ADDVI_H_ENC, ADDVI_H_DESC;
2781 def ADDVI_W : ADDVI_W_ENC, ADDVI_W_DESC;
2782 def ADDVI_D : ADDVI_D_ENC, ADDVI_D_DESC;
2784 def AND_V : AND_V_ENC, AND_V_DESC;
2785 def AND_V_H_PSEUDO : AND_V_H_PSEUDO_DESC,
2786 PseudoInstExpansion<(AND_V MSA128BOpnd:$wd,
2789 def AND_V_W_PSEUDO : AND_V_W_PSEUDO_DESC,
2790 PseudoInstExpansion<(AND_V MSA128BOpnd:$wd,
2793 def AND_V_D_PSEUDO : AND_V_D_PSEUDO_DESC,
2794 PseudoInstExpansion<(AND_V MSA128BOpnd:$wd,
2798 def ANDI_B : ANDI_B_ENC, ANDI_B_DESC;
2800 def ASUB_S_B : ASUB_S_B_ENC, ASUB_S_B_DESC;
2801 def ASUB_S_H : ASUB_S_H_ENC, ASUB_S_H_DESC;
2802 def ASUB_S_W : ASUB_S_W_ENC, ASUB_S_W_DESC;
2803 def ASUB_S_D : ASUB_S_D_ENC, ASUB_S_D_DESC;
2805 def ASUB_U_B : ASUB_U_B_ENC, ASUB_U_B_DESC;
2806 def ASUB_U_H : ASUB_U_H_ENC, ASUB_U_H_DESC;
2807 def ASUB_U_W : ASUB_U_W_ENC, ASUB_U_W_DESC;
2808 def ASUB_U_D : ASUB_U_D_ENC, ASUB_U_D_DESC;
2810 def AVE_S_B : AVE_S_B_ENC, AVE_S_B_DESC;
2811 def AVE_S_H : AVE_S_H_ENC, AVE_S_H_DESC;
2812 def AVE_S_W : AVE_S_W_ENC, AVE_S_W_DESC;
2813 def AVE_S_D : AVE_S_D_ENC, AVE_S_D_DESC;
2815 def AVE_U_B : AVE_U_B_ENC, AVE_U_B_DESC;
2816 def AVE_U_H : AVE_U_H_ENC, AVE_U_H_DESC;
2817 def AVE_U_W : AVE_U_W_ENC, AVE_U_W_DESC;
2818 def AVE_U_D : AVE_U_D_ENC, AVE_U_D_DESC;
2820 def AVER_S_B : AVER_S_B_ENC, AVER_S_B_DESC;
2821 def AVER_S_H : AVER_S_H_ENC, AVER_S_H_DESC;
2822 def AVER_S_W : AVER_S_W_ENC, AVER_S_W_DESC;
2823 def AVER_S_D : AVER_S_D_ENC, AVER_S_D_DESC;
2825 def AVER_U_B : AVER_U_B_ENC, AVER_U_B_DESC;
2826 def AVER_U_H : AVER_U_H_ENC, AVER_U_H_DESC;
2827 def AVER_U_W : AVER_U_W_ENC, AVER_U_W_DESC;
2828 def AVER_U_D : AVER_U_D_ENC, AVER_U_D_DESC;
2830 def BCLR_B : BCLR_B_ENC, BCLR_B_DESC;
2831 def BCLR_H : BCLR_H_ENC, BCLR_H_DESC;
2832 def BCLR_W : BCLR_W_ENC, BCLR_W_DESC;
2833 def BCLR_D : BCLR_D_ENC, BCLR_D_DESC;
2835 def BCLRI_B : BCLRI_B_ENC, BCLRI_B_DESC;
2836 def BCLRI_H : BCLRI_H_ENC, BCLRI_H_DESC;
2837 def BCLRI_W : BCLRI_W_ENC, BCLRI_W_DESC;
2838 def BCLRI_D : BCLRI_D_ENC, BCLRI_D_DESC;
2840 def BINSL_B : BINSL_B_ENC, BINSL_B_DESC;
2841 def BINSL_H : BINSL_H_ENC, BINSL_H_DESC;
2842 def BINSL_W : BINSL_W_ENC, BINSL_W_DESC;
2843 def BINSL_D : BINSL_D_ENC, BINSL_D_DESC;
2845 def BINSLI_B : BINSLI_B_ENC, BINSLI_B_DESC;
2846 def BINSLI_H : BINSLI_H_ENC, BINSLI_H_DESC;
2847 def BINSLI_W : BINSLI_W_ENC, BINSLI_W_DESC;
2848 def BINSLI_D : BINSLI_D_ENC, BINSLI_D_DESC;
2850 def BINSR_B : BINSR_B_ENC, BINSR_B_DESC;
2851 def BINSR_H : BINSR_H_ENC, BINSR_H_DESC;
2852 def BINSR_W : BINSR_W_ENC, BINSR_W_DESC;
2853 def BINSR_D : BINSR_D_ENC, BINSR_D_DESC;
2855 def BINSRI_B : BINSRI_B_ENC, BINSRI_B_DESC;
2856 def BINSRI_H : BINSRI_H_ENC, BINSRI_H_DESC;
2857 def BINSRI_W : BINSRI_W_ENC, BINSRI_W_DESC;
2858 def BINSRI_D : BINSRI_D_ENC, BINSRI_D_DESC;
2860 def BMNZ_V : BMNZ_V_ENC, BMNZ_V_DESC;
2862 def BMNZI_B : BMNZI_B_ENC, BMNZI_B_DESC;
2864 def BMZ_V : BMZ_V_ENC, BMZ_V_DESC;
2866 def BMZI_B : BMZI_B_ENC, BMZI_B_DESC;
2868 def BNEG_B : BNEG_B_ENC, BNEG_B_DESC;
2869 def BNEG_H : BNEG_H_ENC, BNEG_H_DESC;
2870 def BNEG_W : BNEG_W_ENC, BNEG_W_DESC;
2871 def BNEG_D : BNEG_D_ENC, BNEG_D_DESC;
2873 def BNEGI_B : BNEGI_B_ENC, BNEGI_B_DESC;
2874 def BNEGI_H : BNEGI_H_ENC, BNEGI_H_DESC;
2875 def BNEGI_W : BNEGI_W_ENC, BNEGI_W_DESC;
2876 def BNEGI_D : BNEGI_D_ENC, BNEGI_D_DESC;
2878 def BNZ_B : BNZ_B_ENC, BNZ_B_DESC;
2879 def BNZ_H : BNZ_H_ENC, BNZ_H_DESC;
2880 def BNZ_W : BNZ_W_ENC, BNZ_W_DESC;
2881 def BNZ_D : BNZ_D_ENC, BNZ_D_DESC;
2883 def BNZ_V : BNZ_V_ENC, BNZ_V_DESC;
2885 def BSEL_V : BSEL_V_ENC, BSEL_V_DESC;
2887 class MSA_BSEL_PSEUDO_BASE<RegisterOperand RO, ValueType Ty> :
2888 MSAPseudo<(outs RO:$wd), (ins RO:$wd_in, RO:$ws, RO:$wt),
2889 [(set RO:$wd, (Ty (vselect RO:$wd_in, RO:$wt, RO:$ws)))]>,
2890 // Note that vselect and BSEL_V treat the condition operand the opposite way
2892 // (vselect cond, if_set, if_clear)
2893 // (BSEL_V cond, if_clear, if_set)
2894 PseudoInstExpansion<(BSEL_V MSA128BOpnd:$wd, MSA128BOpnd:$wd_in,
2895 MSA128BOpnd:$ws, MSA128BOpnd:$wt)> {
2896 let Constraints = "$wd_in = $wd";
2899 def BSEL_H_PSEUDO : MSA_BSEL_PSEUDO_BASE<MSA128HOpnd, v8i16>;
2900 def BSEL_W_PSEUDO : MSA_BSEL_PSEUDO_BASE<MSA128WOpnd, v4i32>;
2901 def BSEL_D_PSEUDO : MSA_BSEL_PSEUDO_BASE<MSA128DOpnd, v2i64>;
2902 def BSEL_FW_PSEUDO : MSA_BSEL_PSEUDO_BASE<MSA128WOpnd, v4f32>;
2903 def BSEL_FD_PSEUDO : MSA_BSEL_PSEUDO_BASE<MSA128DOpnd, v2f64>;
2905 def BSELI_B : BSELI_B_ENC, BSELI_B_DESC;
2907 def BSET_B : BSET_B_ENC, BSET_B_DESC;
2908 def BSET_H : BSET_H_ENC, BSET_H_DESC;
2909 def BSET_W : BSET_W_ENC, BSET_W_DESC;
2910 def BSET_D : BSET_D_ENC, BSET_D_DESC;
2912 def BSETI_B : BSETI_B_ENC, BSETI_B_DESC;
2913 def BSETI_H : BSETI_H_ENC, BSETI_H_DESC;
2914 def BSETI_W : BSETI_W_ENC, BSETI_W_DESC;
2915 def BSETI_D : BSETI_D_ENC, BSETI_D_DESC;
2917 def BZ_B : BZ_B_ENC, BZ_B_DESC;
2918 def BZ_H : BZ_H_ENC, BZ_H_DESC;
2919 def BZ_W : BZ_W_ENC, BZ_W_DESC;
2920 def BZ_D : BZ_D_ENC, BZ_D_DESC;
2922 def BZ_V : BZ_V_ENC, BZ_V_DESC;
2924 def CEQ_B : CEQ_B_ENC, CEQ_B_DESC;
2925 def CEQ_H : CEQ_H_ENC, CEQ_H_DESC;
2926 def CEQ_W : CEQ_W_ENC, CEQ_W_DESC;
2927 def CEQ_D : CEQ_D_ENC, CEQ_D_DESC;
2929 def CEQI_B : CEQI_B_ENC, CEQI_B_DESC;
2930 def CEQI_H : CEQI_H_ENC, CEQI_H_DESC;
2931 def CEQI_W : CEQI_W_ENC, CEQI_W_DESC;
2932 def CEQI_D : CEQI_D_ENC, CEQI_D_DESC;
2934 def CFCMSA : CFCMSA_ENC, CFCMSA_DESC;
2936 def CLE_S_B : CLE_S_B_ENC, CLE_S_B_DESC;
2937 def CLE_S_H : CLE_S_H_ENC, CLE_S_H_DESC;
2938 def CLE_S_W : CLE_S_W_ENC, CLE_S_W_DESC;
2939 def CLE_S_D : CLE_S_D_ENC, CLE_S_D_DESC;
2941 def CLE_U_B : CLE_U_B_ENC, CLE_U_B_DESC;
2942 def CLE_U_H : CLE_U_H_ENC, CLE_U_H_DESC;
2943 def CLE_U_W : CLE_U_W_ENC, CLE_U_W_DESC;
2944 def CLE_U_D : CLE_U_D_ENC, CLE_U_D_DESC;
2946 def CLEI_S_B : CLEI_S_B_ENC, CLEI_S_B_DESC;
2947 def CLEI_S_H : CLEI_S_H_ENC, CLEI_S_H_DESC;
2948 def CLEI_S_W : CLEI_S_W_ENC, CLEI_S_W_DESC;
2949 def CLEI_S_D : CLEI_S_D_ENC, CLEI_S_D_DESC;
2951 def CLEI_U_B : CLEI_U_B_ENC, CLEI_U_B_DESC;
2952 def CLEI_U_H : CLEI_U_H_ENC, CLEI_U_H_DESC;
2953 def CLEI_U_W : CLEI_U_W_ENC, CLEI_U_W_DESC;
2954 def CLEI_U_D : CLEI_U_D_ENC, CLEI_U_D_DESC;
2956 def CLT_S_B : CLT_S_B_ENC, CLT_S_B_DESC;
2957 def CLT_S_H : CLT_S_H_ENC, CLT_S_H_DESC;
2958 def CLT_S_W : CLT_S_W_ENC, CLT_S_W_DESC;
2959 def CLT_S_D : CLT_S_D_ENC, CLT_S_D_DESC;
2961 def CLT_U_B : CLT_U_B_ENC, CLT_U_B_DESC;
2962 def CLT_U_H : CLT_U_H_ENC, CLT_U_H_DESC;
2963 def CLT_U_W : CLT_U_W_ENC, CLT_U_W_DESC;
2964 def CLT_U_D : CLT_U_D_ENC, CLT_U_D_DESC;
2966 def CLTI_S_B : CLTI_S_B_ENC, CLTI_S_B_DESC;
2967 def CLTI_S_H : CLTI_S_H_ENC, CLTI_S_H_DESC;
2968 def CLTI_S_W : CLTI_S_W_ENC, CLTI_S_W_DESC;
2969 def CLTI_S_D : CLTI_S_D_ENC, CLTI_S_D_DESC;
2971 def CLTI_U_B : CLTI_U_B_ENC, CLTI_U_B_DESC;
2972 def CLTI_U_H : CLTI_U_H_ENC, CLTI_U_H_DESC;
2973 def CLTI_U_W : CLTI_U_W_ENC, CLTI_U_W_DESC;
2974 def CLTI_U_D : CLTI_U_D_ENC, CLTI_U_D_DESC;
2976 def COPY_S_B : COPY_S_B_ENC, COPY_S_B_DESC;
2977 def COPY_S_H : COPY_S_H_ENC, COPY_S_H_DESC;
2978 def COPY_S_W : COPY_S_W_ENC, COPY_S_W_DESC;
2979 def COPY_S_D : COPY_S_D_ENC, COPY_S_D_DESC, ASE_MSA64;
2981 def COPY_U_B : COPY_U_B_ENC, COPY_U_B_DESC;
2982 def COPY_U_H : COPY_U_H_ENC, COPY_U_H_DESC;
2983 def COPY_U_W : COPY_U_W_ENC, COPY_U_W_DESC, ASE_MSA64;
2985 def COPY_FW_PSEUDO : COPY_FW_PSEUDO_DESC;
2986 def COPY_FD_PSEUDO : COPY_FD_PSEUDO_DESC;
2988 def CTCMSA : CTCMSA_ENC, CTCMSA_DESC;
2990 def DIV_S_B : DIV_S_B_ENC, DIV_S_B_DESC;
2991 def DIV_S_H : DIV_S_H_ENC, DIV_S_H_DESC;
2992 def DIV_S_W : DIV_S_W_ENC, DIV_S_W_DESC;
2993 def DIV_S_D : DIV_S_D_ENC, DIV_S_D_DESC;
2995 def DIV_U_B : DIV_U_B_ENC, DIV_U_B_DESC;
2996 def DIV_U_H : DIV_U_H_ENC, DIV_U_H_DESC;
2997 def DIV_U_W : DIV_U_W_ENC, DIV_U_W_DESC;
2998 def DIV_U_D : DIV_U_D_ENC, DIV_U_D_DESC;
3000 def DOTP_S_H : DOTP_S_H_ENC, DOTP_S_H_DESC;
3001 def DOTP_S_W : DOTP_S_W_ENC, DOTP_S_W_DESC;
3002 def DOTP_S_D : DOTP_S_D_ENC, DOTP_S_D_DESC;
3004 def DOTP_U_H : DOTP_U_H_ENC, DOTP_U_H_DESC;
3005 def DOTP_U_W : DOTP_U_W_ENC, DOTP_U_W_DESC;
3006 def DOTP_U_D : DOTP_U_D_ENC, DOTP_U_D_DESC;
3008 def DPADD_S_H : DPADD_S_H_ENC, DPADD_S_H_DESC;
3009 def DPADD_S_W : DPADD_S_W_ENC, DPADD_S_W_DESC;
3010 def DPADD_S_D : DPADD_S_D_ENC, DPADD_S_D_DESC;
3012 def DPADD_U_H : DPADD_U_H_ENC, DPADD_U_H_DESC;
3013 def DPADD_U_W : DPADD_U_W_ENC, DPADD_U_W_DESC;
3014 def DPADD_U_D : DPADD_U_D_ENC, DPADD_U_D_DESC;
3016 def DPSUB_S_H : DPSUB_S_H_ENC, DPSUB_S_H_DESC;
3017 def DPSUB_S_W : DPSUB_S_W_ENC, DPSUB_S_W_DESC;
3018 def DPSUB_S_D : DPSUB_S_D_ENC, DPSUB_S_D_DESC;
3020 def DPSUB_U_H : DPSUB_U_H_ENC, DPSUB_U_H_DESC;
3021 def DPSUB_U_W : DPSUB_U_W_ENC, DPSUB_U_W_DESC;
3022 def DPSUB_U_D : DPSUB_U_D_ENC, DPSUB_U_D_DESC;
3024 def FADD_W : FADD_W_ENC, FADD_W_DESC;
3025 def FADD_D : FADD_D_ENC, FADD_D_DESC;
3027 def FCAF_W : FCAF_W_ENC, FCAF_W_DESC;
3028 def FCAF_D : FCAF_D_ENC, FCAF_D_DESC;
3030 def FCEQ_W : FCEQ_W_ENC, FCEQ_W_DESC;
3031 def FCEQ_D : FCEQ_D_ENC, FCEQ_D_DESC;
3033 def FCLE_W : FCLE_W_ENC, FCLE_W_DESC;
3034 def FCLE_D : FCLE_D_ENC, FCLE_D_DESC;
3036 def FCLT_W : FCLT_W_ENC, FCLT_W_DESC;
3037 def FCLT_D : FCLT_D_ENC, FCLT_D_DESC;
3039 def FCLASS_W : FCLASS_W_ENC, FCLASS_W_DESC;
3040 def FCLASS_D : FCLASS_D_ENC, FCLASS_D_DESC;
3042 def FCNE_W : FCNE_W_ENC, FCNE_W_DESC;
3043 def FCNE_D : FCNE_D_ENC, FCNE_D_DESC;
3045 def FCOR_W : FCOR_W_ENC, FCOR_W_DESC;
3046 def FCOR_D : FCOR_D_ENC, FCOR_D_DESC;
3048 def FCUEQ_W : FCUEQ_W_ENC, FCUEQ_W_DESC;
3049 def FCUEQ_D : FCUEQ_D_ENC, FCUEQ_D_DESC;
3051 def FCULE_W : FCULE_W_ENC, FCULE_W_DESC;
3052 def FCULE_D : FCULE_D_ENC, FCULE_D_DESC;
3054 def FCULT_W : FCULT_W_ENC, FCULT_W_DESC;
3055 def FCULT_D : FCULT_D_ENC, FCULT_D_DESC;
3057 def FCUN_W : FCUN_W_ENC, FCUN_W_DESC;
3058 def FCUN_D : FCUN_D_ENC, FCUN_D_DESC;
3060 def FCUNE_W : FCUNE_W_ENC, FCUNE_W_DESC;
3061 def FCUNE_D : FCUNE_D_ENC, FCUNE_D_DESC;
3063 def FDIV_W : FDIV_W_ENC, FDIV_W_DESC;
3064 def FDIV_D : FDIV_D_ENC, FDIV_D_DESC;
3066 def FEXDO_H : FEXDO_H_ENC, FEXDO_H_DESC;
3067 def FEXDO_W : FEXDO_W_ENC, FEXDO_W_DESC;
3069 def FEXP2_W : FEXP2_W_ENC, FEXP2_W_DESC;
3070 def FEXP2_D : FEXP2_D_ENC, FEXP2_D_DESC;
3071 def FEXP2_W_1_PSEUDO : FEXP2_W_1_PSEUDO_DESC;
3072 def FEXP2_D_1_PSEUDO : FEXP2_D_1_PSEUDO_DESC;
3074 def FEXUPL_W : FEXUPL_W_ENC, FEXUPL_W_DESC;
3075 def FEXUPL_D : FEXUPL_D_ENC, FEXUPL_D_DESC;
3077 def FEXUPR_W : FEXUPR_W_ENC, FEXUPR_W_DESC;
3078 def FEXUPR_D : FEXUPR_D_ENC, FEXUPR_D_DESC;
3080 def FFINT_S_W : FFINT_S_W_ENC, FFINT_S_W_DESC;
3081 def FFINT_S_D : FFINT_S_D_ENC, FFINT_S_D_DESC;
3083 def FFINT_U_W : FFINT_U_W_ENC, FFINT_U_W_DESC;
3084 def FFINT_U_D : FFINT_U_D_ENC, FFINT_U_D_DESC;
3086 def FFQL_W : FFQL_W_ENC, FFQL_W_DESC;
3087 def FFQL_D : FFQL_D_ENC, FFQL_D_DESC;
3089 def FFQR_W : FFQR_W_ENC, FFQR_W_DESC;
3090 def FFQR_D : FFQR_D_ENC, FFQR_D_DESC;
3092 def FILL_B : FILL_B_ENC, FILL_B_DESC;
3093 def FILL_H : FILL_H_ENC, FILL_H_DESC;
3094 def FILL_W : FILL_W_ENC, FILL_W_DESC;
3095 def FILL_D : FILL_D_ENC, FILL_D_DESC, ASE_MSA64;
3096 def FILL_FW_PSEUDO : FILL_FW_PSEUDO_DESC;
3097 def FILL_FD_PSEUDO : FILL_FD_PSEUDO_DESC;
3099 def FLOG2_W : FLOG2_W_ENC, FLOG2_W_DESC;
3100 def FLOG2_D : FLOG2_D_ENC, FLOG2_D_DESC;
3102 def FMADD_W : FMADD_W_ENC, FMADD_W_DESC;
3103 def FMADD_D : FMADD_D_ENC, FMADD_D_DESC;
3105 def FMAX_W : FMAX_W_ENC, FMAX_W_DESC;
3106 def FMAX_D : FMAX_D_ENC, FMAX_D_DESC;
3108 def FMAX_A_W : FMAX_A_W_ENC, FMAX_A_W_DESC;
3109 def FMAX_A_D : FMAX_A_D_ENC, FMAX_A_D_DESC;
3111 def FMIN_W : FMIN_W_ENC, FMIN_W_DESC;
3112 def FMIN_D : FMIN_D_ENC, FMIN_D_DESC;
3114 def FMIN_A_W : FMIN_A_W_ENC, FMIN_A_W_DESC;
3115 def FMIN_A_D : FMIN_A_D_ENC, FMIN_A_D_DESC;
3117 def FMSUB_W : FMSUB_W_ENC, FMSUB_W_DESC;
3118 def FMSUB_D : FMSUB_D_ENC, FMSUB_D_DESC;
3120 def FMUL_W : FMUL_W_ENC, FMUL_W_DESC;
3121 def FMUL_D : FMUL_D_ENC, FMUL_D_DESC;
3123 def FRINT_W : FRINT_W_ENC, FRINT_W_DESC;
3124 def FRINT_D : FRINT_D_ENC, FRINT_D_DESC;
3126 def FRCP_W : FRCP_W_ENC, FRCP_W_DESC;
3127 def FRCP_D : FRCP_D_ENC, FRCP_D_DESC;
3129 def FRSQRT_W : FRSQRT_W_ENC, FRSQRT_W_DESC;
3130 def FRSQRT_D : FRSQRT_D_ENC, FRSQRT_D_DESC;
3132 def FSAF_W : FSAF_W_ENC, FSAF_W_DESC;
3133 def FSAF_D : FSAF_D_ENC, FSAF_D_DESC;
3135 def FSEQ_W : FSEQ_W_ENC, FSEQ_W_DESC;
3136 def FSEQ_D : FSEQ_D_ENC, FSEQ_D_DESC;
3138 def FSLE_W : FSLE_W_ENC, FSLE_W_DESC;
3139 def FSLE_D : FSLE_D_ENC, FSLE_D_DESC;
3141 def FSLT_W : FSLT_W_ENC, FSLT_W_DESC;
3142 def FSLT_D : FSLT_D_ENC, FSLT_D_DESC;
3144 def FSNE_W : FSNE_W_ENC, FSNE_W_DESC;
3145 def FSNE_D : FSNE_D_ENC, FSNE_D_DESC;
3147 def FSOR_W : FSOR_W_ENC, FSOR_W_DESC;
3148 def FSOR_D : FSOR_D_ENC, FSOR_D_DESC;
3150 def FSQRT_W : FSQRT_W_ENC, FSQRT_W_DESC;
3151 def FSQRT_D : FSQRT_D_ENC, FSQRT_D_DESC;
3153 def FSUB_W : FSUB_W_ENC, FSUB_W_DESC;
3154 def FSUB_D : FSUB_D_ENC, FSUB_D_DESC;
3156 def FSUEQ_W : FSUEQ_W_ENC, FSUEQ_W_DESC;
3157 def FSUEQ_D : FSUEQ_D_ENC, FSUEQ_D_DESC;
3159 def FSULE_W : FSULE_W_ENC, FSULE_W_DESC;
3160 def FSULE_D : FSULE_D_ENC, FSULE_D_DESC;
3162 def FSULT_W : FSULT_W_ENC, FSULT_W_DESC;
3163 def FSULT_D : FSULT_D_ENC, FSULT_D_DESC;
3165 def FSUN_W : FSUN_W_ENC, FSUN_W_DESC;
3166 def FSUN_D : FSUN_D_ENC, FSUN_D_DESC;
3168 def FSUNE_W : FSUNE_W_ENC, FSUNE_W_DESC;
3169 def FSUNE_D : FSUNE_D_ENC, FSUNE_D_DESC;
3171 def FTINT_S_W : FTINT_S_W_ENC, FTINT_S_W_DESC;
3172 def FTINT_S_D : FTINT_S_D_ENC, FTINT_S_D_DESC;
3174 def FTINT_U_W : FTINT_U_W_ENC, FTINT_U_W_DESC;
3175 def FTINT_U_D : FTINT_U_D_ENC, FTINT_U_D_DESC;
3177 def FTQ_H : FTQ_H_ENC, FTQ_H_DESC;
3178 def FTQ_W : FTQ_W_ENC, FTQ_W_DESC;
3180 def FTRUNC_S_W : FTRUNC_S_W_ENC, FTRUNC_S_W_DESC;
3181 def FTRUNC_S_D : FTRUNC_S_D_ENC, FTRUNC_S_D_DESC;
3183 def FTRUNC_U_W : FTRUNC_U_W_ENC, FTRUNC_U_W_DESC;
3184 def FTRUNC_U_D : FTRUNC_U_D_ENC, FTRUNC_U_D_DESC;
3186 def : MipsPat<(fsub MSA128WOpnd:$wd, (fmul MSA128WOpnd:$ws, MSA128WOpnd:$wt)),
3187 (FMSUB_W MSA128WOpnd:$wd, MSA128WOpnd:$ws, MSA128WOpnd:$wt)>,
3188 ISA_MIPS1, ASE_MSA, FPOP_FUSION_FAST;
3189 def : MipsPat<(fsub MSA128DOpnd:$wd, (fmul MSA128DOpnd:$ws, MSA128DOpnd:$wt)),
3190 (FMSUB_D MSA128DOpnd:$wd, MSA128DOpnd:$ws, MSA128DOpnd:$wt)>,
3191 ISA_MIPS1, ASE_MSA, FPOP_FUSION_FAST;
3193 def : MipsPat<(fadd MSA128WOpnd:$wd, (fmul MSA128WOpnd:$ws, MSA128WOpnd:$wt)),
3194 (FMADD_W MSA128WOpnd:$wd, MSA128WOpnd:$ws, MSA128WOpnd:$wt)>,
3195 ISA_MIPS1, ASE_MSA, FPOP_FUSION_FAST;
3196 def : MipsPat<(fadd MSA128DOpnd:$wd, (fmul MSA128DOpnd:$ws, MSA128DOpnd:$wt)),
3197 (FMADD_D MSA128DOpnd:$wd, MSA128DOpnd:$ws, MSA128DOpnd:$wt)>,
3198 ISA_MIPS1, ASE_MSA, FPOP_FUSION_FAST;
3200 def HADD_S_H : HADD_S_H_ENC, HADD_S_H_DESC;
3201 def HADD_S_W : HADD_S_W_ENC, HADD_S_W_DESC;
3202 def HADD_S_D : HADD_S_D_ENC, HADD_S_D_DESC;
3204 def HADD_U_H : HADD_U_H_ENC, HADD_U_H_DESC;
3205 def HADD_U_W : HADD_U_W_ENC, HADD_U_W_DESC;
3206 def HADD_U_D : HADD_U_D_ENC, HADD_U_D_DESC;
3208 def HSUB_S_H : HSUB_S_H_ENC, HSUB_S_H_DESC;
3209 def HSUB_S_W : HSUB_S_W_ENC, HSUB_S_W_DESC;
3210 def HSUB_S_D : HSUB_S_D_ENC, HSUB_S_D_DESC;
3212 def HSUB_U_H : HSUB_U_H_ENC, HSUB_U_H_DESC;
3213 def HSUB_U_W : HSUB_U_W_ENC, HSUB_U_W_DESC;
3214 def HSUB_U_D : HSUB_U_D_ENC, HSUB_U_D_DESC;
3216 def ILVEV_B : ILVEV_B_ENC, ILVEV_B_DESC;
3217 def ILVEV_H : ILVEV_H_ENC, ILVEV_H_DESC;
3218 def ILVEV_W : ILVEV_W_ENC, ILVEV_W_DESC;
3219 def ILVEV_D : ILVEV_D_ENC, ILVEV_D_DESC;
3221 def ILVL_B : ILVL_B_ENC, ILVL_B_DESC;
3222 def ILVL_H : ILVL_H_ENC, ILVL_H_DESC;
3223 def ILVL_W : ILVL_W_ENC, ILVL_W_DESC;
3224 def ILVL_D : ILVL_D_ENC, ILVL_D_DESC;
3226 def ILVOD_B : ILVOD_B_ENC, ILVOD_B_DESC;
3227 def ILVOD_H : ILVOD_H_ENC, ILVOD_H_DESC;
3228 def ILVOD_W : ILVOD_W_ENC, ILVOD_W_DESC;
3229 def ILVOD_D : ILVOD_D_ENC, ILVOD_D_DESC;
3231 def ILVR_B : ILVR_B_ENC, ILVR_B_DESC;
3232 def ILVR_H : ILVR_H_ENC, ILVR_H_DESC;
3233 def ILVR_W : ILVR_W_ENC, ILVR_W_DESC;
3234 def ILVR_D : ILVR_D_ENC, ILVR_D_DESC;
3236 def INSERT_B : INSERT_B_ENC, INSERT_B_DESC;
3237 def INSERT_H : INSERT_H_ENC, INSERT_H_DESC;
3238 def INSERT_W : INSERT_W_ENC, INSERT_W_DESC;
3239 def INSERT_D : INSERT_D_ENC, INSERT_D_DESC, ASE_MSA64;
3241 // INSERT_FW_PSEUDO defined after INSVE_W
3242 // INSERT_FD_PSEUDO defined after INSVE_D
3244 // There is a fourth operand that is not present in the encoding. Use a
3245 // custom decoder to get a chance to add it.
3246 let DecoderMethod = "DecodeINSVE_DF" in {
3247 def INSVE_B : INSVE_B_ENC, INSVE_B_DESC;
3248 def INSVE_H : INSVE_H_ENC, INSVE_H_DESC;
3249 def INSVE_W : INSVE_W_ENC, INSVE_W_DESC;
3250 def INSVE_D : INSVE_D_ENC, INSVE_D_DESC;
3253 def INSERT_FW_PSEUDO : INSERT_FW_PSEUDO_DESC;
3254 def INSERT_FD_PSEUDO : INSERT_FD_PSEUDO_DESC;
3256 def INSERT_B_VIDX_PSEUDO : INSERT_B_VIDX_PSEUDO_DESC;
3257 def INSERT_H_VIDX_PSEUDO : INSERT_H_VIDX_PSEUDO_DESC;
3258 def INSERT_W_VIDX_PSEUDO : INSERT_W_VIDX_PSEUDO_DESC;
3259 def INSERT_D_VIDX_PSEUDO : INSERT_D_VIDX_PSEUDO_DESC;
3260 def INSERT_FW_VIDX_PSEUDO : INSERT_FW_VIDX_PSEUDO_DESC;
3261 def INSERT_FD_VIDX_PSEUDO : INSERT_FD_VIDX_PSEUDO_DESC;
3263 def INSERT_B_VIDX64_PSEUDO : INSERT_B_VIDX64_PSEUDO_DESC;
3264 def INSERT_H_VIDX64_PSEUDO : INSERT_H_VIDX64_PSEUDO_DESC;
3265 def INSERT_W_VIDX64_PSEUDO : INSERT_W_VIDX64_PSEUDO_DESC;
3266 def INSERT_D_VIDX64_PSEUDO : INSERT_D_VIDX64_PSEUDO_DESC;
3267 def INSERT_FW_VIDX64_PSEUDO : INSERT_FW_VIDX64_PSEUDO_DESC;
3268 def INSERT_FD_VIDX64_PSEUDO : INSERT_FD_VIDX64_PSEUDO_DESC;
3270 def LD_B: LD_B_ENC, LD_B_DESC;
3271 def LD_H: LD_H_ENC, LD_H_DESC;
3272 def LD_W: LD_W_ENC, LD_W_DESC;
3273 def LD_D: LD_D_ENC, LD_D_DESC;
3275 def LDI_B : LDI_B_ENC, LDI_B_DESC;
3276 def LDI_H : LDI_H_ENC, LDI_H_DESC;
3277 def LDI_W : LDI_W_ENC, LDI_W_DESC;
3278 def LDI_D : LDI_D_ENC, LDI_D_DESC;
3280 def LSA : LSA_ENC, LSA_DESC;
3281 def DLSA : DLSA_ENC, DLSA_DESC, ASE_MSA64;
3283 def MADD_Q_H : MADD_Q_H_ENC, MADD_Q_H_DESC;
3284 def MADD_Q_W : MADD_Q_W_ENC, MADD_Q_W_DESC;
3286 def MADDR_Q_H : MADDR_Q_H_ENC, MADDR_Q_H_DESC;
3287 def MADDR_Q_W : MADDR_Q_W_ENC, MADDR_Q_W_DESC;
3289 def MADDV_B : MADDV_B_ENC, MADDV_B_DESC;
3290 def MADDV_H : MADDV_H_ENC, MADDV_H_DESC;
3291 def MADDV_W : MADDV_W_ENC, MADDV_W_DESC;
3292 def MADDV_D : MADDV_D_ENC, MADDV_D_DESC;
3294 def MAX_A_B : MAX_A_B_ENC, MAX_A_B_DESC;
3295 def MAX_A_H : MAX_A_H_ENC, MAX_A_H_DESC;
3296 def MAX_A_W : MAX_A_W_ENC, MAX_A_W_DESC;
3297 def MAX_A_D : MAX_A_D_ENC, MAX_A_D_DESC;
3299 def MAX_S_B : MAX_S_B_ENC, MAX_S_B_DESC;
3300 def MAX_S_H : MAX_S_H_ENC, MAX_S_H_DESC;
3301 def MAX_S_W : MAX_S_W_ENC, MAX_S_W_DESC;
3302 def MAX_S_D : MAX_S_D_ENC, MAX_S_D_DESC;
3304 def MAX_U_B : MAX_U_B_ENC, MAX_U_B_DESC;
3305 def MAX_U_H : MAX_U_H_ENC, MAX_U_H_DESC;
3306 def MAX_U_W : MAX_U_W_ENC, MAX_U_W_DESC;
3307 def MAX_U_D : MAX_U_D_ENC, MAX_U_D_DESC;
3309 def MAXI_S_B : MAXI_S_B_ENC, MAXI_S_B_DESC;
3310 def MAXI_S_H : MAXI_S_H_ENC, MAXI_S_H_DESC;
3311 def MAXI_S_W : MAXI_S_W_ENC, MAXI_S_W_DESC;
3312 def MAXI_S_D : MAXI_S_D_ENC, MAXI_S_D_DESC;
3314 def MAXI_U_B : MAXI_U_B_ENC, MAXI_U_B_DESC;
3315 def MAXI_U_H : MAXI_U_H_ENC, MAXI_U_H_DESC;
3316 def MAXI_U_W : MAXI_U_W_ENC, MAXI_U_W_DESC;
3317 def MAXI_U_D : MAXI_U_D_ENC, MAXI_U_D_DESC;
3319 def MIN_A_B : MIN_A_B_ENC, MIN_A_B_DESC;
3320 def MIN_A_H : MIN_A_H_ENC, MIN_A_H_DESC;
3321 def MIN_A_W : MIN_A_W_ENC, MIN_A_W_DESC;
3322 def MIN_A_D : MIN_A_D_ENC, MIN_A_D_DESC;
3324 def MIN_S_B : MIN_S_B_ENC, MIN_S_B_DESC;
3325 def MIN_S_H : MIN_S_H_ENC, MIN_S_H_DESC;
3326 def MIN_S_W : MIN_S_W_ENC, MIN_S_W_DESC;
3327 def MIN_S_D : MIN_S_D_ENC, MIN_S_D_DESC;
3329 def MIN_U_B : MIN_U_B_ENC, MIN_U_B_DESC;
3330 def MIN_U_H : MIN_U_H_ENC, MIN_U_H_DESC;
3331 def MIN_U_W : MIN_U_W_ENC, MIN_U_W_DESC;
3332 def MIN_U_D : MIN_U_D_ENC, MIN_U_D_DESC;
3334 def MINI_S_B : MINI_S_B_ENC, MINI_S_B_DESC;
3335 def MINI_S_H : MINI_S_H_ENC, MINI_S_H_DESC;
3336 def MINI_S_W : MINI_S_W_ENC, MINI_S_W_DESC;
3337 def MINI_S_D : MINI_S_D_ENC, MINI_S_D_DESC;
3339 def MINI_U_B : MINI_U_B_ENC, MINI_U_B_DESC;
3340 def MINI_U_H : MINI_U_H_ENC, MINI_U_H_DESC;
3341 def MINI_U_W : MINI_U_W_ENC, MINI_U_W_DESC;
3342 def MINI_U_D : MINI_U_D_ENC, MINI_U_D_DESC;
3344 def MOD_S_B : MOD_S_B_ENC, MOD_S_B_DESC;
3345 def MOD_S_H : MOD_S_H_ENC, MOD_S_H_DESC;
3346 def MOD_S_W : MOD_S_W_ENC, MOD_S_W_DESC;
3347 def MOD_S_D : MOD_S_D_ENC, MOD_S_D_DESC;
3349 def MOD_U_B : MOD_U_B_ENC, MOD_U_B_DESC;
3350 def MOD_U_H : MOD_U_H_ENC, MOD_U_H_DESC;
3351 def MOD_U_W : MOD_U_W_ENC, MOD_U_W_DESC;
3352 def MOD_U_D : MOD_U_D_ENC, MOD_U_D_DESC;
3354 def MOVE_V : MOVE_V_ENC, MOVE_V_DESC;
3356 def MSUB_Q_H : MSUB_Q_H_ENC, MSUB_Q_H_DESC;
3357 def MSUB_Q_W : MSUB_Q_W_ENC, MSUB_Q_W_DESC;
3359 def MSUBR_Q_H : MSUBR_Q_H_ENC, MSUBR_Q_H_DESC;
3360 def MSUBR_Q_W : MSUBR_Q_W_ENC, MSUBR_Q_W_DESC;
3362 def MSUBV_B : MSUBV_B_ENC, MSUBV_B_DESC;
3363 def MSUBV_H : MSUBV_H_ENC, MSUBV_H_DESC;
3364 def MSUBV_W : MSUBV_W_ENC, MSUBV_W_DESC;
3365 def MSUBV_D : MSUBV_D_ENC, MSUBV_D_DESC;
3367 def MUL_Q_H : MUL_Q_H_ENC, MUL_Q_H_DESC;
3368 def MUL_Q_W : MUL_Q_W_ENC, MUL_Q_W_DESC;
3370 def MULR_Q_H : MULR_Q_H_ENC, MULR_Q_H_DESC;
3371 def MULR_Q_W : MULR_Q_W_ENC, MULR_Q_W_DESC;
3373 def MULV_B : MULV_B_ENC, MULV_B_DESC;
3374 def MULV_H : MULV_H_ENC, MULV_H_DESC;
3375 def MULV_W : MULV_W_ENC, MULV_W_DESC;
3376 def MULV_D : MULV_D_ENC, MULV_D_DESC;
3378 def NLOC_B : NLOC_B_ENC, NLOC_B_DESC;
3379 def NLOC_H : NLOC_H_ENC, NLOC_H_DESC;
3380 def NLOC_W : NLOC_W_ENC, NLOC_W_DESC;
3381 def NLOC_D : NLOC_D_ENC, NLOC_D_DESC;
3383 def NLZC_B : NLZC_B_ENC, NLZC_B_DESC;
3384 def NLZC_H : NLZC_H_ENC, NLZC_H_DESC;
3385 def NLZC_W : NLZC_W_ENC, NLZC_W_DESC;
3386 def NLZC_D : NLZC_D_ENC, NLZC_D_DESC;
3388 def NOR_V : NOR_V_ENC, NOR_V_DESC;
3389 def NOR_V_H_PSEUDO : NOR_V_H_PSEUDO_DESC,
3390 PseudoInstExpansion<(NOR_V MSA128BOpnd:$wd,
3393 def NOR_V_W_PSEUDO : NOR_V_W_PSEUDO_DESC,
3394 PseudoInstExpansion<(NOR_V MSA128BOpnd:$wd,
3397 def NOR_V_D_PSEUDO : NOR_V_D_PSEUDO_DESC,
3398 PseudoInstExpansion<(NOR_V MSA128BOpnd:$wd,
3402 def NORI_B : NORI_B_ENC, NORI_B_DESC;
3404 def OR_V : OR_V_ENC, OR_V_DESC;
3405 def OR_V_H_PSEUDO : OR_V_H_PSEUDO_DESC,
3406 PseudoInstExpansion<(OR_V MSA128BOpnd:$wd,
3409 def OR_V_W_PSEUDO : OR_V_W_PSEUDO_DESC,
3410 PseudoInstExpansion<(OR_V MSA128BOpnd:$wd,
3413 def OR_V_D_PSEUDO : OR_V_D_PSEUDO_DESC,
3414 PseudoInstExpansion<(OR_V MSA128BOpnd:$wd,
3418 def ORI_B : ORI_B_ENC, ORI_B_DESC;
3420 def PCKEV_B : PCKEV_B_ENC, PCKEV_B_DESC;
3421 def PCKEV_H : PCKEV_H_ENC, PCKEV_H_DESC;
3422 def PCKEV_W : PCKEV_W_ENC, PCKEV_W_DESC;
3423 def PCKEV_D : PCKEV_D_ENC, PCKEV_D_DESC;
3425 def PCKOD_B : PCKOD_B_ENC, PCKOD_B_DESC;
3426 def PCKOD_H : PCKOD_H_ENC, PCKOD_H_DESC;
3427 def PCKOD_W : PCKOD_W_ENC, PCKOD_W_DESC;
3428 def PCKOD_D : PCKOD_D_ENC, PCKOD_D_DESC;
3430 def PCNT_B : PCNT_B_ENC, PCNT_B_DESC;
3431 def PCNT_H : PCNT_H_ENC, PCNT_H_DESC;
3432 def PCNT_W : PCNT_W_ENC, PCNT_W_DESC;
3433 def PCNT_D : PCNT_D_ENC, PCNT_D_DESC;
3435 def SAT_S_B : SAT_S_B_ENC, SAT_S_B_DESC;
3436 def SAT_S_H : SAT_S_H_ENC, SAT_S_H_DESC;
3437 def SAT_S_W : SAT_S_W_ENC, SAT_S_W_DESC;
3438 def SAT_S_D : SAT_S_D_ENC, SAT_S_D_DESC;
3440 def SAT_U_B : SAT_U_B_ENC, SAT_U_B_DESC;
3441 def SAT_U_H : SAT_U_H_ENC, SAT_U_H_DESC;
3442 def SAT_U_W : SAT_U_W_ENC, SAT_U_W_DESC;
3443 def SAT_U_D : SAT_U_D_ENC, SAT_U_D_DESC;
3445 def SHF_B : SHF_B_ENC, SHF_B_DESC;
3446 def SHF_H : SHF_H_ENC, SHF_H_DESC;
3447 def SHF_W : SHF_W_ENC, SHF_W_DESC;
3449 def SLD_B : SLD_B_ENC, SLD_B_DESC;
3450 def SLD_H : SLD_H_ENC, SLD_H_DESC;
3451 def SLD_W : SLD_W_ENC, SLD_W_DESC;
3452 def SLD_D : SLD_D_ENC, SLD_D_DESC;
3454 def SLDI_B : SLDI_B_ENC, SLDI_B_DESC;
3455 def SLDI_H : SLDI_H_ENC, SLDI_H_DESC;
3456 def SLDI_W : SLDI_W_ENC, SLDI_W_DESC;
3457 def SLDI_D : SLDI_D_ENC, SLDI_D_DESC;
3459 def SLL_B : SLL_B_ENC, SLL_B_DESC;
3460 def SLL_H : SLL_H_ENC, SLL_H_DESC;
3461 def SLL_W : SLL_W_ENC, SLL_W_DESC;
3462 def SLL_D : SLL_D_ENC, SLL_D_DESC;
3464 def SLLI_B : SLLI_B_ENC, SLLI_B_DESC;
3465 def SLLI_H : SLLI_H_ENC, SLLI_H_DESC;
3466 def SLLI_W : SLLI_W_ENC, SLLI_W_DESC;
3467 def SLLI_D : SLLI_D_ENC, SLLI_D_DESC;
3469 def SPLAT_B : SPLAT_B_ENC, SPLAT_B_DESC;
3470 def SPLAT_H : SPLAT_H_ENC, SPLAT_H_DESC;
3471 def SPLAT_W : SPLAT_W_ENC, SPLAT_W_DESC;
3472 def SPLAT_D : SPLAT_D_ENC, SPLAT_D_DESC;
3474 def SPLATI_B : SPLATI_B_ENC, SPLATI_B_DESC;
3475 def SPLATI_H : SPLATI_H_ENC, SPLATI_H_DESC;
3476 def SPLATI_W : SPLATI_W_ENC, SPLATI_W_DESC;
3477 def SPLATI_D : SPLATI_D_ENC, SPLATI_D_DESC;
3479 def SRA_B : SRA_B_ENC, SRA_B_DESC;
3480 def SRA_H : SRA_H_ENC, SRA_H_DESC;
3481 def SRA_W : SRA_W_ENC, SRA_W_DESC;
3482 def SRA_D : SRA_D_ENC, SRA_D_DESC;
3484 def SRAI_B : SRAI_B_ENC, SRAI_B_DESC;
3485 def SRAI_H : SRAI_H_ENC, SRAI_H_DESC;
3486 def SRAI_W : SRAI_W_ENC, SRAI_W_DESC;
3487 def SRAI_D : SRAI_D_ENC, SRAI_D_DESC;
3489 def SRAR_B : SRAR_B_ENC, SRAR_B_DESC;
3490 def SRAR_H : SRAR_H_ENC, SRAR_H_DESC;
3491 def SRAR_W : SRAR_W_ENC, SRAR_W_DESC;
3492 def SRAR_D : SRAR_D_ENC, SRAR_D_DESC;
3494 def SRARI_B : SRARI_B_ENC, SRARI_B_DESC;
3495 def SRARI_H : SRARI_H_ENC, SRARI_H_DESC;
3496 def SRARI_W : SRARI_W_ENC, SRARI_W_DESC;
3497 def SRARI_D : SRARI_D_ENC, SRARI_D_DESC;
3499 def SRL_B : SRL_B_ENC, SRL_B_DESC;
3500 def SRL_H : SRL_H_ENC, SRL_H_DESC;
3501 def SRL_W : SRL_W_ENC, SRL_W_DESC;
3502 def SRL_D : SRL_D_ENC, SRL_D_DESC;
3504 def SRLI_B : SRLI_B_ENC, SRLI_B_DESC;
3505 def SRLI_H : SRLI_H_ENC, SRLI_H_DESC;
3506 def SRLI_W : SRLI_W_ENC, SRLI_W_DESC;
3507 def SRLI_D : SRLI_D_ENC, SRLI_D_DESC;
3509 def SRLR_B : SRLR_B_ENC, SRLR_B_DESC;
3510 def SRLR_H : SRLR_H_ENC, SRLR_H_DESC;
3511 def SRLR_W : SRLR_W_ENC, SRLR_W_DESC;
3512 def SRLR_D : SRLR_D_ENC, SRLR_D_DESC;
3514 def SRLRI_B : SRLRI_B_ENC, SRLRI_B_DESC;
3515 def SRLRI_H : SRLRI_H_ENC, SRLRI_H_DESC;
3516 def SRLRI_W : SRLRI_W_ENC, SRLRI_W_DESC;
3517 def SRLRI_D : SRLRI_D_ENC, SRLRI_D_DESC;
3519 def ST_B: ST_B_ENC, ST_B_DESC;
3520 def ST_H: ST_H_ENC, ST_H_DESC;
3521 def ST_W: ST_W_ENC, ST_W_DESC;
3522 def ST_D: ST_D_ENC, ST_D_DESC;
3524 def SUBS_S_B : SUBS_S_B_ENC, SUBS_S_B_DESC;
3525 def SUBS_S_H : SUBS_S_H_ENC, SUBS_S_H_DESC;
3526 def SUBS_S_W : SUBS_S_W_ENC, SUBS_S_W_DESC;
3527 def SUBS_S_D : SUBS_S_D_ENC, SUBS_S_D_DESC;
3529 def SUBS_U_B : SUBS_U_B_ENC, SUBS_U_B_DESC;
3530 def SUBS_U_H : SUBS_U_H_ENC, SUBS_U_H_DESC;
3531 def SUBS_U_W : SUBS_U_W_ENC, SUBS_U_W_DESC;
3532 def SUBS_U_D : SUBS_U_D_ENC, SUBS_U_D_DESC;
3534 def SUBSUS_U_B : SUBSUS_U_B_ENC, SUBSUS_U_B_DESC;
3535 def SUBSUS_U_H : SUBSUS_U_H_ENC, SUBSUS_U_H_DESC;
3536 def SUBSUS_U_W : SUBSUS_U_W_ENC, SUBSUS_U_W_DESC;
3537 def SUBSUS_U_D : SUBSUS_U_D_ENC, SUBSUS_U_D_DESC;
3539 def SUBSUU_S_B : SUBSUU_S_B_ENC, SUBSUU_S_B_DESC;
3540 def SUBSUU_S_H : SUBSUU_S_H_ENC, SUBSUU_S_H_DESC;
3541 def SUBSUU_S_W : SUBSUU_S_W_ENC, SUBSUU_S_W_DESC;
3542 def SUBSUU_S_D : SUBSUU_S_D_ENC, SUBSUU_S_D_DESC;
3544 def SUBV_B : SUBV_B_ENC, SUBV_B_DESC;
3545 def SUBV_H : SUBV_H_ENC, SUBV_H_DESC;
3546 def SUBV_W : SUBV_W_ENC, SUBV_W_DESC;
3547 def SUBV_D : SUBV_D_ENC, SUBV_D_DESC;
3549 def SUBVI_B : SUBVI_B_ENC, SUBVI_B_DESC;
3550 def SUBVI_H : SUBVI_H_ENC, SUBVI_H_DESC;
3551 def SUBVI_W : SUBVI_W_ENC, SUBVI_W_DESC;
3552 def SUBVI_D : SUBVI_D_ENC, SUBVI_D_DESC;
3554 def VSHF_B : VSHF_B_ENC, VSHF_B_DESC;
3555 def VSHF_H : VSHF_H_ENC, VSHF_H_DESC;
3556 def VSHF_W : VSHF_W_ENC, VSHF_W_DESC;
3557 def VSHF_D : VSHF_D_ENC, VSHF_D_DESC;
3559 def XOR_V : XOR_V_ENC, XOR_V_DESC;
3560 def XOR_V_H_PSEUDO : XOR_V_H_PSEUDO_DESC,
3561 PseudoInstExpansion<(XOR_V MSA128BOpnd:$wd,
3564 def XOR_V_W_PSEUDO : XOR_V_W_PSEUDO_DESC,
3565 PseudoInstExpansion<(XOR_V MSA128BOpnd:$wd,
3568 def XOR_V_D_PSEUDO : XOR_V_D_PSEUDO_DESC,
3569 PseudoInstExpansion<(XOR_V MSA128BOpnd:$wd,
3573 def XORI_B : XORI_B_ENC, XORI_B_DESC;
3576 class MSAPat<dag pattern, dag result, list<Predicate> pred = [HasMSA]> :
3577 Pat<pattern, result>, Requires<pred>;
3579 def : MSAPat<(extractelt (v4i32 MSA128W:$ws), immZExt4:$idx),
3580 (COPY_S_W MSA128W:$ws, immZExt4:$idx)>;
3582 def : MSAPat<(v8f16 (load addrimm10lsl1:$addr)), (LD_H addrimm10lsl1:$addr)>;
3583 def : MSAPat<(v4f32 (load addrimm10lsl2:$addr)), (LD_W addrimm10lsl2:$addr)>;
3584 def : MSAPat<(v2f64 (load addrimm10lsl3:$addr)), (LD_D addrimm10lsl3:$addr)>;
3586 def ST_FH : MSAPat<(store (v8f16 MSA128H:$ws), addrimm10lsl1:$addr),
3587 (ST_H MSA128H:$ws, addrimm10lsl1:$addr)>;
3588 def ST_FW : MSAPat<(store (v4f32 MSA128W:$ws), addrimm10lsl2:$addr),
3589 (ST_W MSA128W:$ws, addrimm10lsl2:$addr)>;
3590 def ST_FD : MSAPat<(store (v2f64 MSA128D:$ws), addrimm10lsl3:$addr),
3591 (ST_D MSA128D:$ws, addrimm10lsl3:$addr)>;
3593 class MSA_FABS_PSEUDO_DESC_BASE<RegisterOperand ROWD,
3594 RegisterOperand ROWS = ROWD,
3595 InstrItinClass itin = NoItinerary> :
3596 MSAPseudo<(outs ROWD:$wd),
3598 [(set ROWD:$wd, (fabs ROWS:$ws))]> {
3599 InstrItinClass Itinerary = itin;
3601 def FABS_W : MSA_FABS_PSEUDO_DESC_BASE<MSA128WOpnd>,
3602 PseudoInstExpansion<(FMAX_A_W MSA128WOpnd:$wd, MSA128WOpnd:$ws,
3604 def FABS_D : MSA_FABS_PSEUDO_DESC_BASE<MSA128DOpnd>,
3605 PseudoInstExpansion<(FMAX_A_D MSA128DOpnd:$wd, MSA128DOpnd:$ws,
3608 class MSABitconvertPat<ValueType DstVT, ValueType SrcVT,
3609 RegisterClass DstRC, list<Predicate> preds = [HasMSA]> :
3610 MSAPat<(DstVT (bitconvert SrcVT:$src)),
3611 (COPY_TO_REGCLASS SrcVT:$src, DstRC), preds>;
3613 // These are endian-independent because the element size doesnt change
3614 def : MSABitconvertPat<v8i16, v8f16, MSA128H>;
3615 def : MSABitconvertPat<v4i32, v4f32, MSA128W>;
3616 def : MSABitconvertPat<v2i64, v2f64, MSA128D>;
3617 def : MSABitconvertPat<v8f16, v8i16, MSA128H>;
3618 def : MSABitconvertPat<v4f32, v4i32, MSA128W>;
3619 def : MSABitconvertPat<v2f64, v2i64, MSA128D>;
3621 // Little endian bitcasts are always no-ops
3622 def : MSABitconvertPat<v16i8, v8i16, MSA128B, [HasMSA, IsLE]>;
3623 def : MSABitconvertPat<v16i8, v4i32, MSA128B, [HasMSA, IsLE]>;
3624 def : MSABitconvertPat<v16i8, v2i64, MSA128B, [HasMSA, IsLE]>;
3625 def : MSABitconvertPat<v16i8, v8f16, MSA128B, [HasMSA, IsLE]>;
3626 def : MSABitconvertPat<v16i8, v4f32, MSA128B, [HasMSA, IsLE]>;
3627 def : MSABitconvertPat<v16i8, v2f64, MSA128B, [HasMSA, IsLE]>;
3629 def : MSABitconvertPat<v8i16, v16i8, MSA128H, [HasMSA, IsLE]>;
3630 def : MSABitconvertPat<v8i16, v4i32, MSA128H, [HasMSA, IsLE]>;
3631 def : MSABitconvertPat<v8i16, v2i64, MSA128H, [HasMSA, IsLE]>;
3632 def : MSABitconvertPat<v8i16, v4f32, MSA128H, [HasMSA, IsLE]>;
3633 def : MSABitconvertPat<v8i16, v2f64, MSA128H, [HasMSA, IsLE]>;
3635 def : MSABitconvertPat<v4i32, v16i8, MSA128W, [HasMSA, IsLE]>;
3636 def : MSABitconvertPat<v4i32, v8i16, MSA128W, [HasMSA, IsLE]>;
3637 def : MSABitconvertPat<v4i32, v2i64, MSA128W, [HasMSA, IsLE]>;
3638 def : MSABitconvertPat<v4i32, v8f16, MSA128W, [HasMSA, IsLE]>;
3639 def : MSABitconvertPat<v4i32, v2f64, MSA128W, [HasMSA, IsLE]>;
3641 def : MSABitconvertPat<v2i64, v16i8, MSA128D, [HasMSA, IsLE]>;
3642 def : MSABitconvertPat<v2i64, v8i16, MSA128D, [HasMSA, IsLE]>;
3643 def : MSABitconvertPat<v2i64, v4i32, MSA128D, [HasMSA, IsLE]>;
3644 def : MSABitconvertPat<v2i64, v8f16, MSA128D, [HasMSA, IsLE]>;
3645 def : MSABitconvertPat<v2i64, v4f32, MSA128D, [HasMSA, IsLE]>;
3647 def : MSABitconvertPat<v4f32, v16i8, MSA128W, [HasMSA, IsLE]>;
3648 def : MSABitconvertPat<v4f32, v8i16, MSA128W, [HasMSA, IsLE]>;
3649 def : MSABitconvertPat<v4f32, v2i64, MSA128W, [HasMSA, IsLE]>;
3650 def : MSABitconvertPat<v4f32, v8f16, MSA128W, [HasMSA, IsLE]>;
3651 def : MSABitconvertPat<v4f32, v2f64, MSA128W, [HasMSA, IsLE]>;
3653 def : MSABitconvertPat<v2f64, v16i8, MSA128D, [HasMSA, IsLE]>;
3654 def : MSABitconvertPat<v2f64, v8i16, MSA128D, [HasMSA, IsLE]>;
3655 def : MSABitconvertPat<v2f64, v4i32, MSA128D, [HasMSA, IsLE]>;
3656 def : MSABitconvertPat<v2f64, v8f16, MSA128D, [HasMSA, IsLE]>;
3657 def : MSABitconvertPat<v2f64, v4f32, MSA128D, [HasMSA, IsLE]>;
3659 // Big endian bitcasts expand to shuffle instructions.
3660 // This is because bitcast is defined to be a store/load sequence and the
3661 // vector store/load instructions are mixed-endian with respect to the vector
3662 // as a whole (little endian with respect to element order, but big endian
3665 class MSABitconvertReverseQuartersPat<ValueType DstVT, ValueType SrcVT,
3666 RegisterClass DstRC, MSAInst Insn,
3667 RegisterClass ViaRC> :
3668 MSAPat<(DstVT (bitconvert SrcVT:$src)),
3669 (COPY_TO_REGCLASS (Insn (COPY_TO_REGCLASS SrcVT:$src, ViaRC), 27),
3673 class MSABitconvertReverseHalvesPat<ValueType DstVT, ValueType SrcVT,
3674 RegisterClass DstRC, MSAInst Insn,
3675 RegisterClass ViaRC> :
3676 MSAPat<(DstVT (bitconvert SrcVT:$src)),
3677 (COPY_TO_REGCLASS (Insn (COPY_TO_REGCLASS SrcVT:$src, ViaRC), 177),
3681 class MSABitconvertReverseBInHPat<ValueType DstVT, ValueType SrcVT,
3682 RegisterClass DstRC> :
3683 MSABitconvertReverseHalvesPat<DstVT, SrcVT, DstRC, SHF_B, MSA128B>;
3685 class MSABitconvertReverseBInWPat<ValueType DstVT, ValueType SrcVT,
3686 RegisterClass DstRC> :
3687 MSABitconvertReverseQuartersPat<DstVT, SrcVT, DstRC, SHF_B, MSA128B>;
3689 class MSABitconvertReverseBInDPat<ValueType DstVT, ValueType SrcVT,
3690 RegisterClass DstRC> :
3691 MSAPat<(DstVT (bitconvert SrcVT:$src)),
3695 (SHF_B (COPY_TO_REGCLASS SrcVT:$src, MSA128B), 27),
3700 class MSABitconvertReverseHInWPat<ValueType DstVT, ValueType SrcVT,
3701 RegisterClass DstRC> :
3702 MSABitconvertReverseHalvesPat<DstVT, SrcVT, DstRC, SHF_H, MSA128H>;
3704 class MSABitconvertReverseHInDPat<ValueType DstVT, ValueType SrcVT,
3705 RegisterClass DstRC> :
3706 MSABitconvertReverseQuartersPat<DstVT, SrcVT, DstRC, SHF_H, MSA128H>;
3708 class MSABitconvertReverseWInDPat<ValueType DstVT, ValueType SrcVT,
3709 RegisterClass DstRC> :
3710 MSABitconvertReverseHalvesPat<DstVT, SrcVT, DstRC, SHF_W, MSA128W>;
3712 def : MSABitconvertReverseBInHPat<v8i16, v16i8, MSA128H>;
3713 def : MSABitconvertReverseBInHPat<v8f16, v16i8, MSA128H>;
3714 def : MSABitconvertReverseBInWPat<v4i32, v16i8, MSA128W>;
3715 def : MSABitconvertReverseBInWPat<v4f32, v16i8, MSA128W>;
3716 def : MSABitconvertReverseBInDPat<v2i64, v16i8, MSA128D>;
3717 def : MSABitconvertReverseBInDPat<v2f64, v16i8, MSA128D>;
3719 def : MSABitconvertReverseBInHPat<v16i8, v8i16, MSA128B>;
3720 def : MSABitconvertReverseHInWPat<v4i32, v8i16, MSA128W>;
3721 def : MSABitconvertReverseHInWPat<v4f32, v8i16, MSA128W>;
3722 def : MSABitconvertReverseHInDPat<v2i64, v8i16, MSA128D>;
3723 def : MSABitconvertReverseHInDPat<v2f64, v8i16, MSA128D>;
3725 def : MSABitconvertReverseBInHPat<v16i8, v8f16, MSA128B>;
3726 def : MSABitconvertReverseHInWPat<v4i32, v8f16, MSA128W>;
3727 def : MSABitconvertReverseHInWPat<v4f32, v8f16, MSA128W>;
3728 def : MSABitconvertReverseHInDPat<v2i64, v8f16, MSA128D>;
3729 def : MSABitconvertReverseHInDPat<v2f64, v8f16, MSA128D>;
3731 def : MSABitconvertReverseBInWPat<v16i8, v4i32, MSA128B>;
3732 def : MSABitconvertReverseHInWPat<v8i16, v4i32, MSA128H>;
3733 def : MSABitconvertReverseHInWPat<v8f16, v4i32, MSA128H>;
3734 def : MSABitconvertReverseWInDPat<v2i64, v4i32, MSA128D>;
3735 def : MSABitconvertReverseWInDPat<v2f64, v4i32, MSA128D>;
3737 def : MSABitconvertReverseBInWPat<v16i8, v4f32, MSA128B>;
3738 def : MSABitconvertReverseHInWPat<v8i16, v4f32, MSA128H>;
3739 def : MSABitconvertReverseHInWPat<v8f16, v4f32, MSA128H>;
3740 def : MSABitconvertReverseWInDPat<v2i64, v4f32, MSA128D>;
3741 def : MSABitconvertReverseWInDPat<v2f64, v4f32, MSA128D>;
3743 def : MSABitconvertReverseBInDPat<v16i8, v2i64, MSA128B>;
3744 def : MSABitconvertReverseHInDPat<v8i16, v2i64, MSA128H>;
3745 def : MSABitconvertReverseHInDPat<v8f16, v2i64, MSA128H>;
3746 def : MSABitconvertReverseWInDPat<v4i32, v2i64, MSA128W>;
3747 def : MSABitconvertReverseWInDPat<v4f32, v2i64, MSA128W>;
3749 def : MSABitconvertReverseBInDPat<v16i8, v2f64, MSA128B>;
3750 def : MSABitconvertReverseHInDPat<v8i16, v2f64, MSA128H>;
3751 def : MSABitconvertReverseHInDPat<v8f16, v2f64, MSA128H>;
3752 def : MSABitconvertReverseWInDPat<v4i32, v2f64, MSA128W>;
3753 def : MSABitconvertReverseWInDPat<v4f32, v2f64, MSA128W>;
3755 // Pseudos used to implement BNZ.df, and BZ.df
3757 class MSA_CBRANCH_PSEUDO_DESC_BASE<SDPatternOperator OpNode, ValueType TyNode,
3759 InstrItinClass itin = NoItinerary> :
3760 MipsPseudo<(outs GPR32:$dst),
3762 [(set GPR32:$dst, (OpNode (TyNode RCWS:$ws)))]> {
3763 bit usesCustomInserter = 1;
3764 bit hasNoSchedulingInfo = 1;
3767 def SNZ_B_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v16i8,
3768 MSA128B, NoItinerary>;
3769 def SNZ_H_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v8i16,
3770 MSA128H, NoItinerary>;
3771 def SNZ_W_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v4i32,
3772 MSA128W, NoItinerary>;
3773 def SNZ_D_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v2i64,
3774 MSA128D, NoItinerary>;
3775 def SNZ_V_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAnyNonZero, v16i8,
3776 MSA128B, NoItinerary>;
3778 def SZ_B_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v16i8,
3779 MSA128B, NoItinerary>;
3780 def SZ_H_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v8i16,
3781 MSA128H, NoItinerary>;
3782 def SZ_W_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v4i32,
3783 MSA128W, NoItinerary>;
3784 def SZ_D_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllZero, v2i64,
3785 MSA128D, NoItinerary>;
3786 def SZ_V_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAnyZero, v16i8,
3787 MSA128B, NoItinerary>;
3789 // Pseudoes used to implement transparent fp16 support.
3791 let ASEPredicate = [HasMSA] in {
3792 let usesCustomInserter = 1 in {
3794 MipsPseudo<(outs), (ins MSA128F16:$ws, mem_simm10:$addr),
3795 [(store (f16 MSA128F16:$ws), (addrimm10:$addr))]>;
3797 MipsPseudo<(outs MSA128F16:$ws), (ins mem_simm10:$addr),
3798 [(set MSA128F16:$ws, (f16 (load addrimm10:$addr)))]>;
3801 let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in {
3802 def MSA_FP_EXTEND_W_PSEUDO :
3803 MipsPseudo<(outs FGR32Opnd:$fd), (ins MSA128F16:$ws),
3804 [(set FGR32Opnd:$fd, (f32 (fpextend MSA128F16:$ws)))]>;
3805 def MSA_FP_ROUND_W_PSEUDO :
3806 MipsPseudo<(outs MSA128F16:$wd), (ins FGR32Opnd:$fs),
3807 [(set MSA128F16:$wd, (f16 (fpround FGR32Opnd:$fs)))]>;
3808 def MSA_FP_EXTEND_D_PSEUDO :
3809 MipsPseudo<(outs FGR64Opnd:$fd), (ins MSA128F16:$ws),
3810 [(set FGR64Opnd:$fd, (f64 (fpextend MSA128F16:$ws)))]>;
3811 def MSA_FP_ROUND_D_PSEUDO :
3812 MipsPseudo<(outs MSA128F16:$wd), (ins FGR64Opnd:$fs),
3813 [(set MSA128F16:$wd, (f16 (fpround FGR64Opnd:$fs)))]>;
3816 def : MipsPat<(MipsTruncIntFP MSA128F16:$ws),
3817 (TRUNC_W_D64 (MSA_FP_EXTEND_D_PSEUDO MSA128F16:$ws))>,
3820 def : MipsPat<(MipsFPCmp MSA128F16:$ws, MSA128F16:$wt, imm:$cond),
3821 (FCMP_S32 (MSA_FP_EXTEND_W_PSEUDO MSA128F16:$ws),
3822 (MSA_FP_EXTEND_W_PSEUDO MSA128F16:$wt), imm:$cond)>,
3823 ISA_MIPS1_NOT_32R6_64R6, ASE_MSA;
3826 def vsplati64_imm_eq_63 : PatLeaf<(bitconvert (v4i32 (build_vector))), [{
3828 SDNode *BV = N->getOperand(0).getNode();
3829 EVT EltTy = N->getValueType(0).getVectorElementType();
3831 return selectVSplat(BV, Imm, EltTy.getSizeInBits()) &&
3832 Imm.getBitWidth() == EltTy.getSizeInBits() && Imm == 63;
3835 def immi32Cst7 : ImmLeaf<i32, [{return isUInt<32>(Imm) && Imm == 7;}]>;
3836 def immi32Cst15 : ImmLeaf<i32, [{return isUInt<32>(Imm) && Imm == 15;}]>;
3837 def immi32Cst31 : ImmLeaf<i32, [{return isUInt<32>(Imm) && Imm == 31;}]>;
3839 def vsplati8imm7 : PatFrag<(ops node:$wt),
3840 (and node:$wt, (vsplati8 immi32Cst7))>;
3841 def vsplati16imm15 : PatFrag<(ops node:$wt),
3842 (and node:$wt, (vsplati16 immi32Cst15))>;
3843 def vsplati32imm31 : PatFrag<(ops node:$wt),
3844 (and node:$wt, (vsplati32 immi32Cst31))>;
3845 def vsplati64imm63 : PatFrag<(ops node:$wt),
3846 (and node:$wt, vsplati64_imm_eq_63)>;
3848 class MSAShiftPat<SDNode Node, ValueType VT, MSAInst Insn, dag Vec> :
3849 MSAPat<(VT (Node VT:$ws, (VT (and VT:$wt, Vec)))),
3850 (VT (Insn VT:$ws, VT:$wt))>;
3852 class MSABitPat<SDNode Node, ValueType VT, MSAInst Insn, PatFrag Frag> :
3853 MSAPat<(VT (Node VT:$ws, (shl vsplat_imm_eq_1, (Frag VT:$wt)))),
3854 (VT (Insn VT:$ws, VT:$wt))>;
3856 multiclass MSAShiftPats<SDNode Node, string Insn> {
3857 def : MSAShiftPat<Node, v16i8, !cast<MSAInst>(Insn#_B),
3858 (vsplati8 immi32Cst7)>;
3859 def : MSAShiftPat<Node, v8i16, !cast<MSAInst>(Insn#_H),
3860 (vsplati16 immi32Cst15)>;
3861 def : MSAShiftPat<Node, v4i32, !cast<MSAInst>(Insn#_W),
3862 (vsplati32 immi32Cst31)>;
3863 def : MSAPat<(v2i64 (Node v2i64:$ws, (v2i64 (and v2i64:$wt,
3864 vsplati64_imm_eq_63)))),
3865 (v2i64 (!cast<MSAInst>(Insn#_D) v2i64:$ws, v2i64:$wt))>;
3868 multiclass MSABitPats<SDNode Node, string Insn> {
3869 def : MSABitPat<Node, v16i8, !cast<MSAInst>(Insn#_B), vsplati8imm7>;
3870 def : MSABitPat<Node, v8i16, !cast<MSAInst>(Insn#_H), vsplati16imm15>;
3871 def : MSABitPat<Node, v4i32, !cast<MSAInst>(Insn#_W), vsplati32imm31>;
3872 def : MSAPat<(Node v2i64:$ws, (shl (v2i64 vsplati64_imm_eq_1),
3873 (vsplati64imm63 v2i64:$wt))),
3874 (v2i64 (!cast<MSAInst>(Insn#_D) v2i64:$ws, v2i64:$wt))>;
3877 defm : MSAShiftPats<shl, "SLL">;
3878 defm : MSAShiftPats<srl, "SRL">;
3879 defm : MSAShiftPats<sra, "SRA">;
3880 defm : MSABitPats<xor, "BNEG">;
3881 defm : MSABitPats<or, "BSET">;
3883 def : MSAPat<(and v16i8:$ws, (vnot (shl vsplat_imm_eq_1,
3884 (vsplati8imm7 v16i8:$wt)))),
3885 (v16i8 (BCLR_B v16i8:$ws, v16i8:$wt))>;
3886 def : MSAPat<(and v8i16:$ws, (vnot (shl vsplat_imm_eq_1,
3887 (vsplati16imm15 v8i16:$wt)))),
3888 (v8i16 (BCLR_H v8i16:$ws, v8i16:$wt))>;
3889 def : MSAPat<(and v4i32:$ws, (vnot (shl vsplat_imm_eq_1,
3890 (vsplati32imm31 v4i32:$wt)))),
3891 (v4i32 (BCLR_W v4i32:$ws, v4i32:$wt))>;
3892 def : MSAPat<(and v2i64:$ws, (vnot (shl (v2i64 vsplati64_imm_eq_1),
3893 (vsplati64imm63 v2i64:$wt)))),
3894 (v2i64 (BCLR_D v2i64:$ws, v2i64:$wt))>;
3896 // Vector extraction with fixed index.
3898 // Extracting 32-bit values on MSA32 should always use COPY_S_W rather than
3899 // COPY_U_W, even for the zero-extended case. This is because our forward
3900 // compatibility strategy is to consider registers to be infinitely
3901 // sign-extended so that a MIPS64 can execute MIPS32 code without getting
3902 // different register values.
3903 def : MSAPat<(vextract_zext_i32 (v4i32 MSA128W:$ws), immZExt2Ptr:$idx),
3904 (COPY_S_W MSA128W:$ws, immZExt2:$idx)>, ASE_MSA_NOT_MSA64;
3905 def : MSAPat<(vextract_zext_i32 (v4f32 MSA128W:$ws), immZExt2Ptr:$idx),
3906 (COPY_S_W MSA128W:$ws, immZExt2:$idx)>, ASE_MSA_NOT_MSA64;
3908 // Extracting 64-bit values on MSA64 should always use COPY_S_D rather than
3909 // COPY_U_D, even for the zero-extended case. This is because our forward
3910 // compatibility strategy is to consider registers to be infinitely
3911 // sign-extended so that a hypothetical MIPS128 would be able to execute MIPS64
3912 // code without getting different register values.
3913 def : MSAPat<(vextract_zext_i64 (v2i64 MSA128D:$ws), immZExt1Ptr:$idx),
3914 (COPY_S_D MSA128D:$ws, immZExt1:$idx)>, ASE_MSA64;
3915 def : MSAPat<(vextract_zext_i64 (v2f64 MSA128D:$ws), immZExt1Ptr:$idx),
3916 (COPY_S_D MSA128D:$ws, immZExt1:$idx)>, ASE_MSA64;
3918 // Vector extraction with variable index
3919 def : MSAPat<(i32 (vextract_sext_i8 v16i8:$ws, i32:$idx)),
3920 (SRA (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG (SPLAT_B v16i8:$ws,
3924 def : MSAPat<(i32 (vextract_sext_i16 v8i16:$ws, i32:$idx)),
3925 (SRA (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG (SPLAT_H v8i16:$ws,
3929 def : MSAPat<(i32 (vextract_sext_i32 v4i32:$ws, i32:$idx)),
3930 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG (SPLAT_W v4i32:$ws,
3934 def : MSAPat<(i64 (vextract_sext_i64 v2i64:$ws, i32:$idx)),
3935 (COPY_TO_REGCLASS (i64 (EXTRACT_SUBREG (SPLAT_D v2i64:$ws,
3938 GPR64), [HasMSA, IsGP64bit]>;
3940 def : MSAPat<(i32 (vextract_zext_i8 v16i8:$ws, i32:$idx)),
3941 (SRL (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG (SPLAT_B v16i8:$ws,
3945 def : MSAPat<(i32 (vextract_zext_i16 v8i16:$ws, i32:$idx)),
3946 (SRL (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG (SPLAT_H v8i16:$ws,
3950 def : MSAPat<(i32 (vextract_zext_i32 v4i32:$ws, i32:$idx)),
3951 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG (SPLAT_W v4i32:$ws,
3955 def : MSAPat<(i64 (vextract_zext_i64 v2i64:$ws, i32:$idx)),
3956 (COPY_TO_REGCLASS (i64 (EXTRACT_SUBREG (SPLAT_D v2i64:$ws,
3959 GPR64), [HasMSA, IsGP64bit]>;
3961 def : MSAPat<(f32 (vector_extract v4f32:$ws, i32:$idx)),
3962 (f32 (EXTRACT_SUBREG (SPLAT_W v4f32:$ws,
3965 def : MSAPat<(f64 (vector_extract v2f64:$ws, i32:$idx)),
3966 (f64 (EXTRACT_SUBREG (SPLAT_D v2f64:$ws,
3970 // Vector extraction with variable index (N64 ABI)
3972 (i32 (vextract_sext_i8 v16i8:$ws, i64:$idx)),
3973 (SRA (COPY_TO_REGCLASS
3974 (i32 (EXTRACT_SUBREG
3977 (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
3982 (i32 (vextract_sext_i16 v8i16:$ws, i64:$idx)),
3983 (SRA (COPY_TO_REGCLASS
3984 (i32 (EXTRACT_SUBREG
3987 (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
3992 (i32 (vextract_sext_i32 v4i32:$ws, i64:$idx)),
3994 (i32 (EXTRACT_SUBREG
3997 (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4001 (i64 (vextract_sext_i64 v2i64:$ws, i64:$idx)),
4003 (i64 (EXTRACT_SUBREG
4005 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4007 GPR64), [HasMSA, IsGP64bit]>;
4010 (i32 (vextract_zext_i8 v16i8:$ws, i64:$idx)),
4011 (SRL (COPY_TO_REGCLASS
4012 (i32 (EXTRACT_SUBREG
4015 (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4020 (i32 (vextract_zext_i16 v8i16:$ws, i64:$idx)),
4021 (SRL (COPY_TO_REGCLASS
4022 (i32 (EXTRACT_SUBREG
4025 (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4030 (i32 (vextract_zext_i32 v4i32:$ws, i64:$idx)),
4032 (i32 (EXTRACT_SUBREG
4034 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4038 (i64 (vextract_zext_i64 v2i64:$ws, i64:$idx)),
4040 (i64 (EXTRACT_SUBREG
4042 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4045 [HasMSA, IsGP64bit]>;
4048 (f32 (vector_extract v4f32:$ws, i64:$idx)),
4049 (f32 (EXTRACT_SUBREG
4051 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4054 (f64 (vector_extract v2f64:$ws, i64:$idx)),
4055 (f64 (EXTRACT_SUBREG
4057 (COPY_TO_REGCLASS (i32 (EXTRACT_SUBREG i64:$idx, sub_32)), GPR32)),
4060 def : MSAPat<(vfseteq_v4f32 MSA128WOpnd:$a, MSA128WOpnd:$b),
4061 (FCEQ_W MSA128WOpnd:$a, MSA128WOpnd:$b)>;
4062 def : MSAPat<(vfseteq_v2f64 MSA128DOpnd:$a, MSA128DOpnd:$b),
4063 (FCEQ_D MSA128DOpnd:$a, MSA128DOpnd:$b)>;
4064 def : MSAPat<(vfsetle_v4f32 MSA128WOpnd:$a, MSA128WOpnd:$b),
4065 (FCLE_W MSA128WOpnd:$a, MSA128WOpnd:$b)>;
4066 def : MSAPat<(vfsetle_v2f64 MSA128DOpnd:$a, MSA128DOpnd:$b),
4067 (FCLE_D MSA128DOpnd:$a, MSA128DOpnd:$b)>;
4068 def : MSAPat<(vfsetlt_v4f32 MSA128WOpnd:$a, MSA128WOpnd:$b),
4069 (FCLT_W MSA128WOpnd:$a, MSA128WOpnd:$b)>;
4070 def : MSAPat<(vfsetlt_v2f64 MSA128DOpnd:$a, MSA128DOpnd:$b),
4071 (FCLT_D MSA128DOpnd:$a, MSA128DOpnd:$b)>;
4072 def : MSAPat<(vfsetne_v4f32 MSA128WOpnd:$a, MSA128WOpnd:$b),
4073 (FCNE_W MSA128WOpnd:$a, MSA128WOpnd:$b)>;
4074 def : MSAPat<(vfsetne_v2f64 MSA128DOpnd:$a, MSA128DOpnd:$b),
4075 (FCNE_D MSA128DOpnd:$a, MSA128DOpnd:$b)>;