1 //===-- DSInstructions.td - DS Instruction Defintions ---------------------===//
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 class DS_Pseudo <string opName, dag outs, dag ins, string asmOps, list<dag> pattern=[]> :
10 InstSI <outs, ins, "", pattern>,
11 SIMCInstr <opName, SIEncodingFamily.NONE> {
16 let UseNamedOperandTable = 1;
18 // Most instruction load and store data, so set this as the default.
22 let hasSideEffects = 0;
23 let SchedRW = [WriteLDS];
26 let isCodeGenOnly = 1;
28 let AsmMatchConverter = "cvtDS";
30 string Mnemonic = opName;
31 string AsmOperands = asmOps;
33 // Well these bits a kind of hack because it would be more natural
34 // to test "outs" and "ins" dags for the presence of particular operands
37 bits<1> has_data0 = 1;
38 bits<1> has_data1 = 1;
40 bits<1> has_offset = 1; // has "offset" that should be split to offset0,1
41 bits<1> has_offset0 = 1;
42 bits<1> has_offset1 = 1;
45 bits<1> gdsValue = 0; // if has_gds == 0 set gds to this value
47 bits<1> has_m0_read = 1;
49 let Uses = !if(has_m0_read, [M0, EXEC], [EXEC]);
52 class DS_Real <DS_Pseudo ds> :
53 InstSI <ds.OutOperandList, ds.InOperandList, ds.Mnemonic # " " # ds.AsmOperands, []>,
57 let isCodeGenOnly = 0;
59 // copy relevant pseudo op flags
60 let SubtargetPredicate = ds.SubtargetPredicate;
61 let AsmMatchConverter = ds.AsmMatchConverter;
73 let offset0 = !if(ds.has_offset, offset{7-0}, ?);
74 let offset1 = !if(ds.has_offset, offset{15-8}, ?);
78 // DS Pseudo instructions
80 class DS_1A1D_NORET<string opName, RegisterClass rc = VGPR_32>
83 (ins VGPR_32:$addr, rc:$data0, offset:$offset, gds:$gds),
84 "$addr, $data0$offset$gds"> {
90 multiclass DS_1A1D_NORET_mc<string opName, RegisterClass rc = VGPR_32> {
91 def "" : DS_1A1D_NORET<opName, rc>,
92 AtomicNoRet<opName, 0>;
94 let has_m0_read = 0 in {
95 def _gfx9 : DS_1A1D_NORET<opName, rc>,
96 AtomicNoRet<opName#"_gfx9", 0>;
100 class DS_1A2D_NORET<string opName, RegisterClass rc = VGPR_32>
103 (ins VGPR_32:$addr, rc:$data0, rc:$data1, offset:$offset, gds:$gds),
104 "$addr, $data0, $data1"#"$offset"#"$gds"> {
109 multiclass DS_1A2D_NORET_mc<string opName, RegisterClass rc = VGPR_32> {
110 def "" : DS_1A2D_NORET<opName, rc>,
111 AtomicNoRet<opName, 0>;
113 let has_m0_read = 0 in {
114 def _gfx9 : DS_1A2D_NORET<opName, rc>,
115 AtomicNoRet<opName#"_gfx9", 0>;
119 class DS_1A2D_Off8_NORET <string opName, RegisterClass rc = VGPR_32>
122 (ins VGPR_32:$addr, rc:$data0, rc:$data1,
123 offset0:$offset0, offset1:$offset1, gds:$gds),
124 "$addr, $data0, $data1$offset0$offset1$gds"> {
128 let AsmMatchConverter = "cvtDSOffset01";
131 multiclass DS_1A2D_Off8_NORET_mc <string opName, RegisterClass rc = VGPR_32> {
132 def "" : DS_1A2D_Off8_NORET<opName, rc>;
134 let has_m0_read = 0 in {
135 def _gfx9 : DS_1A2D_Off8_NORET<opName, rc>;
139 class DS_1A1D_RET <string opName, RegisterClass rc = VGPR_32>
142 (ins VGPR_32:$addr, rc:$data0, offset:$offset, gds:$gds),
143 "$vdst, $addr, $data0$offset$gds"> {
145 let hasPostISelHook = 1;
149 multiclass DS_1A1D_RET_mc <string opName, RegisterClass rc = VGPR_32,
150 string NoRetOp = ""> {
151 def "" : DS_1A1D_RET<opName, rc>,
152 AtomicNoRet<NoRetOp, !if(!eq(NoRetOp, ""), 0, 1)>;
154 let has_m0_read = 0 in {
155 def _gfx9 : DS_1A1D_RET<opName, rc>,
156 AtomicNoRet<!if(!eq(NoRetOp, ""), "", NoRetOp#"_gfx9"),
157 !if(!eq(NoRetOp, ""), 0, 1)>;
161 class DS_1A2D_RET<string opName,
162 RegisterClass rc = VGPR_32,
163 RegisterClass src = rc>
166 (ins VGPR_32:$addr, src:$data0, src:$data1, offset:$offset, gds:$gds),
167 "$vdst, $addr, $data0, $data1$offset$gds"> {
169 let hasPostISelHook = 1;
172 multiclass DS_1A2D_RET_mc<string opName,
173 RegisterClass rc = VGPR_32,
175 RegisterClass src = rc> {
176 def "" : DS_1A2D_RET<opName, rc, src>,
177 AtomicNoRet<NoRetOp, !if(!eq(NoRetOp, ""), 0, 1)>;
179 let has_m0_read = 0 in {
180 def _gfx9 : DS_1A2D_RET<opName, rc, src>,
181 AtomicNoRet<NoRetOp#"_gfx9", !if(!eq(NoRetOp, ""), 0, 1)>;
185 class DS_1A2D_Off8_RET<string opName,
186 RegisterClass rc = VGPR_32,
187 RegisterClass src = rc>
190 (ins VGPR_32:$addr, src:$data0, src:$data1, offset0:$offset0, offset1:$offset1, gds:$gds),
191 "$vdst, $addr, $data0, $data1$offset0$offset1$gds"> {
194 let AsmMatchConverter = "cvtDSOffset01";
196 let hasPostISelHook = 1;
199 multiclass DS_1A2D_Off8_RET_mc<string opName,
200 RegisterClass rc = VGPR_32,
201 RegisterClass src = rc> {
202 def "" : DS_1A2D_Off8_RET<opName, rc, src>;
204 let has_m0_read = 0 in {
205 def _gfx9 : DS_1A2D_Off8_RET<opName, rc, src>;
210 class DS_1A_RET<string opName, RegisterClass rc = VGPR_32, bit HasTiedOutput = 0, Operand ofs = offset>
214 (ins VGPR_32:$addr, ofs:$offset, gds:$gds, rc:$vdst_in),
215 (ins VGPR_32:$addr, ofs:$offset, gds:$gds)),
216 "$vdst, $addr$offset$gds"> {
217 let Constraints = !if(HasTiedOutput, "$vdst = $vdst_in", "");
218 let DisableEncoding = !if(HasTiedOutput, "$vdst_in", "");
223 multiclass DS_1A_RET_mc<string opName, RegisterClass rc = VGPR_32, bit HasTiedOutput = 0, Operand ofs = offset> {
224 def "" : DS_1A_RET<opName, rc, HasTiedOutput, ofs>;
226 let has_m0_read = 0 in {
227 def _gfx9 : DS_1A_RET<opName, rc, HasTiedOutput, ofs>;
231 class DS_1A_RET_Tied<string opName, RegisterClass rc = VGPR_32> :
232 DS_1A_RET<opName, rc, 1>;
234 class DS_1A_Off8_RET <string opName, RegisterClass rc = VGPR_32>
237 (ins VGPR_32:$addr, offset0:$offset0, offset1:$offset1, gds:$gds),
238 "$vdst, $addr$offset0$offset1$gds"> {
243 let AsmMatchConverter = "cvtDSOffset01";
246 multiclass DS_1A_Off8_RET_mc <string opName, RegisterClass rc = VGPR_32> {
247 def "" : DS_1A_Off8_RET<opName, rc>;
249 let has_m0_read = 0 in {
250 def _gfx9 : DS_1A_Off8_RET<opName, rc>;
254 class DS_1A_RET_GDS <string opName> : DS_Pseudo<opName,
255 (outs VGPR_32:$vdst),
256 (ins VGPR_32:$addr, offset:$offset),
257 "$vdst, $addr$offset gds"> {
263 let AsmMatchConverter = "cvtDSGds";
266 class DS_0A_RET <string opName> : DS_Pseudo<opName,
267 (outs VGPR_32:$vdst),
268 (ins offset:$offset, gds:$gds),
269 "$vdst$offset$gds"> {
279 class DS_1A <string opName> : DS_Pseudo<opName,
281 (ins VGPR_32:$addr, offset:$offset, gds:$gds),
282 "$addr$offset$gds"> {
292 multiclass DS_1A_mc <string opName> {
293 def "" : DS_1A<opName>;
295 let has_m0_read = 0 in {
296 def _gfx9 : DS_1A<opName>;
301 class DS_GWS <string opName, dag ins, string asmOps>
302 : DS_Pseudo<opName, (outs), ins, asmOps> {
311 let AsmMatchConverter = "cvtDSGds";
314 class DS_GWS_0D <string opName>
316 (ins offset:$offset, gds:$gds), "$offset gds">;
318 class DS_GWS_1D <string opName>
320 (ins VGPR_32:$data0, offset:$offset, gds:$gds), "$data0$offset gds"> {
325 class DS_VOID <string opName> : DS_Pseudo<opName,
329 let hasSideEffects = 1;
330 let UseNamedOperandTable = 0;
331 let AsmMatchConverter = "";
343 class DS_1A1D_PERMUTE <string opName, SDPatternOperator node = null_frag>
345 (outs VGPR_32:$vdst),
346 (ins VGPR_32:$addr, VGPR_32:$data0, offset:$offset),
347 "$vdst, $addr, $data0$offset",
349 (node (DS1Addr1Offset i32:$addr, i16:$offset), i32:$data0))] > {
353 let isConvergent = 1;
359 defm DS_ADD_U32 : DS_1A1D_NORET_mc<"ds_add_u32">;
360 defm DS_SUB_U32 : DS_1A1D_NORET_mc<"ds_sub_u32">;
361 defm DS_RSUB_U32 : DS_1A1D_NORET_mc<"ds_rsub_u32">;
362 defm DS_INC_U32 : DS_1A1D_NORET_mc<"ds_inc_u32">;
363 defm DS_DEC_U32 : DS_1A1D_NORET_mc<"ds_dec_u32">;
364 defm DS_MIN_I32 : DS_1A1D_NORET_mc<"ds_min_i32">;
365 defm DS_MAX_I32 : DS_1A1D_NORET_mc<"ds_max_i32">;
366 defm DS_MIN_U32 : DS_1A1D_NORET_mc<"ds_min_u32">;
367 defm DS_MAX_U32 : DS_1A1D_NORET_mc<"ds_max_u32">;
368 defm DS_AND_B32 : DS_1A1D_NORET_mc<"ds_and_b32">;
369 defm DS_OR_B32 : DS_1A1D_NORET_mc<"ds_or_b32">;
370 defm DS_XOR_B32 : DS_1A1D_NORET_mc<"ds_xor_b32">;
371 defm DS_ADD_F32 : DS_1A1D_NORET_mc<"ds_add_f32">;
372 defm DS_MIN_F32 : DS_1A1D_NORET_mc<"ds_min_f32">;
373 defm DS_MAX_F32 : DS_1A1D_NORET_mc<"ds_max_f32">;
376 defm DS_WRITE_B8 : DS_1A1D_NORET_mc<"ds_write_b8">;
377 defm DS_WRITE_B16 : DS_1A1D_NORET_mc<"ds_write_b16">;
378 defm DS_WRITE_B32 : DS_1A1D_NORET_mc<"ds_write_b32">;
379 defm DS_WRITE2_B32 : DS_1A2D_Off8_NORET_mc<"ds_write2_b32">;
380 defm DS_WRITE2ST64_B32: DS_1A2D_Off8_NORET_mc<"ds_write2st64_b32">;
383 let has_m0_read = 0 in {
385 let SubtargetPredicate = HasD16LoadStore in {
386 def DS_WRITE_B8_D16_HI : DS_1A1D_NORET<"ds_write_b8_d16_hi">;
387 def DS_WRITE_B16_D16_HI : DS_1A1D_NORET<"ds_write_b16_d16_hi">;
390 let SubtargetPredicate = HasDSAddTid in {
391 def DS_WRITE_ADDTID_B32 : DS_1A1D_NORET<"ds_write_addtid_b32">;
394 } // End has_m0_read = 0
397 defm DS_MSKOR_B32 : DS_1A2D_NORET_mc<"ds_mskor_b32">;
398 defm DS_CMPST_B32 : DS_1A2D_NORET_mc<"ds_cmpst_b32">;
399 defm DS_CMPST_F32 : DS_1A2D_NORET_mc<"ds_cmpst_f32">;
401 defm DS_ADD_U64 : DS_1A1D_NORET_mc<"ds_add_u64", VReg_64>;
402 defm DS_SUB_U64 : DS_1A1D_NORET_mc<"ds_sub_u64", VReg_64>;
403 defm DS_RSUB_U64 : DS_1A1D_NORET_mc<"ds_rsub_u64", VReg_64>;
404 defm DS_INC_U64 : DS_1A1D_NORET_mc<"ds_inc_u64", VReg_64>;
405 defm DS_DEC_U64 : DS_1A1D_NORET_mc<"ds_dec_u64", VReg_64>;
406 defm DS_MIN_I64 : DS_1A1D_NORET_mc<"ds_min_i64", VReg_64>;
407 defm DS_MAX_I64 : DS_1A1D_NORET_mc<"ds_max_i64", VReg_64>;
408 defm DS_MIN_U64 : DS_1A1D_NORET_mc<"ds_min_u64", VReg_64>;
409 defm DS_MAX_U64 : DS_1A1D_NORET_mc<"ds_max_u64", VReg_64>;
410 defm DS_AND_B64 : DS_1A1D_NORET_mc<"ds_and_b64", VReg_64>;
411 defm DS_OR_B64 : DS_1A1D_NORET_mc<"ds_or_b64", VReg_64>;
412 defm DS_XOR_B64 : DS_1A1D_NORET_mc<"ds_xor_b64", VReg_64>;
413 defm DS_MSKOR_B64 : DS_1A2D_NORET_mc<"ds_mskor_b64", VReg_64>;
415 defm DS_WRITE_B64 : DS_1A1D_NORET_mc<"ds_write_b64", VReg_64>;
416 defm DS_WRITE2_B64 : DS_1A2D_Off8_NORET_mc<"ds_write2_b64", VReg_64>;
417 defm DS_WRITE2ST64_B64: DS_1A2D_Off8_NORET_mc<"ds_write2st64_b64", VReg_64>;
419 defm DS_CMPST_B64 : DS_1A2D_NORET_mc<"ds_cmpst_b64", VReg_64>;
420 defm DS_CMPST_F64 : DS_1A2D_NORET_mc<"ds_cmpst_f64", VReg_64>;
421 defm DS_MIN_F64 : DS_1A1D_NORET_mc<"ds_min_f64", VReg_64>;
422 defm DS_MAX_F64 : DS_1A1D_NORET_mc<"ds_max_f64", VReg_64>;
424 defm DS_ADD_RTN_U32 : DS_1A1D_RET_mc<"ds_add_rtn_u32", VGPR_32, "ds_add_u32">;
425 defm DS_ADD_RTN_F32 : DS_1A1D_RET_mc<"ds_add_rtn_f32", VGPR_32, "ds_add_f32">;
426 defm DS_SUB_RTN_U32 : DS_1A1D_RET_mc<"ds_sub_rtn_u32", VGPR_32, "ds_sub_u32">;
427 defm DS_RSUB_RTN_U32 : DS_1A1D_RET_mc<"ds_rsub_rtn_u32", VGPR_32, "ds_rsub_u32">;
428 defm DS_INC_RTN_U32 : DS_1A1D_RET_mc<"ds_inc_rtn_u32", VGPR_32, "ds_inc_u32">;
429 defm DS_DEC_RTN_U32 : DS_1A1D_RET_mc<"ds_dec_rtn_u32", VGPR_32, "ds_dec_u32">;
430 defm DS_MIN_RTN_I32 : DS_1A1D_RET_mc<"ds_min_rtn_i32", VGPR_32, "ds_min_i32">;
431 defm DS_MAX_RTN_I32 : DS_1A1D_RET_mc<"ds_max_rtn_i32", VGPR_32, "ds_max_i32">;
432 defm DS_MIN_RTN_U32 : DS_1A1D_RET_mc<"ds_min_rtn_u32", VGPR_32, "ds_min_u32">;
433 defm DS_MAX_RTN_U32 : DS_1A1D_RET_mc<"ds_max_rtn_u32", VGPR_32, "ds_max_u32">;
434 defm DS_AND_RTN_B32 : DS_1A1D_RET_mc<"ds_and_rtn_b32", VGPR_32, "ds_and_b32">;
435 defm DS_OR_RTN_B32 : DS_1A1D_RET_mc<"ds_or_rtn_b32", VGPR_32, "ds_or_b32">;
436 defm DS_XOR_RTN_B32 : DS_1A1D_RET_mc<"ds_xor_rtn_b32", VGPR_32, "ds_xor_b32">;
437 defm DS_MSKOR_RTN_B32 : DS_1A2D_RET_mc<"ds_mskor_rtn_b32", VGPR_32, "ds_mskor_b32">;
438 defm DS_CMPST_RTN_B32 : DS_1A2D_RET_mc<"ds_cmpst_rtn_b32", VGPR_32, "ds_cmpst_b32">;
439 defm DS_CMPST_RTN_F32 : DS_1A2D_RET_mc<"ds_cmpst_rtn_f32", VGPR_32, "ds_cmpst_f32">;
440 defm DS_MIN_RTN_F32 : DS_1A1D_RET_mc<"ds_min_rtn_f32", VGPR_32, "ds_min_f32">;
441 defm DS_MAX_RTN_F32 : DS_1A1D_RET_mc<"ds_max_rtn_f32", VGPR_32, "ds_max_f32">;
443 defm DS_WRXCHG_RTN_B32 : DS_1A1D_RET_mc<"ds_wrxchg_rtn_b32">;
444 defm DS_WRXCHG2_RTN_B32 : DS_1A2D_Off8_RET_mc<"ds_wrxchg2_rtn_b32", VReg_64, VGPR_32>;
445 defm DS_WRXCHG2ST64_RTN_B32 : DS_1A2D_Off8_RET_mc<"ds_wrxchg2st64_rtn_b32", VReg_64, VGPR_32>;
447 defm DS_ADD_RTN_U64 : DS_1A1D_RET_mc<"ds_add_rtn_u64", VReg_64, "ds_add_u64">;
448 defm DS_SUB_RTN_U64 : DS_1A1D_RET_mc<"ds_sub_rtn_u64", VReg_64, "ds_sub_u64">;
449 defm DS_RSUB_RTN_U64 : DS_1A1D_RET_mc<"ds_rsub_rtn_u64", VReg_64, "ds_rsub_u64">;
450 defm DS_INC_RTN_U64 : DS_1A1D_RET_mc<"ds_inc_rtn_u64", VReg_64, "ds_inc_u64">;
451 defm DS_DEC_RTN_U64 : DS_1A1D_RET_mc<"ds_dec_rtn_u64", VReg_64, "ds_dec_u64">;
452 defm DS_MIN_RTN_I64 : DS_1A1D_RET_mc<"ds_min_rtn_i64", VReg_64, "ds_min_i64">;
453 defm DS_MAX_RTN_I64 : DS_1A1D_RET_mc<"ds_max_rtn_i64", VReg_64, "ds_max_i64">;
454 defm DS_MIN_RTN_U64 : DS_1A1D_RET_mc<"ds_min_rtn_u64", VReg_64, "ds_min_u64">;
455 defm DS_MAX_RTN_U64 : DS_1A1D_RET_mc<"ds_max_rtn_u64", VReg_64, "ds_max_u64">;
456 defm DS_AND_RTN_B64 : DS_1A1D_RET_mc<"ds_and_rtn_b64", VReg_64, "ds_and_b64">;
457 defm DS_OR_RTN_B64 : DS_1A1D_RET_mc<"ds_or_rtn_b64", VReg_64, "ds_or_b64">;
458 defm DS_XOR_RTN_B64 : DS_1A1D_RET_mc<"ds_xor_rtn_b64", VReg_64, "ds_xor_b64">;
459 defm DS_MSKOR_RTN_B64 : DS_1A2D_RET_mc<"ds_mskor_rtn_b64", VReg_64, "ds_mskor_b64">;
460 defm DS_CMPST_RTN_B64 : DS_1A2D_RET_mc<"ds_cmpst_rtn_b64", VReg_64, "ds_cmpst_b64">;
461 defm DS_CMPST_RTN_F64 : DS_1A2D_RET_mc<"ds_cmpst_rtn_f64", VReg_64, "ds_cmpst_f64">;
462 defm DS_MIN_RTN_F64 : DS_1A1D_RET_mc<"ds_min_rtn_f64", VReg_64, "ds_min_f64">;
463 defm DS_MAX_RTN_F64 : DS_1A1D_RET_mc<"ds_max_rtn_f64", VReg_64, "ds_max_f64">;
465 defm DS_WRXCHG_RTN_B64 : DS_1A1D_RET_mc<"ds_wrxchg_rtn_b64", VReg_64>;
466 defm DS_WRXCHG2_RTN_B64 : DS_1A2D_Off8_RET_mc<"ds_wrxchg2_rtn_b64", VReg_128, VReg_64>;
467 defm DS_WRXCHG2ST64_RTN_B64 : DS_1A2D_Off8_RET_mc<"ds_wrxchg2st64_rtn_b64", VReg_128, VReg_64>;
469 def DS_GWS_INIT : DS_GWS_1D<"ds_gws_init">;
470 def DS_GWS_SEMA_V : DS_GWS_0D<"ds_gws_sema_v">;
471 def DS_GWS_SEMA_BR : DS_GWS_1D<"ds_gws_sema_br">;
472 def DS_GWS_SEMA_P : DS_GWS_0D<"ds_gws_sema_p">;
473 def DS_GWS_BARRIER : DS_GWS_1D<"ds_gws_barrier">;
475 def DS_ADD_SRC2_U32 : DS_1A<"ds_add_src2_u32">;
476 def DS_SUB_SRC2_U32 : DS_1A<"ds_sub_src2_u32">;
477 def DS_RSUB_SRC2_U32 : DS_1A<"ds_rsub_src2_u32">;
478 def DS_INC_SRC2_U32 : DS_1A<"ds_inc_src2_u32">;
479 def DS_DEC_SRC2_U32 : DS_1A<"ds_dec_src2_u32">;
480 def DS_MIN_SRC2_I32 : DS_1A<"ds_min_src2_i32">;
481 def DS_MAX_SRC2_I32 : DS_1A<"ds_max_src2_i32">;
482 def DS_MIN_SRC2_U32 : DS_1A<"ds_min_src2_u32">;
483 def DS_MAX_SRC2_U32 : DS_1A<"ds_max_src2_u32">;
484 def DS_AND_SRC2_B32 : DS_1A<"ds_and_src2_b32">;
485 def DS_OR_SRC2_B32 : DS_1A<"ds_or_src2_b32">;
486 def DS_XOR_SRC2_B32 : DS_1A<"ds_xor_src2_b32">;
487 def DS_MIN_SRC2_F32 : DS_1A<"ds_min_src2_f32">;
488 def DS_MAX_SRC2_F32 : DS_1A<"ds_max_src2_f32">;
490 def DS_ADD_SRC2_U64 : DS_1A<"ds_add_src2_u64">;
491 def DS_SUB_SRC2_U64 : DS_1A<"ds_sub_src2_u64">;
492 def DS_RSUB_SRC2_U64 : DS_1A<"ds_rsub_src2_u64">;
493 def DS_INC_SRC2_U64 : DS_1A<"ds_inc_src2_u64">;
494 def DS_DEC_SRC2_U64 : DS_1A<"ds_dec_src2_u64">;
495 def DS_MIN_SRC2_I64 : DS_1A<"ds_min_src2_i64">;
496 def DS_MAX_SRC2_I64 : DS_1A<"ds_max_src2_i64">;
497 def DS_MIN_SRC2_U64 : DS_1A<"ds_min_src2_u64">;
498 def DS_MAX_SRC2_U64 : DS_1A<"ds_max_src2_u64">;
499 def DS_AND_SRC2_B64 : DS_1A<"ds_and_src2_b64">;
500 def DS_OR_SRC2_B64 : DS_1A<"ds_or_src2_b64">;
501 def DS_XOR_SRC2_B64 : DS_1A<"ds_xor_src2_b64">;
502 def DS_MIN_SRC2_F64 : DS_1A<"ds_min_src2_f64">;
503 def DS_MAX_SRC2_F64 : DS_1A<"ds_max_src2_f64">;
505 def DS_WRITE_SRC2_B32 : DS_1A<"ds_write_src2_b32">;
506 def DS_WRITE_SRC2_B64 : DS_1A<"ds_write_src2_b64">;
508 let Uses = [EXEC], mayLoad = 0, mayStore = 0, isConvergent = 1 in {
509 def DS_SWIZZLE_B32 : DS_1A_RET <"ds_swizzle_b32", VGPR_32, 0, SwizzleImm>;
512 let mayStore = 0 in {
513 defm DS_READ_I8 : DS_1A_RET_mc<"ds_read_i8">;
514 defm DS_READ_U8 : DS_1A_RET_mc<"ds_read_u8">;
515 defm DS_READ_I16 : DS_1A_RET_mc<"ds_read_i16">;
516 defm DS_READ_U16 : DS_1A_RET_mc<"ds_read_u16">;
517 defm DS_READ_B32 : DS_1A_RET_mc<"ds_read_b32">;
518 defm DS_READ_B64 : DS_1A_RET_mc<"ds_read_b64", VReg_64>;
520 defm DS_READ2_B32 : DS_1A_Off8_RET_mc<"ds_read2_b32", VReg_64>;
521 defm DS_READ2ST64_B32: DS_1A_Off8_RET_mc<"ds_read2st64_b32", VReg_64>;
523 defm DS_READ2_B64 : DS_1A_Off8_RET_mc<"ds_read2_b64", VReg_128>;
524 defm DS_READ2ST64_B64: DS_1A_Off8_RET_mc<"ds_read2st64_b64", VReg_128>;
526 let has_m0_read = 0 in {
527 let SubtargetPredicate = HasD16LoadStore in {
528 def DS_READ_U8_D16 : DS_1A_RET_Tied<"ds_read_u8_d16">;
529 def DS_READ_U8_D16_HI : DS_1A_RET_Tied<"ds_read_u8_d16_hi">;
530 def DS_READ_I8_D16 : DS_1A_RET_Tied<"ds_read_i8_d16">;
531 def DS_READ_I8_D16_HI : DS_1A_RET_Tied<"ds_read_i8_d16_hi">;
532 def DS_READ_U16_D16 : DS_1A_RET_Tied<"ds_read_u16_d16">;
533 def DS_READ_U16_D16_HI : DS_1A_RET_Tied<"ds_read_u16_d16_hi">;
536 let SubtargetPredicate = HasDSAddTid in {
537 def DS_READ_ADDTID_B32 : DS_1A_RET<"ds_read_addtid_b32">;
539 } // End has_m0_read = 0
542 def DS_CONSUME : DS_0A_RET<"ds_consume">;
543 def DS_APPEND : DS_0A_RET<"ds_append">;
544 def DS_ORDERED_COUNT : DS_1A_RET_GDS<"ds_ordered_count">;
546 //===----------------------------------------------------------------------===//
547 // Instruction definitions for CI and newer.
548 //===----------------------------------------------------------------------===//
550 let SubtargetPredicate = isCIVI in {
552 defm DS_WRAP_RTN_B32 : DS_1A2D_RET_mc<"ds_wrap_rtn_b32", VGPR_32>;
553 defm DS_CONDXCHG32_RTN_B64 : DS_1A1D_RET_mc<"ds_condxchg32_rtn_b64", VReg_64>;
555 def DS_GWS_SEMA_RELEASE_ALL : DS_GWS_0D<"ds_gws_sema_release_all">;
557 let mayStore = 0 in {
558 defm DS_READ_B96 : DS_1A_RET_mc<"ds_read_b96", VReg_96>;
559 defm DS_READ_B128: DS_1A_RET_mc<"ds_read_b128", VReg_128>;
560 } // End mayStore = 0
563 defm DS_WRITE_B96 : DS_1A1D_NORET_mc<"ds_write_b96", VReg_96>;
564 defm DS_WRITE_B128 : DS_1A1D_NORET_mc<"ds_write_b128", VReg_128>;
567 def DS_NOP : DS_VOID<"ds_nop">;
569 } // let SubtargetPredicate = isCIVI
571 //===----------------------------------------------------------------------===//
572 // Instruction definitions for VI and newer.
573 //===----------------------------------------------------------------------===//
575 let SubtargetPredicate = isVI in {
577 let Uses = [EXEC] in {
578 def DS_PERMUTE_B32 : DS_1A1D_PERMUTE <"ds_permute_b32",
579 int_amdgcn_ds_permute>;
580 def DS_BPERMUTE_B32 : DS_1A1D_PERMUTE <"ds_bpermute_b32",
581 int_amdgcn_ds_bpermute>;
584 def DS_ADD_SRC2_F32 : DS_1A<"ds_add_src2_f32">;
586 } // let SubtargetPredicate = isVI
588 //===----------------------------------------------------------------------===//
590 //===----------------------------------------------------------------------===//
593 (int_amdgcn_ds_swizzle i32:$src, imm:$offset16),
594 (DS_SWIZZLE_B32 $src, (as_i16imm $offset16), (i1 0))
597 class DSReadPat <DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
598 (vt (frag (DS1Addr1Offset i32:$ptr, i32:$offset))),
599 (inst $ptr, (as_i16imm $offset), (i1 0))
602 multiclass DSReadPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
604 let OtherPredicates = [LDSRequiresM0Init] in {
605 def : DSReadPat<inst, vt, !cast<PatFrag>(frag#"_m0")>;
608 let OtherPredicates = [NotLDSRequiresM0Init] in {
609 def : DSReadPat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt, !cast<PatFrag>(frag)>;
614 multiclass DSReadPat_Hi16 <DS_Pseudo inst, PatFrag frag, ValueType vt = i16> {
616 (build_vector vt:$lo, (vt (frag (DS1Addr1Offset i32:$ptr, i32:$offset)))),
617 (v2i16 (inst $ptr, (as_i16imm $offset), (i1 0), $lo))
621 (build_vector f16:$lo, (f16 (bitconvert (vt (frag (DS1Addr1Offset i32:$ptr, i32:$offset)))))),
622 (v2f16 (inst $ptr, (as_i16imm $offset), (i1 0), $lo))
626 multiclass DSReadPat_Lo16 <DS_Pseudo inst, PatFrag frag, ValueType vt = i16> {
628 (build_vector (vt (frag (DS1Addr1Offset i32:$ptr, i32:$offset))), (vt (Hi16Elt vt:$hi))),
629 (v2i16 (inst $ptr, (as_i16imm $offset), 0, $hi))
633 (build_vector (f16 (bitconvert (vt (frag (DS1Addr1Offset i32:$ptr, i32:$offset))))), (f16 (Hi16Elt f16:$hi))),
634 (v2f16 (inst $ptr, (as_i16imm $offset), 0, $hi))
638 defm : DSReadPat_mc <DS_READ_I8, i32, "sextloadi8_local">;
639 defm : DSReadPat_mc <DS_READ_U8, i32, "az_extloadi8_local">;
640 defm : DSReadPat_mc <DS_READ_I8, i16, "sextloadi8_local">;
641 defm : DSReadPat_mc <DS_READ_U8, i16, "az_extloadi8_local">;
642 defm : DSReadPat_mc <DS_READ_I16, i32, "sextloadi16_local">;
643 defm : DSReadPat_mc <DS_READ_I16, i32, "sextloadi16_local">;
644 defm : DSReadPat_mc <DS_READ_U16, i32, "az_extloadi16_local">;
645 defm : DSReadPat_mc <DS_READ_U16, i16, "load_local">;
646 defm : DSReadPat_mc <DS_READ_B32, i32, "load_local">;
647 defm : DSReadPat_mc <DS_READ_B32, i32, "atomic_load_32_local">;
648 defm : DSReadPat_mc <DS_READ_B64, i64, "atomic_load_64_local">;
650 let AddedComplexity = 100 in {
652 defm : DSReadPat_mc <DS_READ_B64, v2i32, "load_align8_local">;
653 defm : DSReadPat_mc <DS_READ_B128, v4i32, "load_align16_local">;
655 } // End AddedComplexity = 100
657 let OtherPredicates = [D16PreservesUnusedBits] in {
658 let AddedComplexity = 100 in {
659 defm : DSReadPat_Hi16<DS_READ_U16_D16_HI, load_local>;
660 defm : DSReadPat_Hi16<DS_READ_U8_D16_HI, az_extloadi8_local>;
661 defm : DSReadPat_Hi16<DS_READ_I8_D16_HI, sextloadi8_local>;
663 defm : DSReadPat_Lo16<DS_READ_U16_D16, load_local>;
664 defm : DSReadPat_Lo16<DS_READ_U8_D16, az_extloadi8_local>;
665 defm : DSReadPat_Lo16<DS_READ_I8_D16, sextloadi8_local>;
670 class DSWritePat <DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
671 (frag vt:$value, (DS1Addr1Offset i32:$ptr, i32:$offset)),
672 (inst $ptr, $value, (as_i16imm $offset), (i1 0))
675 multiclass DSWritePat_mc <DS_Pseudo inst, ValueType vt, string frag> {
676 let OtherPredicates = [LDSRequiresM0Init] in {
677 def : DSWritePat<inst, vt, !cast<PatFrag>(frag#"_m0")>;
680 let OtherPredicates = [NotLDSRequiresM0Init] in {
681 def : DSWritePat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt, !cast<PatFrag>(frag)>;
685 // Irritatingly, atomic_store reverses the order of operands from a
687 class DSAtomicWritePat <DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
688 (frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$value),
689 (inst $ptr, $value, (as_i16imm $offset), (i1 0))
692 multiclass DSAtomicWritePat_mc <DS_Pseudo inst, ValueType vt, string frag> {
693 let OtherPredicates = [LDSRequiresM0Init] in {
694 def : DSAtomicWritePat<inst, vt, !cast<PatFrag>(frag#"_m0")>;
697 let OtherPredicates = [NotLDSRequiresM0Init] in {
698 def : DSAtomicWritePat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt, !cast<PatFrag>(frag)>;
702 defm : DSWritePat_mc <DS_WRITE_B8, i32, "truncstorei8_local">;
703 defm : DSWritePat_mc <DS_WRITE_B16, i32, "truncstorei16_local">;
704 defm : DSWritePat_mc <DS_WRITE_B8, i16, "truncstorei8_local">;
705 defm : DSWritePat_mc <DS_WRITE_B16, i16, "store_local">;
706 defm : DSWritePat_mc <DS_WRITE_B32, i32, "store_local">;
707 defm : DSAtomicWritePat_mc <DS_WRITE_B32, i32, "atomic_store_local">;
708 defm : DSAtomicWritePat_mc <DS_WRITE_B64, i64, "atomic_store_local">;
710 let OtherPredicates = [D16PreservesUnusedBits] in {
711 def : DSWritePat <DS_WRITE_B16_D16_HI, i32, store_local_hi16>;
712 def : DSWritePat <DS_WRITE_B8_D16_HI, i32, truncstorei8_local_hi16>;
716 class DS64Bit4ByteAlignedReadPat<DS_Pseudo inst, PatFrag frag> : GCNPat <
717 (v2i32 (frag (DS64Bit4ByteAligned i32:$ptr, i8:$offset0, i8:$offset1))),
718 (inst $ptr, $offset0, $offset1, (i1 0))
721 class DS64Bit4ByteAlignedWritePat<DS_Pseudo inst, PatFrag frag> : GCNPat<
722 (frag v2i32:$value, (DS64Bit4ByteAligned i32:$ptr, i8:$offset0, i8:$offset1)),
723 (inst $ptr, (i32 (EXTRACT_SUBREG $value, sub0)),
724 (i32 (EXTRACT_SUBREG $value, sub1)), $offset0, $offset1,
728 // v2i32 loads are split into i32 loads on SI during lowering, due to a bug
729 // related to bounds checking.
730 let OtherPredicates = [LDSRequiresM0Init, isCIVI] in {
731 def : DS64Bit4ByteAlignedReadPat<DS_READ2_B32, load_local_m0>;
732 def : DS64Bit4ByteAlignedWritePat<DS_WRITE2_B32, store_local_m0>;
735 let OtherPredicates = [NotLDSRequiresM0Init] in {
736 def : DS64Bit4ByteAlignedReadPat<DS_READ2_B32_gfx9, load_local>;
737 def : DS64Bit4ByteAlignedWritePat<DS_WRITE2_B32_gfx9, store_local>;
741 let AddedComplexity = 100 in {
743 defm : DSWritePat_mc <DS_WRITE_B64, v2i32, "store_align8_local">;
744 defm : DSWritePat_mc <DS_WRITE_B128, v4i32, "store_align16_local">;
746 } // End AddedComplexity = 100
747 class DSAtomicRetPat<DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
748 (frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$value),
749 (inst $ptr, $value, (as_i16imm $offset), (i1 0))
752 multiclass DSAtomicRetPat_mc<DS_Pseudo inst, ValueType vt, string frag> {
753 let OtherPredicates = [LDSRequiresM0Init] in {
754 def : DSAtomicRetPat<inst, vt, !cast<PatFrag>(frag#"_m0")>;
757 let OtherPredicates = [NotLDSRequiresM0Init] in {
758 def : DSAtomicRetPat<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt,
759 !cast<PatFrag>(frag)>;
765 class DSAtomicCmpXChg<DS_Pseudo inst, ValueType vt, PatFrag frag> : GCNPat <
766 (frag (DS1Addr1Offset i32:$ptr, i32:$offset), vt:$cmp, vt:$swap),
767 (inst $ptr, $cmp, $swap, (as_i16imm $offset), (i1 0))
770 multiclass DSAtomicCmpXChg_mc<DS_Pseudo inst, ValueType vt, string frag> {
771 let OtherPredicates = [LDSRequiresM0Init] in {
772 def : DSAtomicCmpXChg<inst, vt, !cast<PatFrag>(frag#"_m0")>;
775 let OtherPredicates = [NotLDSRequiresM0Init] in {
776 def : DSAtomicCmpXChg<!cast<DS_Pseudo>(!cast<string>(inst)#"_gfx9"), vt,
777 !cast<PatFrag>(frag)>;
784 defm : DSAtomicRetPat_mc<DS_WRXCHG_RTN_B32, i32, "atomic_swap_local">;
785 defm : DSAtomicRetPat_mc<DS_ADD_RTN_U32, i32, "atomic_load_add_local">;
786 defm : DSAtomicRetPat_mc<DS_SUB_RTN_U32, i32, "atomic_load_sub_local">;
787 defm : DSAtomicRetPat_mc<DS_INC_RTN_U32, i32, "atomic_inc_local">;
788 defm : DSAtomicRetPat_mc<DS_DEC_RTN_U32, i32, "atomic_dec_local">;
789 defm : DSAtomicRetPat_mc<DS_AND_RTN_B32, i32, "atomic_load_and_local">;
790 defm : DSAtomicRetPat_mc<DS_OR_RTN_B32, i32, "atomic_load_or_local">;
791 defm : DSAtomicRetPat_mc<DS_XOR_RTN_B32, i32, "atomic_load_xor_local">;
792 defm : DSAtomicRetPat_mc<DS_MIN_RTN_I32, i32, "atomic_load_min_local">;
793 defm : DSAtomicRetPat_mc<DS_MAX_RTN_I32, i32, "atomic_load_max_local">;
794 defm : DSAtomicRetPat_mc<DS_MIN_RTN_U32, i32, "atomic_load_umin_local">;
795 defm : DSAtomicRetPat_mc<DS_MAX_RTN_U32, i32, "atomic_load_umax_local">;
796 defm : DSAtomicCmpXChg_mc<DS_CMPST_RTN_B32, i32, "atomic_cmp_swap_local">;
797 defm : DSAtomicRetPat_mc<DS_MIN_RTN_F32, f32, "atomic_load_fmin_local">;
798 defm : DSAtomicRetPat_mc<DS_MAX_RTN_F32, f32, "atomic_load_fmax_local">;
799 defm : DSAtomicRetPat_mc<DS_ADD_RTN_F32, f32, "atomic_load_fadd_local">;
802 defm : DSAtomicRetPat_mc<DS_WRXCHG_RTN_B64, i64, "atomic_swap_local">;
803 defm : DSAtomicRetPat_mc<DS_ADD_RTN_U64, i64, "atomic_load_add_local">;
804 defm : DSAtomicRetPat_mc<DS_SUB_RTN_U64, i64, "atomic_load_sub_local">;
805 defm : DSAtomicRetPat_mc<DS_INC_RTN_U64, i64, "atomic_inc_local">;
806 defm : DSAtomicRetPat_mc<DS_DEC_RTN_U64, i64, "atomic_dec_local">;
807 defm : DSAtomicRetPat_mc<DS_AND_RTN_B64, i64, "atomic_load_and_local">;
808 defm : DSAtomicRetPat_mc<DS_OR_RTN_B64, i64, "atomic_load_or_local">;
809 defm : DSAtomicRetPat_mc<DS_XOR_RTN_B64, i64, "atomic_load_xor_local">;
810 defm : DSAtomicRetPat_mc<DS_MIN_RTN_I64, i64, "atomic_load_min_local">;
811 defm : DSAtomicRetPat_mc<DS_MAX_RTN_I64, i64, "atomic_load_max_local">;
812 defm : DSAtomicRetPat_mc<DS_MIN_RTN_U64, i64, "atomic_load_umin_local">;
813 defm : DSAtomicRetPat_mc<DS_MAX_RTN_U64, i64, "atomic_load_umax_local">;
815 defm : DSAtomicCmpXChg_mc<DS_CMPST_RTN_B64, i64, "atomic_cmp_swap_local">;
818 (SIds_ordered_count i32:$value, i16:$offset),
819 (DS_ORDERED_COUNT $value, (as_i16imm $offset))
822 //===----------------------------------------------------------------------===//
824 //===----------------------------------------------------------------------===//
826 //===----------------------------------------------------------------------===//
828 //===----------------------------------------------------------------------===//
830 class DS_Real_si <bits<8> op, DS_Pseudo ds> :
832 SIMCInstr <ds.Mnemonic, SIEncodingFamily.SI> {
833 let AssemblerPredicates=[isSICI];
834 let DecoderNamespace="SICI";
837 let Inst{7-0} = !if(ds.has_offset0, offset0, 0);
838 let Inst{15-8} = !if(ds.has_offset1, offset1, 0);
839 let Inst{17} = !if(ds.has_gds, gds, ds.gdsValue);
840 let Inst{25-18} = op;
841 let Inst{31-26} = 0x36; // ds prefix
842 let Inst{39-32} = !if(ds.has_addr, addr, 0);
843 let Inst{47-40} = !if(ds.has_data0, data0, 0);
844 let Inst{55-48} = !if(ds.has_data1, data1, 0);
845 let Inst{63-56} = !if(ds.has_vdst, vdst, 0);
848 def DS_ADD_U32_si : DS_Real_si<0x0, DS_ADD_U32>;
849 def DS_SUB_U32_si : DS_Real_si<0x1, DS_SUB_U32>;
850 def DS_RSUB_U32_si : DS_Real_si<0x2, DS_RSUB_U32>;
851 def DS_INC_U32_si : DS_Real_si<0x3, DS_INC_U32>;
852 def DS_DEC_U32_si : DS_Real_si<0x4, DS_DEC_U32>;
853 def DS_MIN_I32_si : DS_Real_si<0x5, DS_MIN_I32>;
854 def DS_MAX_I32_si : DS_Real_si<0x6, DS_MAX_I32>;
855 def DS_MIN_U32_si : DS_Real_si<0x7, DS_MIN_U32>;
856 def DS_MAX_U32_si : DS_Real_si<0x8, DS_MAX_U32>;
857 def DS_AND_B32_si : DS_Real_si<0x9, DS_AND_B32>;
858 def DS_OR_B32_si : DS_Real_si<0xa, DS_OR_B32>;
859 def DS_XOR_B32_si : DS_Real_si<0xb, DS_XOR_B32>;
860 def DS_MSKOR_B32_si : DS_Real_si<0xc, DS_MSKOR_B32>;
861 def DS_WRITE_B32_si : DS_Real_si<0xd, DS_WRITE_B32>;
862 def DS_WRITE2_B32_si : DS_Real_si<0xe, DS_WRITE2_B32>;
863 def DS_WRITE2ST64_B32_si : DS_Real_si<0xf, DS_WRITE2ST64_B32>;
864 def DS_CMPST_B32_si : DS_Real_si<0x10, DS_CMPST_B32>;
865 def DS_CMPST_F32_si : DS_Real_si<0x11, DS_CMPST_F32>;
866 def DS_MIN_F32_si : DS_Real_si<0x12, DS_MIN_F32>;
867 def DS_MAX_F32_si : DS_Real_si<0x13, DS_MAX_F32>;
868 def DS_NOP_si : DS_Real_si<0x14, DS_NOP>;
869 def DS_GWS_INIT_si : DS_Real_si<0x19, DS_GWS_INIT>;
870 def DS_GWS_SEMA_V_si : DS_Real_si<0x1a, DS_GWS_SEMA_V>;
871 def DS_GWS_SEMA_BR_si : DS_Real_si<0x1b, DS_GWS_SEMA_BR>;
872 def DS_GWS_SEMA_P_si : DS_Real_si<0x1c, DS_GWS_SEMA_P>;
873 def DS_GWS_BARRIER_si : DS_Real_si<0x1d, DS_GWS_BARRIER>;
874 def DS_WRITE_B8_si : DS_Real_si<0x1e, DS_WRITE_B8>;
875 def DS_WRITE_B16_si : DS_Real_si<0x1f, DS_WRITE_B16>;
876 def DS_ADD_RTN_U32_si : DS_Real_si<0x20, DS_ADD_RTN_U32>;
877 def DS_SUB_RTN_U32_si : DS_Real_si<0x21, DS_SUB_RTN_U32>;
878 def DS_RSUB_RTN_U32_si : DS_Real_si<0x22, DS_RSUB_RTN_U32>;
879 def DS_INC_RTN_U32_si : DS_Real_si<0x23, DS_INC_RTN_U32>;
880 def DS_DEC_RTN_U32_si : DS_Real_si<0x24, DS_DEC_RTN_U32>;
881 def DS_MIN_RTN_I32_si : DS_Real_si<0x25, DS_MIN_RTN_I32>;
882 def DS_MAX_RTN_I32_si : DS_Real_si<0x26, DS_MAX_RTN_I32>;
883 def DS_MIN_RTN_U32_si : DS_Real_si<0x27, DS_MIN_RTN_U32>;
884 def DS_MAX_RTN_U32_si : DS_Real_si<0x28, DS_MAX_RTN_U32>;
885 def DS_AND_RTN_B32_si : DS_Real_si<0x29, DS_AND_RTN_B32>;
886 def DS_OR_RTN_B32_si : DS_Real_si<0x2a, DS_OR_RTN_B32>;
887 def DS_XOR_RTN_B32_si : DS_Real_si<0x2b, DS_XOR_RTN_B32>;
888 def DS_MSKOR_RTN_B32_si : DS_Real_si<0x2c, DS_MSKOR_RTN_B32>;
889 def DS_WRXCHG_RTN_B32_si : DS_Real_si<0x2d, DS_WRXCHG_RTN_B32>;
890 def DS_WRXCHG2_RTN_B32_si : DS_Real_si<0x2e, DS_WRXCHG2_RTN_B32>;
891 def DS_WRXCHG2ST64_RTN_B32_si : DS_Real_si<0x2f, DS_WRXCHG2ST64_RTN_B32>;
892 def DS_CMPST_RTN_B32_si : DS_Real_si<0x30, DS_CMPST_RTN_B32>;
893 def DS_CMPST_RTN_F32_si : DS_Real_si<0x31, DS_CMPST_RTN_F32>;
894 def DS_MIN_RTN_F32_si : DS_Real_si<0x32, DS_MIN_RTN_F32>;
895 def DS_MAX_RTN_F32_si : DS_Real_si<0x33, DS_MAX_RTN_F32>;
897 // These instruction are CI/VI only
898 def DS_WRAP_RTN_B32_si : DS_Real_si<0x34, DS_WRAP_RTN_B32>;
899 def DS_CONDXCHG32_RTN_B64_si : DS_Real_si<0x7e, DS_CONDXCHG32_RTN_B64>;
900 def DS_GWS_SEMA_RELEASE_ALL_si : DS_Real_si<0x18, DS_GWS_SEMA_RELEASE_ALL>;
902 def DS_SWIZZLE_B32_si : DS_Real_si<0x35, DS_SWIZZLE_B32>;
903 def DS_READ_B32_si : DS_Real_si<0x36, DS_READ_B32>;
904 def DS_READ2_B32_si : DS_Real_si<0x37, DS_READ2_B32>;
905 def DS_READ2ST64_B32_si : DS_Real_si<0x38, DS_READ2ST64_B32>;
906 def DS_READ_I8_si : DS_Real_si<0x39, DS_READ_I8>;
907 def DS_READ_U8_si : DS_Real_si<0x3a, DS_READ_U8>;
908 def DS_READ_I16_si : DS_Real_si<0x3b, DS_READ_I16>;
909 def DS_READ_U16_si : DS_Real_si<0x3c, DS_READ_U16>;
910 def DS_CONSUME_si : DS_Real_si<0x3d, DS_CONSUME>;
911 def DS_APPEND_si : DS_Real_si<0x3e, DS_APPEND>;
912 def DS_ORDERED_COUNT_si : DS_Real_si<0x3f, DS_ORDERED_COUNT>;
913 def DS_ADD_U64_si : DS_Real_si<0x40, DS_ADD_U64>;
914 def DS_SUB_U64_si : DS_Real_si<0x41, DS_SUB_U64>;
915 def DS_RSUB_U64_si : DS_Real_si<0x42, DS_RSUB_U64>;
916 def DS_INC_U64_si : DS_Real_si<0x43, DS_INC_U64>;
917 def DS_DEC_U64_si : DS_Real_si<0x44, DS_DEC_U64>;
918 def DS_MIN_I64_si : DS_Real_si<0x45, DS_MIN_I64>;
919 def DS_MAX_I64_si : DS_Real_si<0x46, DS_MAX_I64>;
920 def DS_MIN_U64_si : DS_Real_si<0x47, DS_MIN_U64>;
921 def DS_MAX_U64_si : DS_Real_si<0x48, DS_MAX_U64>;
922 def DS_AND_B64_si : DS_Real_si<0x49, DS_AND_B64>;
923 def DS_OR_B64_si : DS_Real_si<0x4a, DS_OR_B64>;
924 def DS_XOR_B64_si : DS_Real_si<0x4b, DS_XOR_B64>;
925 def DS_MSKOR_B64_si : DS_Real_si<0x4c, DS_MSKOR_B64>;
926 def DS_WRITE_B64_si : DS_Real_si<0x4d, DS_WRITE_B64>;
927 def DS_WRITE2_B64_si : DS_Real_si<0x4E, DS_WRITE2_B64>;
928 def DS_WRITE2ST64_B64_si : DS_Real_si<0x4f, DS_WRITE2ST64_B64>;
929 def DS_CMPST_B64_si : DS_Real_si<0x50, DS_CMPST_B64>;
930 def DS_CMPST_F64_si : DS_Real_si<0x51, DS_CMPST_F64>;
931 def DS_MIN_F64_si : DS_Real_si<0x52, DS_MIN_F64>;
932 def DS_MAX_F64_si : DS_Real_si<0x53, DS_MAX_F64>;
934 def DS_ADD_RTN_U64_si : DS_Real_si<0x60, DS_ADD_RTN_U64>;
935 def DS_SUB_RTN_U64_si : DS_Real_si<0x61, DS_SUB_RTN_U64>;
936 def DS_RSUB_RTN_U64_si : DS_Real_si<0x62, DS_RSUB_RTN_U64>;
937 def DS_INC_RTN_U64_si : DS_Real_si<0x63, DS_INC_RTN_U64>;
938 def DS_DEC_RTN_U64_si : DS_Real_si<0x64, DS_DEC_RTN_U64>;
939 def DS_MIN_RTN_I64_si : DS_Real_si<0x65, DS_MIN_RTN_I64>;
940 def DS_MAX_RTN_I64_si : DS_Real_si<0x66, DS_MAX_RTN_I64>;
941 def DS_MIN_RTN_U64_si : DS_Real_si<0x67, DS_MIN_RTN_U64>;
942 def DS_MAX_RTN_U64_si : DS_Real_si<0x68, DS_MAX_RTN_U64>;
943 def DS_AND_RTN_B64_si : DS_Real_si<0x69, DS_AND_RTN_B64>;
944 def DS_OR_RTN_B64_si : DS_Real_si<0x6a, DS_OR_RTN_B64>;
945 def DS_XOR_RTN_B64_si : DS_Real_si<0x6b, DS_XOR_RTN_B64>;
946 def DS_MSKOR_RTN_B64_si : DS_Real_si<0x6c, DS_MSKOR_RTN_B64>;
947 def DS_WRXCHG_RTN_B64_si : DS_Real_si<0x6d, DS_WRXCHG_RTN_B64>;
948 def DS_WRXCHG2_RTN_B64_si : DS_Real_si<0x6e, DS_WRXCHG2_RTN_B64>;
949 def DS_WRXCHG2ST64_RTN_B64_si : DS_Real_si<0x6f, DS_WRXCHG2ST64_RTN_B64>;
950 def DS_CMPST_RTN_B64_si : DS_Real_si<0x70, DS_CMPST_RTN_B64>;
951 def DS_CMPST_RTN_F64_si : DS_Real_si<0x71, DS_CMPST_RTN_F64>;
952 def DS_MIN_RTN_F64_si : DS_Real_si<0x72, DS_MIN_RTN_F64>;
953 def DS_MAX_RTN_F64_si : DS_Real_si<0x73, DS_MAX_RTN_F64>;
955 def DS_READ_B64_si : DS_Real_si<0x76, DS_READ_B64>;
956 def DS_READ2_B64_si : DS_Real_si<0x77, DS_READ2_B64>;
957 def DS_READ2ST64_B64_si : DS_Real_si<0x78, DS_READ2ST64_B64>;
959 def DS_ADD_SRC2_U32_si : DS_Real_si<0x80, DS_ADD_SRC2_U32>;
960 def DS_SUB_SRC2_U32_si : DS_Real_si<0x81, DS_SUB_SRC2_U32>;
961 def DS_RSUB_SRC2_U32_si : DS_Real_si<0x82, DS_RSUB_SRC2_U32>;
962 def DS_INC_SRC2_U32_si : DS_Real_si<0x83, DS_INC_SRC2_U32>;
963 def DS_DEC_SRC2_U32_si : DS_Real_si<0x84, DS_DEC_SRC2_U32>;
964 def DS_MIN_SRC2_I32_si : DS_Real_si<0x85, DS_MIN_SRC2_I32>;
965 def DS_MAX_SRC2_I32_si : DS_Real_si<0x86, DS_MAX_SRC2_I32>;
966 def DS_MIN_SRC2_U32_si : DS_Real_si<0x87, DS_MIN_SRC2_U32>;
967 def DS_MAX_SRC2_U32_si : DS_Real_si<0x88, DS_MAX_SRC2_U32>;
968 def DS_AND_SRC2_B32_si : DS_Real_si<0x89, DS_AND_SRC2_B32>;
969 def DS_OR_SRC2_B32_si : DS_Real_si<0x8a, DS_OR_SRC2_B32>;
970 def DS_XOR_SRC2_B32_si : DS_Real_si<0x8b, DS_XOR_SRC2_B32>;
971 def DS_WRITE_SRC2_B32_si : DS_Real_si<0x8d, DS_WRITE_SRC2_B32>;
973 def DS_MIN_SRC2_F32_si : DS_Real_si<0x92, DS_MIN_SRC2_F32>;
974 def DS_MAX_SRC2_F32_si : DS_Real_si<0x93, DS_MAX_SRC2_F32>;
976 def DS_ADD_SRC2_U64_si : DS_Real_si<0xc0, DS_ADD_SRC2_U64>;
977 def DS_SUB_SRC2_U64_si : DS_Real_si<0xc1, DS_SUB_SRC2_U64>;
978 def DS_RSUB_SRC2_U64_si : DS_Real_si<0xc2, DS_RSUB_SRC2_U64>;
979 def DS_INC_SRC2_U64_si : DS_Real_si<0xc3, DS_INC_SRC2_U64>;
980 def DS_DEC_SRC2_U64_si : DS_Real_si<0xc4, DS_DEC_SRC2_U64>;
981 def DS_MIN_SRC2_I64_si : DS_Real_si<0xc5, DS_MIN_SRC2_I64>;
982 def DS_MAX_SRC2_I64_si : DS_Real_si<0xc6, DS_MAX_SRC2_I64>;
983 def DS_MIN_SRC2_U64_si : DS_Real_si<0xc7, DS_MIN_SRC2_U64>;
984 def DS_MAX_SRC2_U64_si : DS_Real_si<0xc8, DS_MAX_SRC2_U64>;
985 def DS_AND_SRC2_B64_si : DS_Real_si<0xc9, DS_AND_SRC2_B64>;
986 def DS_OR_SRC2_B64_si : DS_Real_si<0xca, DS_OR_SRC2_B64>;
987 def DS_XOR_SRC2_B64_si : DS_Real_si<0xcb, DS_XOR_SRC2_B64>;
988 def DS_WRITE_SRC2_B64_si : DS_Real_si<0xcd, DS_WRITE_SRC2_B64>;
990 def DS_MIN_SRC2_F64_si : DS_Real_si<0xd2, DS_MIN_SRC2_F64>;
991 def DS_MAX_SRC2_F64_si : DS_Real_si<0xd3, DS_MAX_SRC2_F64>;
992 def DS_WRITE_B96_si : DS_Real_si<0xde, DS_WRITE_B96>;
993 def DS_WRITE_B128_si : DS_Real_si<0xdf, DS_WRITE_B128>;
994 def DS_READ_B96_si : DS_Real_si<0xfe, DS_READ_B96>;
995 def DS_READ_B128_si : DS_Real_si<0xff, DS_READ_B128>;
997 //===----------------------------------------------------------------------===//
999 //===----------------------------------------------------------------------===//
1001 class DS_Real_vi <bits<8> op, DS_Pseudo ds> :
1003 SIMCInstr <ds.Mnemonic, SIEncodingFamily.VI> {
1004 let AssemblerPredicates = [isVI];
1005 let DecoderNamespace="VI";
1008 let Inst{7-0} = !if(ds.has_offset0, offset0, 0);
1009 let Inst{15-8} = !if(ds.has_offset1, offset1, 0);
1010 let Inst{16} = !if(ds.has_gds, gds, ds.gdsValue);
1011 let Inst{24-17} = op;
1012 let Inst{31-26} = 0x36; // ds prefix
1013 let Inst{39-32} = !if(ds.has_addr, addr, 0);
1014 let Inst{47-40} = !if(ds.has_data0, data0, 0);
1015 let Inst{55-48} = !if(ds.has_data1, data1, 0);
1016 let Inst{63-56} = !if(ds.has_vdst, vdst, 0);
1019 def DS_ADD_U32_vi : DS_Real_vi<0x0, DS_ADD_U32>;
1020 def DS_SUB_U32_vi : DS_Real_vi<0x1, DS_SUB_U32>;
1021 def DS_RSUB_U32_vi : DS_Real_vi<0x2, DS_RSUB_U32>;
1022 def DS_INC_U32_vi : DS_Real_vi<0x3, DS_INC_U32>;
1023 def DS_DEC_U32_vi : DS_Real_vi<0x4, DS_DEC_U32>;
1024 def DS_MIN_I32_vi : DS_Real_vi<0x5, DS_MIN_I32>;
1025 def DS_MAX_I32_vi : DS_Real_vi<0x6, DS_MAX_I32>;
1026 def DS_MIN_U32_vi : DS_Real_vi<0x7, DS_MIN_U32>;
1027 def DS_MAX_U32_vi : DS_Real_vi<0x8, DS_MAX_U32>;
1028 def DS_AND_B32_vi : DS_Real_vi<0x9, DS_AND_B32>;
1029 def DS_OR_B32_vi : DS_Real_vi<0xa, DS_OR_B32>;
1030 def DS_XOR_B32_vi : DS_Real_vi<0xb, DS_XOR_B32>;
1031 def DS_MSKOR_B32_vi : DS_Real_vi<0xc, DS_MSKOR_B32>;
1032 def DS_WRITE_B32_vi : DS_Real_vi<0xd, DS_WRITE_B32>;
1033 def DS_WRITE2_B32_vi : DS_Real_vi<0xe, DS_WRITE2_B32>;
1034 def DS_WRITE2ST64_B32_vi : DS_Real_vi<0xf, DS_WRITE2ST64_B32>;
1035 def DS_CMPST_B32_vi : DS_Real_vi<0x10, DS_CMPST_B32>;
1036 def DS_CMPST_F32_vi : DS_Real_vi<0x11, DS_CMPST_F32>;
1037 def DS_MIN_F32_vi : DS_Real_vi<0x12, DS_MIN_F32>;
1038 def DS_MAX_F32_vi : DS_Real_vi<0x13, DS_MAX_F32>;
1039 def DS_NOP_vi : DS_Real_vi<0x14, DS_NOP>;
1040 def DS_ADD_F32_vi : DS_Real_vi<0x15, DS_ADD_F32>;
1041 def DS_GWS_INIT_vi : DS_Real_vi<0x99, DS_GWS_INIT>;
1042 def DS_GWS_SEMA_V_vi : DS_Real_vi<0x9a, DS_GWS_SEMA_V>;
1043 def DS_GWS_SEMA_BR_vi : DS_Real_vi<0x9b, DS_GWS_SEMA_BR>;
1044 def DS_GWS_SEMA_P_vi : DS_Real_vi<0x9c, DS_GWS_SEMA_P>;
1045 def DS_GWS_BARRIER_vi : DS_Real_vi<0x9d, DS_GWS_BARRIER>;
1046 def DS_WRITE_ADDTID_B32_vi : DS_Real_vi<0x1d, DS_WRITE_ADDTID_B32>;
1047 def DS_WRITE_B8_vi : DS_Real_vi<0x1e, DS_WRITE_B8>;
1048 def DS_WRITE_B16_vi : DS_Real_vi<0x1f, DS_WRITE_B16>;
1049 def DS_ADD_RTN_U32_vi : DS_Real_vi<0x20, DS_ADD_RTN_U32>;
1050 def DS_SUB_RTN_U32_vi : DS_Real_vi<0x21, DS_SUB_RTN_U32>;
1051 def DS_RSUB_RTN_U32_vi : DS_Real_vi<0x22, DS_RSUB_RTN_U32>;
1052 def DS_INC_RTN_U32_vi : DS_Real_vi<0x23, DS_INC_RTN_U32>;
1053 def DS_DEC_RTN_U32_vi : DS_Real_vi<0x24, DS_DEC_RTN_U32>;
1054 def DS_MIN_RTN_I32_vi : DS_Real_vi<0x25, DS_MIN_RTN_I32>;
1055 def DS_MAX_RTN_I32_vi : DS_Real_vi<0x26, DS_MAX_RTN_I32>;
1056 def DS_MIN_RTN_U32_vi : DS_Real_vi<0x27, DS_MIN_RTN_U32>;
1057 def DS_MAX_RTN_U32_vi : DS_Real_vi<0x28, DS_MAX_RTN_U32>;
1058 def DS_AND_RTN_B32_vi : DS_Real_vi<0x29, DS_AND_RTN_B32>;
1059 def DS_OR_RTN_B32_vi : DS_Real_vi<0x2a, DS_OR_RTN_B32>;
1060 def DS_XOR_RTN_B32_vi : DS_Real_vi<0x2b, DS_XOR_RTN_B32>;
1061 def DS_MSKOR_RTN_B32_vi : DS_Real_vi<0x2c, DS_MSKOR_RTN_B32>;
1062 def DS_WRXCHG_RTN_B32_vi : DS_Real_vi<0x2d, DS_WRXCHG_RTN_B32>;
1063 def DS_WRXCHG2_RTN_B32_vi : DS_Real_vi<0x2e, DS_WRXCHG2_RTN_B32>;
1064 def DS_WRXCHG2ST64_RTN_B32_vi : DS_Real_vi<0x2f, DS_WRXCHG2ST64_RTN_B32>;
1065 def DS_CMPST_RTN_B32_vi : DS_Real_vi<0x30, DS_CMPST_RTN_B32>;
1066 def DS_CMPST_RTN_F32_vi : DS_Real_vi<0x31, DS_CMPST_RTN_F32>;
1067 def DS_MIN_RTN_F32_vi : DS_Real_vi<0x32, DS_MIN_RTN_F32>;
1068 def DS_MAX_RTN_F32_vi : DS_Real_vi<0x33, DS_MAX_RTN_F32>;
1069 def DS_WRAP_RTN_B32_vi : DS_Real_vi<0x34, DS_WRAP_RTN_B32>;
1070 def DS_ADD_RTN_F32_vi : DS_Real_vi<0x35, DS_ADD_RTN_F32>;
1071 def DS_READ_B32_vi : DS_Real_vi<0x36, DS_READ_B32>;
1072 def DS_READ2_B32_vi : DS_Real_vi<0x37, DS_READ2_B32>;
1073 def DS_READ2ST64_B32_vi : DS_Real_vi<0x38, DS_READ2ST64_B32>;
1074 def DS_READ_I8_vi : DS_Real_vi<0x39, DS_READ_I8>;
1075 def DS_READ_U8_vi : DS_Real_vi<0x3a, DS_READ_U8>;
1076 def DS_READ_I16_vi : DS_Real_vi<0x3b, DS_READ_I16>;
1077 def DS_READ_U16_vi : DS_Real_vi<0x3c, DS_READ_U16>;
1078 def DS_READ_ADDTID_B32_vi : DS_Real_vi<0xb6, DS_READ_ADDTID_B32>;
1079 def DS_CONSUME_vi : DS_Real_vi<0xbd, DS_CONSUME>;
1080 def DS_APPEND_vi : DS_Real_vi<0xbe, DS_APPEND>;
1081 def DS_ORDERED_COUNT_vi : DS_Real_vi<0xbf, DS_ORDERED_COUNT>;
1082 def DS_SWIZZLE_B32_vi : DS_Real_vi<0x3d, DS_SWIZZLE_B32>;
1083 def DS_PERMUTE_B32_vi : DS_Real_vi<0x3e, DS_PERMUTE_B32>;
1084 def DS_BPERMUTE_B32_vi : DS_Real_vi<0x3f, DS_BPERMUTE_B32>;
1086 def DS_ADD_U64_vi : DS_Real_vi<0x40, DS_ADD_U64>;
1087 def DS_SUB_U64_vi : DS_Real_vi<0x41, DS_SUB_U64>;
1088 def DS_RSUB_U64_vi : DS_Real_vi<0x42, DS_RSUB_U64>;
1089 def DS_INC_U64_vi : DS_Real_vi<0x43, DS_INC_U64>;
1090 def DS_DEC_U64_vi : DS_Real_vi<0x44, DS_DEC_U64>;
1091 def DS_MIN_I64_vi : DS_Real_vi<0x45, DS_MIN_I64>;
1092 def DS_MAX_I64_vi : DS_Real_vi<0x46, DS_MAX_I64>;
1093 def DS_MIN_U64_vi : DS_Real_vi<0x47, DS_MIN_U64>;
1094 def DS_MAX_U64_vi : DS_Real_vi<0x48, DS_MAX_U64>;
1095 def DS_AND_B64_vi : DS_Real_vi<0x49, DS_AND_B64>;
1096 def DS_OR_B64_vi : DS_Real_vi<0x4a, DS_OR_B64>;
1097 def DS_XOR_B64_vi : DS_Real_vi<0x4b, DS_XOR_B64>;
1098 def DS_MSKOR_B64_vi : DS_Real_vi<0x4c, DS_MSKOR_B64>;
1099 def DS_WRITE_B64_vi : DS_Real_vi<0x4d, DS_WRITE_B64>;
1100 def DS_WRITE2_B64_vi : DS_Real_vi<0x4E, DS_WRITE2_B64>;
1101 def DS_WRITE2ST64_B64_vi : DS_Real_vi<0x4f, DS_WRITE2ST64_B64>;
1102 def DS_CMPST_B64_vi : DS_Real_vi<0x50, DS_CMPST_B64>;
1103 def DS_CMPST_F64_vi : DS_Real_vi<0x51, DS_CMPST_F64>;
1104 def DS_MIN_F64_vi : DS_Real_vi<0x52, DS_MIN_F64>;
1105 def DS_MAX_F64_vi : DS_Real_vi<0x53, DS_MAX_F64>;
1107 def DS_WRITE_B8_D16_HI_vi : DS_Real_vi<0x54, DS_WRITE_B8_D16_HI>;
1108 def DS_WRITE_B16_D16_HI_vi : DS_Real_vi<0x55, DS_WRITE_B16_D16_HI>;
1110 def DS_READ_U8_D16_vi : DS_Real_vi<0x56, DS_READ_U8_D16>;
1111 def DS_READ_U8_D16_HI_vi : DS_Real_vi<0x57, DS_READ_U8_D16_HI>;
1112 def DS_READ_I8_D16_vi : DS_Real_vi<0x58, DS_READ_I8_D16>;
1113 def DS_READ_I8_D16_HI_vi : DS_Real_vi<0x59, DS_READ_I8_D16_HI>;
1114 def DS_READ_U16_D16_vi : DS_Real_vi<0x5a, DS_READ_U16_D16>;
1115 def DS_READ_U16_D16_HI_vi : DS_Real_vi<0x5b, DS_READ_U16_D16_HI>;
1117 def DS_ADD_RTN_U64_vi : DS_Real_vi<0x60, DS_ADD_RTN_U64>;
1118 def DS_SUB_RTN_U64_vi : DS_Real_vi<0x61, DS_SUB_RTN_U64>;
1119 def DS_RSUB_RTN_U64_vi : DS_Real_vi<0x62, DS_RSUB_RTN_U64>;
1120 def DS_INC_RTN_U64_vi : DS_Real_vi<0x63, DS_INC_RTN_U64>;
1121 def DS_DEC_RTN_U64_vi : DS_Real_vi<0x64, DS_DEC_RTN_U64>;
1122 def DS_MIN_RTN_I64_vi : DS_Real_vi<0x65, DS_MIN_RTN_I64>;
1123 def DS_MAX_RTN_I64_vi : DS_Real_vi<0x66, DS_MAX_RTN_I64>;
1124 def DS_MIN_RTN_U64_vi : DS_Real_vi<0x67, DS_MIN_RTN_U64>;
1125 def DS_MAX_RTN_U64_vi : DS_Real_vi<0x68, DS_MAX_RTN_U64>;
1126 def DS_AND_RTN_B64_vi : DS_Real_vi<0x69, DS_AND_RTN_B64>;
1127 def DS_OR_RTN_B64_vi : DS_Real_vi<0x6a, DS_OR_RTN_B64>;
1128 def DS_XOR_RTN_B64_vi : DS_Real_vi<0x6b, DS_XOR_RTN_B64>;
1129 def DS_MSKOR_RTN_B64_vi : DS_Real_vi<0x6c, DS_MSKOR_RTN_B64>;
1130 def DS_WRXCHG_RTN_B64_vi : DS_Real_vi<0x6d, DS_WRXCHG_RTN_B64>;
1131 def DS_WRXCHG2_RTN_B64_vi : DS_Real_vi<0x6e, DS_WRXCHG2_RTN_B64>;
1132 def DS_WRXCHG2ST64_RTN_B64_vi : DS_Real_vi<0x6f, DS_WRXCHG2ST64_RTN_B64>;
1133 def DS_CONDXCHG32_RTN_B64_vi : DS_Real_vi<0x7e, DS_CONDXCHG32_RTN_B64>;
1134 def DS_GWS_SEMA_RELEASE_ALL_vi : DS_Real_vi<0x98, DS_GWS_SEMA_RELEASE_ALL>;
1135 def DS_CMPST_RTN_B64_vi : DS_Real_vi<0x70, DS_CMPST_RTN_B64>;
1136 def DS_CMPST_RTN_F64_vi : DS_Real_vi<0x71, DS_CMPST_RTN_F64>;
1137 def DS_MIN_RTN_F64_vi : DS_Real_vi<0x72, DS_MIN_RTN_F64>;
1138 def DS_MAX_RTN_F64_vi : DS_Real_vi<0x73, DS_MAX_RTN_F64>;
1140 def DS_READ_B64_vi : DS_Real_vi<0x76, DS_READ_B64>;
1141 def DS_READ2_B64_vi : DS_Real_vi<0x77, DS_READ2_B64>;
1142 def DS_READ2ST64_B64_vi : DS_Real_vi<0x78, DS_READ2ST64_B64>;
1144 def DS_ADD_SRC2_U32_vi : DS_Real_vi<0x80, DS_ADD_SRC2_U32>;
1145 def DS_SUB_SRC2_U32_vi : DS_Real_vi<0x81, DS_SUB_SRC2_U32>;
1146 def DS_RSUB_SRC2_U32_vi : DS_Real_vi<0x82, DS_RSUB_SRC2_U32>;
1147 def DS_INC_SRC2_U32_vi : DS_Real_vi<0x83, DS_INC_SRC2_U32>;
1148 def DS_DEC_SRC2_U32_vi : DS_Real_vi<0x84, DS_DEC_SRC2_U32>;
1149 def DS_MIN_SRC2_I32_vi : DS_Real_vi<0x85, DS_MIN_SRC2_I32>;
1150 def DS_MAX_SRC2_I32_vi : DS_Real_vi<0x86, DS_MAX_SRC2_I32>;
1151 def DS_MIN_SRC2_U32_vi : DS_Real_vi<0x87, DS_MIN_SRC2_U32>;
1152 def DS_MAX_SRC2_U32_vi : DS_Real_vi<0x88, DS_MAX_SRC2_U32>;
1153 def DS_AND_SRC2_B32_vi : DS_Real_vi<0x89, DS_AND_SRC2_B32>;
1154 def DS_OR_SRC2_B32_vi : DS_Real_vi<0x8a, DS_OR_SRC2_B32>;
1155 def DS_XOR_SRC2_B32_vi : DS_Real_vi<0x8b, DS_XOR_SRC2_B32>;
1156 def DS_WRITE_SRC2_B32_vi : DS_Real_vi<0x8d, DS_WRITE_SRC2_B32>;
1157 def DS_MIN_SRC2_F32_vi : DS_Real_vi<0x92, DS_MIN_SRC2_F32>;
1158 def DS_MAX_SRC2_F32_vi : DS_Real_vi<0x93, DS_MAX_SRC2_F32>;
1159 def DS_ADD_SRC2_F32_vi : DS_Real_vi<0x95, DS_ADD_SRC2_F32>;
1160 def DS_ADD_SRC2_U64_vi : DS_Real_vi<0xc0, DS_ADD_SRC2_U64>;
1161 def DS_SUB_SRC2_U64_vi : DS_Real_vi<0xc1, DS_SUB_SRC2_U64>;
1162 def DS_RSUB_SRC2_U64_vi : DS_Real_vi<0xc2, DS_RSUB_SRC2_U64>;
1163 def DS_INC_SRC2_U64_vi : DS_Real_vi<0xc3, DS_INC_SRC2_U64>;
1164 def DS_DEC_SRC2_U64_vi : DS_Real_vi<0xc4, DS_DEC_SRC2_U64>;
1165 def DS_MIN_SRC2_I64_vi : DS_Real_vi<0xc5, DS_MIN_SRC2_I64>;
1166 def DS_MAX_SRC2_I64_vi : DS_Real_vi<0xc6, DS_MAX_SRC2_I64>;
1167 def DS_MIN_SRC2_U64_vi : DS_Real_vi<0xc7, DS_MIN_SRC2_U64>;
1168 def DS_MAX_SRC2_U64_vi : DS_Real_vi<0xc8, DS_MAX_SRC2_U64>;
1169 def DS_AND_SRC2_B64_vi : DS_Real_vi<0xc9, DS_AND_SRC2_B64>;
1170 def DS_OR_SRC2_B64_vi : DS_Real_vi<0xca, DS_OR_SRC2_B64>;
1171 def DS_XOR_SRC2_B64_vi : DS_Real_vi<0xcb, DS_XOR_SRC2_B64>;
1172 def DS_WRITE_SRC2_B64_vi : DS_Real_vi<0xcd, DS_WRITE_SRC2_B64>;
1173 def DS_MIN_SRC2_F64_vi : DS_Real_vi<0xd2, DS_MIN_SRC2_F64>;
1174 def DS_MAX_SRC2_F64_vi : DS_Real_vi<0xd3, DS_MAX_SRC2_F64>;
1175 def DS_WRITE_B96_vi : DS_Real_vi<0xde, DS_WRITE_B96>;
1176 def DS_WRITE_B128_vi : DS_Real_vi<0xdf, DS_WRITE_B128>;
1177 def DS_READ_B96_vi : DS_Real_vi<0xfe, DS_READ_B96>;
1178 def DS_READ_B128_vi : DS_Real_vi<0xff, DS_READ_B128>;