With tfe on there can be a vgpr write to vdata+1.
Add tablegen support for 5 register vdata store.
This is required for 4 register vdata store with tfe.
Differential Revision: https://reviews.llvm.org/D94960
DstSize = (DstSize + 1) / 2;
}
- // FIXME: Add tfe support
if (MI.getOperand(TFEIdx).getImm())
- return MCDisassembler::Success;
+ DstSize += 1;
if (DstSize == Info->VDataDwords && AddrSize == Info->VAddrDwords)
return MCDisassembler::Success;
defm _V3 : MIMG_Store_Addr_Helper <op, asm, VReg_96, 0>;
let VDataDwords = 4 in
defm _V4 : MIMG_Store_Addr_Helper <op, asm, VReg_128, 0>;
+ let VDataDwords = 5 in
+ defm _V5 : MIMG_Store_Addr_Helper <op, asm, VReg_160, 0>;
}
}
# GFX10: image_load_mip_pck_sgn v[16:19], v[8:10], s[4:11] dmask:0xf dim:SQ_RSRC_IMG_2D unorm r128 ; encoding: [0x08,0x9f,0x14,0xf0,0x08,0x10,0x01,0x00]
0x08,0x9f,0x14,0xf0,0x08,0x10,0x01,0x00
+# GFX10: image_load v16, v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x01,0x00,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x01,0x00,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:17], v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x03,0x00,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x03,0x00,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:18], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x07,0x00,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x07,0x00,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:19], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x00,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x0f,0x00,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:17], v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x01,0x01,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x01,0x01,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:18], v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x03,0x01,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x03,0x01,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:19], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x07,0x01,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x07,0x01,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v[16:20], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x0f,0x01,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x0f,0x01,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_load v16, v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x01,0x00,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x01,0x00,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v16, v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x03,0x00,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x03,0x00,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v[16:17], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x07,0x00,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x07,0x00,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v[16:17], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x0f,0x00,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x0f,0x00,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v[16:17], v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x01,0x01,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x01,0x01,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v[16:17], v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x03,0x01,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x03,0x01,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v[16:18], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x07,0x01,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x07,0x01,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_load v[16:18], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x0f,0x01,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x0f,0x01,0xf0,0x08,0x10,0x18,0x80
+
# GFX10: image_store v16, v[8:9], s[96:103] dmask:0x4 dim:SQ_RSRC_IMG_2D unorm ; encoding: [0x08,0x14,0x20,0xf0,0x08,0x10,0x18,0x00]
0x08,0x14,0x20,0xf0,0x08,0x10,0x18,0x00
# GFX10: image_store_mip_pck v[16:19], v[8:11], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_3D unorm ; encoding: [0x10,0x1f,0x2c,0xf0,0x08,0x10,0x18,0x00]
0x10,0x1f,0x2c,0xf0,0x08,0x10,0x18,0x00
+# GFX10: image_store v16, v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x01,0x20,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x01,0x20,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:17], v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x03,0x20,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x03,0x20,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:18], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x07,0x20,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x07,0x20,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:19], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D ; encoding: [0x08,0x0f,0x20,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x0f,0x20,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:17], v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x01,0x21,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x01,0x21,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:18], v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x03,0x21,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x03,0x21,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:19], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x07,0x21,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x07,0x21,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v[16:20], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D tfe ; encoding: [0x08,0x0f,0x21,0xf0,0x08,0x10,0x18,0x00]
+0x08,0x0f,0x21,0xf0,0x08,0x10,0x18,0x00
+
+# GFX10: image_store v16, v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x01,0x20,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x01,0x20,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v16, v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x03,0x20,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x03,0x20,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v[16:17], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x07,0x20,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x07,0x20,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v[16:17], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D d16 ; encoding: [0x08,0x0f,0x20,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x0f,0x20,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v[16:17], v[8:9], s[96:103] dmask:0x1 dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x01,0x21,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x01,0x21,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v[16:17], v[8:9], s[96:103] dmask:0x3 dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x03,0x21,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x03,0x21,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v[16:18], v[8:9], s[96:103] dmask:0x7 dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x07,0x21,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x07,0x21,0xf0,0x08,0x10,0x18,0x80
+
+# GFX10: image_store v[16:18], v[8:9], s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D tfe d16 ; encoding: [0x08,0x0f,0x21,0xf0,0x08,0x10,0x18,0x80]
+0x08,0x0f,0x21,0xf0,0x08,0x10,0x18,0x80
+
# GFX10: image_get_resinfo v[16:19], v8, s[96:103] dmask:0xf dim:SQ_RSRC_IMG_2D_ARRAY unorm ; encoding: [0x28,0x1f,0x38,0xf0,0x08,0x10,0x18,0x00]
0x28,0x1f,0x38,0xf0,0x08,0x10,0x18,0x00
# CHECK: image_load v5, v1, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x00,0xf2,0x01,0x05,0x02,0x00]
0x00,0x01,0x00,0xf2,0x01,0x05,0x02,0x00
-# CHECK: image_load v5, v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x01,0xf0,0x01,0x05,0x02,0x00]
+# CHECK: image_load v[5:6], v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x01,0xf0,0x01,0x05,0x02,0x00]
0x00,0x01,0x01,0xf0,0x01,0x05,0x02,0x00
# CHECK: image_load v5, v1, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x02,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x04,0xf2,0x01,0x05,0x02,0x00]
0x00,0x01,0x04,0xf2,0x01,0x05,0x02,0x00
-# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x05,0xf0,0x01,0x05,0x02,0x00]
+# CHECK: image_load_mip v[5:6], v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x05,0xf0,0x01,0x05,0x02,0x00]
0x00,0x01,0x05,0xf0,0x01,0x05,0x02,0x00
# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x06,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_get_resinfo v5, v1, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x38,0xf2,0x01,0x05,0x02,0x00]
0x00,0x01,0x38,0xf2,0x01,0x05,0x02,0x00
-# CHECK: image_get_resinfo v5, v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x39,0xf0,0x01,0x05,0x02,0x00]
+# CHECK: image_get_resinfo v[5:6], v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x39,0xf0,0x01,0x05,0x02,0x00]
0x00,0x01,0x39,0xf0,0x01,0x05,0x02,0x00
# CHECK: image_get_resinfo v5, v1, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x3a,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_sample v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x80,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x80,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x81,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x81,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x81,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x82,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_cl v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x84,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x84,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_cl v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x85,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_cl v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x85,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x85,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_cl v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x86,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_l v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x90,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x90,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_l v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x91,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_l v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x91,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x91,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_l v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x92,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_b v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x94,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x94,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_b v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x95,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_b v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x95,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x95,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_b v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x96,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_b_cl v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x98,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x98,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_b_cl v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x99,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_b_cl v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x99,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x99,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_b_cl v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x9a,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_lz v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x9c,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x9c,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_lz v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x9d,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_lz v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x9d,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x9d,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_lz v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x9e,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xa0,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xa0,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xa1,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xa1,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xa1,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xa2,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c_cl v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xa4,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xa4,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c_cl v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xa5,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c_cl v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xa5,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xa5,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c_cl v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xa6,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c_l v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xb0,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xb0,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c_l v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xb1,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c_l v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xb1,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xb1,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c_l v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xb2,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c_b v5, v[1:3], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xb4,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xb4,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c_b v5, v[1:3], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xb5,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c_b v[5:6], v[1:3], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xb5,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xb5,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c_b v5, v[1:3], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xb6,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c_b_cl v5, v[1:3], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xb8,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xb8,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c_b_cl v5, v[1:3], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xb9,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c_b_cl v[5:6], v[1:3], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xb9,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xb9,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c_b_cl v5, v[1:3], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xba,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c_lz v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xbc,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xbc,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c_lz v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xbd,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c_lz v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xbd,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xbd,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c_lz v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xbe,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_get_lod v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x80,0xf3,0x01,0x05,0x62,0x00]
0x00,0x01,0x80,0xf3,0x01,0x05,0x62,0x00
-# CHECK: image_get_lod v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x81,0xf1,0x01,0x05,0x62,0x00]
+# CHECK: image_get_lod v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x81,0xf1,0x01,0x05,0x62,0x00]
0x00,0x01,0x81,0xf1,0x01,0x05,0x62,0x00
# CHECK: image_get_lod v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x82,0xf1,0x01,0x05,0x62,0x00]
# CHECK: image_load v5, v1, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x00,0xf2,0x01,0x05,0x02,0x00]
0x00,0x01,0x00,0xf2,0x01,0x05,0x02,0x00
-# CHECK: image_load v5, v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x01,0xf0,0x01,0x05,0x02,0x00]
+# CHECK: image_load v[5:6], v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x01,0xf0,0x01,0x05,0x02,0x00]
0x00,0x01,0x01,0xf0,0x01,0x05,0x02,0x00
# CHECK: image_load v5, v1, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x02,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_load v5, v1, s[8:15] dmask:0x1 d16 ; encoding: [0x00,0x01,0x00,0xf0,0x01,0x05,0x02,0x80]
0x00,0x01,0x00,0xf0,0x01,0x05,0x02,0x80
-# CHECK: image_load v0, v5, s[0:7] dmask:0xf unorm tfe ; encoding: [0x00,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00]
+# CHECK: image_load v[0:4], v5, s[0:7] dmask:0xf unorm tfe ; encoding: [0x00,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00]
0x00,0x1f,0x01,0xf0,0x05,0x00,0x00,0x00
# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x04,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x04,0xf2,0x01,0x05,0x02,0x00]
0x00,0x01,0x04,0xf2,0x01,0x05,0x02,0x00
-# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x05,0xf0,0x01,0x05,0x02,0x00]
+# CHECK: image_load_mip v[5:6], v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x05,0xf0,0x01,0x05,0x02,0x00]
0x00,0x01,0x05,0xf0,0x01,0x05,0x02,0x00
# CHECK: image_load_mip v5, v1, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x06,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_get_resinfo v5, v1, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x38,0xf2,0x01,0x05,0x02,0x00]
0x00,0x01,0x38,0xf2,0x01,0x05,0x02,0x00
-# CHECK: image_get_resinfo v5, v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x39,0xf0,0x01,0x05,0x02,0x00]
+# CHECK: image_get_resinfo v[5:6], v1, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x39,0xf0,0x01,0x05,0x02,0x00]
0x00,0x01,0x39,0xf0,0x01,0x05,0x02,0x00
# CHECK: image_get_resinfo v5, v1, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x3a,0xf0,0x01,0x05,0x02,0x00]
# CHECK: image_sample_cl v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x84,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x84,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_cl v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x85,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_cl v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x85,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x85,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_cl v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x86,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_l v5, v1, s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x90,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x90,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_l v5, v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x91,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_l v[5:6], v1, s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x91,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x91,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_l v5, v1, s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x92,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_b v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x94,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0x94,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_b v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x95,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_b v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x95,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0x95,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_b v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x96,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xa0,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xa0,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xa1,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xa1,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xa1,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xa2,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_c_lz v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xbc,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xbc,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_c_lz v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xbd,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_c_lz v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xbd,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xbd,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_c_lz v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xbe,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_o v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xc0,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xc0,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_o v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xc1,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_o v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xc1,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xc1,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_o v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xc2,0xf0,0x01,0x05,0x62,0x00]
# CHECK: image_sample_lz_o v5, v[1:2], s[8:15], s[12:15] dmask:0x1 slc ; encoding: [0x00,0x01,0xdc,0xf2,0x01,0x05,0x62,0x00]
0x00,0x01,0xdc,0xf2,0x01,0x05,0x62,0x00
-# CHECK: image_sample_lz_o v5, v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xdd,0xf0,0x01,0x05,0x62,0x00]
+# CHECK: image_sample_lz_o v[5:6], v[1:2], s[8:15], s[12:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0xdd,0xf0,0x01,0x05,0x62,0x00]
0x00,0x01,0xdd,0xf0,0x01,0x05,0x62,0x00
# CHECK: image_sample_lz_o v5, v[1:2], s[8:15], s[12:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0xde,0xf0,0x01,0x05,0x62,0x00]
# Test all modifiers
# FIXME: This test is incorrect because r128 assumes a 128-bit SRSRC.
-# FIXME: This test is incorrect because tfe shall increase data size by 1.
-# VI: image_load v5, v1, s[8:15] dmask:0x1 unorm glc slc r128 tfe lwe da d16 ; encoding: [0x00,0xf1,0x03,0xf2,0x01,0x05,0x02,0x80]
+# VI: image_load v[5:6], v1, s[8:15] dmask:0x1 unorm glc slc r128 tfe lwe da d16 ; encoding: [0x00,0xf1,0x03,0xf2,0x01,0x05,0x02,0x80]
0x00,0xf1,0x03,0xf2,0x01,0x05,0x02,0x80
# Test dmask == 0
# GFX81: image_store v[0:1], v4, s[8:15] dmask:0xf d16 ; encoding: [0x00,0x0f,0x20,0xf0,0x04,0x00,0x02,0x80]
0x00,0x0f,0x20,0xf0,0x04,0x00,0x02,0x80
+# GFX80: image_load v[0:2], v4, s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x01,0xf0,0x04,0x00,0x02,0x80]
+# GFX81: image_load v[0:1], v4, s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x01,0xf0,0x04,0x00,0x02,0x80]
+0x00,0x03,0x01,0xf0,0x04,0x00,0x02,0x80
+
+# GFX80: image_load v[0:3], v4, s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x01,0xf0,0x04,0x00,0x02,0x80]
+# GFX81: image_load v[0:2], v4, s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x01,0xf0,0x04,0x00,0x02,0x80]
+0x00,0x07,0x01,0xf0,0x04,0x00,0x02,0x80
+
+# GFX80: image_load v[0:4], v4, s[8:15] dmask:0xf tfe d16 ; encoding: [0x00,0x0f,0x01,0xf0,0x04,0x00,0x02,0x80]
+# GFX81: image_load v[0:2], v4, s[8:15] dmask:0xf tfe d16 ; encoding: [0x00,0x0f,0x01,0xf0,0x04,0x00,0x02,0x80]
+0x00,0x0f,0x01,0xf0,0x04,0x00,0x02,0x80
+
+# GFX80: image_store v[0:2], v4, s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x21,0xf0,0x04,0x00,0x02,0x80]
+# GFX81: image_store v[0:1], v4, s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x21,0xf0,0x04,0x00,0x02,0x80]
+0x00,0x03,0x21,0xf0,0x04,0x00,0x02,0x80
+
+# GFX80: image_store v[0:3], v4, s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x21,0xf0,0x04,0x00,0x02,0x80]
+# GFX81: image_store v[0:2], v4, s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x21,0xf0,0x04,0x00,0x02,0x80]
+0x00,0x07,0x21,0xf0,0x04,0x00,0x02,0x80
+
+# GFX80: image_store v[0:4], v4, s[8:15] dmask:0xf tfe d16 ; encoding: [0x00,0x0f,0x21,0xf0,0x04,0x00,0x02,0x80]
+# GFX81: image_store v[0:2], v4, s[8:15] dmask:0xf tfe d16 ; encoding: [0x00,0x0f,0x21,0xf0,0x04,0x00,0x02,0x80]
+0x00,0x0f,0x21,0xf0,0x04,0x00,0x02,0x80
#===------------------------------------------------------------------------===#
# Image load/store: PCK variants
#===------------------------------------------------------------------------===#