llvm.org GIT mirror llvm / 094e59a
AMDGPU: Correct encoding for global instructions The soffset field needs to be be set to 0x7f to disable it, not 0. 0 is interpreted as an SGPR offset. This should be enough to get basic usage of the global instructions working. Technically it is possible to use an SGPR_32 offset, but I'm not sure if it's correct with 64-bit pointers, but that is not handled now. This should also be cleaned up to be more similar to how different MUBUF modes are handled, and to have InstrMappings between the different types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@308583 91177308-0d34-0410-b5e6-96231b3b80d8 Matt Arsenault 3 years ago
3 changed file(s) with 200 addition(s) and 99 deletion(s). Raw diff Collapse all Expand all
4141 bits<1> is_flat_scratch = 0;
4242
4343 bits<1> has_vdst = 1;
44
45 // We need to distinguish having saddr and enabling saddr because
46 // saddr is only valid for scratch and global instructions. Pre-gfx9
47 // these bits were reserved, so we also don't necessarily want to
48 // set these bits to the disabled value for the original flat
49 // segment instructions.
50 bits<1> has_saddr = 0;
51 bits<1> enabled_saddr = 0;
52 bits<7> saddr_value = 0;
53
4454 bits<1> has_data = 1;
4555 bits<1> has_glc = 1;
4656 bits<1> glcValue = 0;
6575 // encoding fields
6676 bits<8> vaddr;
6777 bits<8> vdata;
78 bits<7> saddr;
6879 bits<8> vdst;
80
6981 bits<1> slc;
7082 bits<1> glc;
7183
95107 let Inst{31-26} = 0x37; // Encoding.
96108 let Inst{39-32} = vaddr;
97109 let Inst{47-40} = !if(ps.has_data, vdata, ?);
110 let Inst{54-48} = !if(ps.has_saddr, !if(ps.enabled_saddr, saddr, 0x7f), 0);
111
98112 // 54-48 is reserved.
99113 let Inst{55} = nv; // nv on GFX9+, TFE before.
100114 let Inst{63-56} = !if(ps.has_vdst, vdst, ?);
101115 }
102116
117 // TODO: Is exec allowed for saddr? The disabled value 0x7f is the
118 // same encoding value as exec_hi, so it isn't possible to use that if
119 // saddr is 32-bit (which isn't handled here yet).
103120 class FLAT_Load_Pseudo
104 bit HasSignedOffset = 0> : FLAT_Pseudo<
121 bit HasSignedOffset = 0, bit HasSaddr = 0, bit EnableSaddr = 0> : FLAT_Pseudo<
105122 opName,
106123 (outs regClass:$vdst),
107 !if(HasSignedOffset,
108 (ins VReg_64:$vaddr, offset_s13:$offset, GLC:$glc, slc:$slc),
109 (ins VReg_64:$vaddr, offset_u12:$offset, GLC:$glc, slc:$slc)),
110 " $vdst, $vaddr$offset$glc$slc"> {
124 !if(EnableSaddr,
125 !if(HasSignedOffset,
126 (ins VReg_64:$vaddr, SReg_64:$saddr, offset_s13:$offset, GLC:$glc, slc:$slc),
127 (ins VReg_64:$vaddr, SReg_64:$saddr, offset_u12:$offset, GLC:$glc, slc:$slc)),
128 !if(HasSignedOffset,
129 (ins VReg_64:$vaddr, offset_s13:$offset, GLC:$glc, slc:$slc),
130 (ins VReg_64:$vaddr, offset_u12:$offset, GLC:$glc, slc:$slc))),
131 " $vdst, $vaddr"#!if(HasSaddr, !if(EnableSaddr, ", $saddr", ", off"), "")#"$offset$glc$slc"> {
111132 let has_data = 0;
112133 let mayLoad = 1;
113 }
114
115 class FLAT_Global_Load_Pseudo :
116 FLAT_Load_Pseudo {
117 let is_flat_global = 1;
134 let has_saddr = HasSaddr;
135 let enabled_saddr = EnableSaddr;
136 let PseudoInstr = opName#!if(!and(HasSaddr, EnableSaddr), "_SADDR", "");
137 }
138
139 multiclass FLAT_Global_Load_Pseudo {
140 let is_flat_global = 1 in {
141 def "" : FLAT_Load_Pseudo;
142 def _SADDR : FLAT_Load_Pseudo;
143 }
118144 }
119145
120146 class FLAT_Scratch_Load_Pseudo :
123149 }
124150
125151 class FLAT_Store_Pseudo
126 bit HasSignedOffset = 0> : FLAT_Pseudo<
152 bit HasSignedOffset = 0, bit HasSaddr = 0, bit EnableSaddr = 0> : FLAT_Pseudo<
127153 opName,
128154 (outs),
129 !if(HasSignedOffset,
130 (ins VReg_64:$vaddr, vdataClass:$vdata, offset_s13:$offset, GLC:$glc, slc:$slc),
131 (ins VReg_64:$vaddr, vdataClass:$vdata, offset_u12:$offset, GLC:$glc, slc:$slc)),
132 " $vaddr, $vdata$offset$glc$slc"> {
155 !if(EnableSaddr,
156 !if(HasSignedOffset,
157 (ins VReg_64:$vaddr, vdataClass:$vdata, SReg_64:$saddr, offset_s13:$offset, GLC:$glc, slc:$slc),
158 (ins VReg_64:$vaddr, vdataClass:$vdata, SReg_64:$saddr, offset_u12:$offset, GLC:$glc, slc:$slc)),
159 !if(HasSignedOffset,
160 (ins VReg_64:$vaddr, vdataClass:$vdata, offset_s13:$offset, GLC:$glc, slc:$slc),
161 (ins VReg_64:$vaddr, vdataClass:$vdata, offset_u12:$offset, GLC:$glc, slc:$slc))),
162 " $vaddr, $vdata"#!if(HasSaddr, !if(EnableSaddr, ", $saddr", ", off"), "")#"$offset$glc$slc"> {
133163 let mayLoad = 0;
134164 let mayStore = 1;
135165 let has_vdst = 0;
136 }
137
138 class FLAT_Global_Store_Pseudo :
139 FLAT_Store_Pseudo {
140 let is_flat_global = 1;
166 let has_saddr = HasSaddr;
167 let enabled_saddr = EnableSaddr;
168 let PseudoInstr = opName#!if(!and(HasSaddr, EnableSaddr), "_SADDR", "");
169 }
170
171 multiclass FLAT_Global_Store_Pseudo {
172 let is_flat_global = 1 in {
173 def "" : FLAT_Store_Pseudo;
174 def _SADDR : FLAT_Store_Pseudo;
175 }
141176 }
142177
143178 class FLAT_Scratch_Store_Pseudo :
333368 } // End SubtargetPredicate = isCI
334369
335370 let SubtargetPredicate = HasFlatGlobalInsts in {
336 def GLOBAL_LOAD_UBYTE : FLAT_Global_Load_Pseudo <"global_load_ubyte", VGPR_32>;
337 def GLOBAL_LOAD_SBYTE : FLAT_Global_Load_Pseudo <"global_load_sbyte", VGPR_32>;
338 def GLOBAL_LOAD_USHORT : FLAT_Global_Load_Pseudo <"global_load_ushort", VGPR_32>;
339 def GLOBAL_LOAD_SSHORT : FLAT_Global_Load_Pseudo <"global_load_sshort", VGPR_32>;
340 def GLOBAL_LOAD_DWORD : FLAT_Global_Load_Pseudo <"global_load_dword", VGPR_32>;
341 def GLOBAL_LOAD_DWORDX2 : FLAT_Global_Load_Pseudo <"global_load_dwordx2", VReg_64>;
342 def GLOBAL_LOAD_DWORDX3 : FLAT_Global_Load_Pseudo <"global_load_dwordx3", VReg_96>;
343 def GLOBAL_LOAD_DWORDX4 : FLAT_Global_Load_Pseudo <"global_load_dwordx4", VReg_128>;
344
345 def GLOBAL_STORE_BYTE : FLAT_Global_Store_Pseudo <"global_store_byte", VGPR_32>;
346 def GLOBAL_STORE_SHORT : FLAT_Global_Store_Pseudo <"global_store_short", VGPR_32>;
347 def GLOBAL_STORE_DWORD : FLAT_Global_Store_Pseudo <"global_store_dword", VGPR_32>;
348 def GLOBAL_STORE_DWORDX2 : FLAT_Global_Store_Pseudo <"global_store_dwordx2", VReg_64>;
349 def GLOBAL_STORE_DWORDX3 : FLAT_Global_Store_Pseudo <"global_store_dwordx3", VReg_96>;
350 def GLOBAL_STORE_DWORDX4 : FLAT_Global_Store_Pseudo <"global_store_dwordx4", VReg_128>;
371 defm GLOBAL_LOAD_UBYTE : FLAT_Global_Load_Pseudo <"global_load_ubyte", VGPR_32>;
372 defm GLOBAL_LOAD_SBYTE : FLAT_Global_Load_Pseudo <"global_load_sbyte", VGPR_32>;
373 defm GLOBAL_LOAD_USHORT : FLAT_Global_Load_Pseudo <"global_load_ushort", VGPR_32>;
374 defm GLOBAL_LOAD_SSHORT : FLAT_Global_Load_Pseudo <"global_load_sshort", VGPR_32>;
375 defm GLOBAL_LOAD_DWORD : FLAT_Global_Load_Pseudo <"global_load_dword", VGPR_32>;
376 defm GLOBAL_LOAD_DWORDX2 : FLAT_Global_Load_Pseudo <"global_load_dwordx2", VReg_64>;
377 defm GLOBAL_LOAD_DWORDX3 : FLAT_Global_Load_Pseudo <"global_load_dwordx3", VReg_96>;
378 defm GLOBAL_LOAD_DWORDX4 : FLAT_Global_Load_Pseudo <"global_load_dwordx4", VReg_128>;
379
380 defm GLOBAL_STORE_BYTE : FLAT_Global_Store_Pseudo <"global_store_byte", VGPR_32>;
381 defm GLOBAL_STORE_SHORT : FLAT_Global_Store_Pseudo <"global_store_short", VGPR_32>;
382 defm GLOBAL_STORE_DWORD : FLAT_Global_Store_Pseudo <"global_store_dword", VGPR_32>;
383 defm GLOBAL_STORE_DWORDX2 : FLAT_Global_Store_Pseudo <"global_store_dwordx2", VReg_64>;
384 defm GLOBAL_STORE_DWORDX3 : FLAT_Global_Store_Pseudo <"global_store_dwordx3", VReg_96>;
385 defm GLOBAL_STORE_DWORDX4 : FLAT_Global_Store_Pseudo <"global_store_dwordx4", VReg_128>;
351386
352387 } // End SubtargetPredicate = HasFlatGlobalInsts
353388
555590 let DecoderNamespace="VI";
556591 }
557592
593 multiclass FLAT_Real_AllAddr_vi op> {
594 def _vi : FLAT_Real_vi(NAME)>;
595 def _SADDR_vi : FLAT_Real_vi(NAME#"_SADDR")>;
596 }
597
558598 def FLAT_LOAD_UBYTE_vi : FLAT_Real_vi <0x10, FLAT_LOAD_UBYTE>;
559599 def FLAT_LOAD_SBYTE_vi : FLAT_Real_vi <0x11, FLAT_LOAD_SBYTE>;
560600 def FLAT_LOAD_USHORT_vi : FLAT_Real_vi <0x12, FLAT_LOAD_USHORT>;
603643 defm FLAT_ATOMIC_INC_X2 : FLAT_Real_Atomics_vi <0x6b, FLAT_ATOMIC_INC_X2>;
604644 defm FLAT_ATOMIC_DEC_X2 : FLAT_Real_Atomics_vi <0x6c, FLAT_ATOMIC_DEC_X2>;
605645
606 def GLOBAL_LOAD_UBYTE_vi : FLAT_Real_vi <0x10, GLOBAL_LOAD_UBYTE>;
607 def GLOBAL_LOAD_SBYTE_vi : FLAT_Real_vi <0x11, GLOBAL_LOAD_SBYTE>;
608 def GLOBAL_LOAD_USHORT_vi : FLAT_Real_vi <0x12, GLOBAL_LOAD_USHORT>;
609 def GLOBAL_LOAD_SSHORT_vi : FLAT_Real_vi <0x13, GLOBAL_LOAD_SSHORT>;
610 def GLOBAL_LOAD_DWORD_vi : FLAT_Real_vi <0x14, GLOBAL_LOAD_DWORD>;
611 def GLOBAL_LOAD_DWORDX2_vi : FLAT_Real_vi <0x15, GLOBAL_LOAD_DWORDX2>;
612 def GLOBAL_LOAD_DWORDX4_vi : FLAT_Real_vi <0x17, GLOBAL_LOAD_DWORDX4>;
613 def GLOBAL_LOAD_DWORDX3_vi : FLAT_Real_vi <0x16, GLOBAL_LOAD_DWORDX3>;
614
615 def GLOBAL_STORE_BYTE_vi : FLAT_Real_vi <0x18, GLOBAL_STORE_BYTE>;
616 def GLOBAL_STORE_SHORT_vi : FLAT_Real_vi <0x1a, GLOBAL_STORE_SHORT>;
617 def GLOBAL_STORE_DWORD_vi : FLAT_Real_vi <0x1c, GLOBAL_STORE_DWORD>;
618 def GLOBAL_STORE_DWORDX2_vi : FLAT_Real_vi <0x1d, GLOBAL_STORE_DWORDX2>;
619 def GLOBAL_STORE_DWORDX4_vi : FLAT_Real_vi <0x1f, GLOBAL_STORE_DWORDX4>;
620 def GLOBAL_STORE_DWORDX3_vi : FLAT_Real_vi <0x1e, GLOBAL_STORE_DWORDX3>;
646 defm GLOBAL_LOAD_UBYTE : FLAT_Real_AllAddr_vi <0x10>;
647 defm GLOBAL_LOAD_SBYTE : FLAT_Real_AllAddr_vi <0x11>;
648 defm GLOBAL_LOAD_USHORT : FLAT_Real_AllAddr_vi <0x12>;
649 defm GLOBAL_LOAD_SSHORT : FLAT_Real_AllAddr_vi <0x13>;
650 defm GLOBAL_LOAD_DWORD : FLAT_Real_AllAddr_vi <0x14>;
651 defm GLOBAL_LOAD_DWORDX2 : FLAT_Real_AllAddr_vi <0x15>;
652 defm GLOBAL_LOAD_DWORDX4 : FLAT_Real_AllAddr_vi <0x17>;
653 defm GLOBAL_LOAD_DWORDX3 : FLAT_Real_AllAddr_vi <0x16>;
654
655 defm GLOBAL_STORE_BYTE : FLAT_Real_AllAddr_vi <0x18>;
656 defm GLOBAL_STORE_SHORT : FLAT_Real_AllAddr_vi <0x1a>;
657 defm GLOBAL_STORE_DWORD : FLAT_Real_AllAddr_vi <0x1c>;
658 defm GLOBAL_STORE_DWORDX2 : FLAT_Real_AllAddr_vi <0x1d>;
659 defm GLOBAL_STORE_DWORDX4 : FLAT_Real_AllAddr_vi <0x1f>;
660 defm GLOBAL_STORE_DWORDX3 : FLAT_Real_AllAddr_vi <0x1e>;
3737 flat_store_dword v[3:4], v1 offset:16
3838 // GFX9: flat_store_dword v[3:4], v1 offset:16 ; encoding: [0x10,0x00,0x70,0xdc,0x03,0x01,0x00,0x00]
3939 // VIERR: :1: error: invalid operand for instruction
40
41 flat_store_dword v[3:4], v1, off
42 // GCNERR: :30: error: invalid operand for instruction
43
44 flat_store_dword v[3:4], v1, s[0:1]
45 // GCNERR: :30: error: invalid operand for instruction
46
47 flat_store_dword v[3:4], v1, s0
48 // GCNERR: :30: error: invalid operand for instruction
49
50 flat_load_dword v1, v[3:4], off
51 // GCNERR: :29: error: invalid operand for instruction
52
53 flat_load_dword v1, v[3:4], s[0:1]
54 // GCNERR: :29: error: invalid operand for instruction
55
56 flat_load_dword v1, v[3:4], s0
57 // GCNERR: :29: error: invalid operand for instruction
58
59 flat_load_dword v1, v[3:4], exec_hi
60 // GCNERR: :29: error: invalid operand for instruction
61
62 flat_store_dword v[3:4], v1, exec_hi
63 // GCNERR: :30: error: invalid operand for instruction
11 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding 2>&1 %s | FileCheck -check-prefix=GFX9-ERR -check-prefix=GCNERR %s
22 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding 2>&1 %s | FileCheck -check-prefix=VI-ERR -check-prefix=GCNERR %s
33
4 global_load_ubyte v1, v[3:4]
5 // GFX9: global_load_ubyte v1, v[3:4] ; encoding: [0x00,0x80,0x40,0xdc,0x03,0x00,0x00,0x01]
4 global_load_ubyte v1, v[3:4], off
5 // GFX9: global_load_ubyte v1, v[3:4], off ; encoding: [0x00,0x80,0x40,0xdc,0x03,0x00,0x7f,0x01]
66 // VI-ERR: instruction not supported on this GPU
77
8 global_load_sbyte v1, v[3:4]
9 // GFX9: global_load_sbyte v1, v[3:4] ; encoding: [0x00,0x80,0x44,0xdc,0x03,0x00,0x00,0x01]
8 global_load_sbyte v1, v[3:4], off
9 // GFX9: global_load_sbyte v1, v[3:4], off ; encoding: [0x00,0x80,0x44,0xdc,0x03,0x00,0x7f,0x01]
1010 // VI-ERR: instruction not supported on this GPU
1111
12 global_load_ushort v1, v[3:4]
13 // GFX9: global_load_ushort v1, v[3:4] ; encoding: [0x00,0x80,0x48,0xdc,0x03,0x00,0x00,0x01]
12 global_load_ushort v1, v[3:4], off
13 // GFX9: global_load_ushort v1, v[3:4], off ; encoding: [0x00,0x80,0x48,0xdc,0x03,0x00,0x7f,0x01]
1414 // VI-ERR: instruction not supported on this GPU
1515
16 global_load_sshort v1, v[3:4]
17 // GFX9: global_load_sshort v1, v[3:4] ; encoding: [0x00,0x80,0x4c,0xdc,0x03,0x00,0x00,0x01]
16 global_load_sshort v1, v[3:4], off
17 // GFX9: global_load_sshort v1, v[3:4], off ; encoding: [0x00,0x80,0x4c,0xdc,0x03,0x00,0x7f,0x01]
1818 // VI-ERR: instruction not supported on this GPU
1919
20 global_load_dword v1, v[3:4]
21 // GFX9: global_load_dword v1, v[3:4] ; encoding: [0x00,0x80,0x50,0xdc,0x03,0x00,0x00,0x01]
20 global_load_dword v1, v[3:4], off
21 // GFX9: global_load_dword v1, v[3:4], off ; encoding: [0x00,0x80,0x50,0xdc,0x03,0x00,0x7f,0x01]
2222 // VI-ERR: instruction not supported on this GPU
2323
24 global_load_dwordx2 v[1:2], v[3:4]
25 // GFX9: global_load_dwordx2 v[1:2], v[3:4] ; encoding: [0x00,0x80,0x54,0xdc,0x03,0x00,0x00,0x01]
24 global_load_dwordx2 v[1:2], v[3:4], off
25 // GFX9: global_load_dwordx2 v[1:2], v[3:4], off ; encoding: [0x00,0x80,0x54,0xdc,0x03,0x00,0x7f,0x01]
2626 // VI-ERR: instruction not supported on this GPU
2727
28 global_load_dwordx3 v[1:3], v[3:4]
29 // GFX9: global_load_dwordx3 v[1:3], v[3:4] ; encoding: [0x00,0x80,0x58,0xdc,0x03,0x00,0x00,0x01]
28 global_load_dwordx3 v[1:3], v[3:4], off
29 // GFX9: global_load_dwordx3 v[1:3], v[3:4], off ; encoding: [0x00,0x80,0x58,0xdc,0x03,0x00,0x7f,0x01]
3030 // VI-ERR: instruction not supported on this GPU
3131
32 global_load_dwordx4 v[1:4], v[3:4]
33 // GFX9: global_load_dwordx4 v[1:4], v[3:4] ; encoding: [0x00,0x80,0x5c,0xdc,0x03,0x00,0x00,0x01]
32 global_load_dwordx4 v[1:4], v[3:4], off
33 // GFX9: global_load_dwordx4 v[1:4], v[3:4], off ; encoding: [0x00,0x80,0x5c,0xdc,0x03,0x00,0x7f,0x01]
3434 // VI-ERR: instruction not supported on this GPU
3535 // FIXME: VI error should be instruction nto supported
36 global_load_dword v1, v[3:4] offset:0
37 // GFX9: global_load_dword v1, v[3:4] ; encoding: [0x00,0x80,0x50,0xdc,0x03,0x00,0x00,0x01]
38 // VI-ERR: :36: error: not a valid operand.
36 global_load_dword v1, v[3:4], off offset:0
37 // GFX9: global_load_dword v1, v[3:4], off ; encoding: [0x00,0x80,0x50,0xdc,0x03,0x00,0x7f,0x01]
38 // VI-ERR: :41: error: not a valid operand.
3939
40 global_load_dword v1, v[3:4] offset:4095
41 // GFX9: global_load_dword v1, v[3:4] offset:4095 ; encoding: [0xff,0x8f,0x50,0xdc,0x03,0x00,0x00,0x01]
42 // VI-ERR: :36: error: not a valid operand.
40 global_load_dword v1, v[3:4], off offset:4095
41 // GFX9: global_load_dword v1, v[3:4], off offset:4095 ; encoding: [0xff,0x8f,0x50,0xdc,0x03,0x00,0x7f,0x01]
42 // VI-ERR: :41: error: not a valid operand.
4343
44 global_load_dword v1, v[3:4] offset:-1
45 // GFX9: global_load_dword v1, v[3:4] offset:-1 ; encoding: [0xff,0x9f,0x50,0xdc,0x03,0x00,0x00,0x01]
46 // VI-ERR: :36: error: not a valid operand.
44 global_load_dword v1, v[3:4], off offset:-1
45 // GFX9: global_load_dword v1, v[3:4], off offset:-1 ; encoding: [0xff,0x9f,0x50,0xdc,0x03,0x00,0x7f,0x01]
46 // VI-ERR: :41: error: not a valid operand.
4747
48 global_load_dword v1, v[3:4] offset:-4096
49 // GFX9: global_load_dword v1, v[3:4] offset:-4096 ; encoding: [0x00,0x90,0x50,0xdc,0x03,0x00,0x00,0x01]
50 // VI-ERR: :36: error: not a valid operand.
48 global_load_dword v1, v[3:4], off offset:-4096
49 // GFX9: global_load_dword v1, v[3:4], off offset:-4096 ; encoding: [0x00,0x90,0x50,0xdc,0x03,0x00,0x7f,0x01]
50 // VI-ERR: :41: error: not a valid operand.
5151
52 global_load_dword v1, v[3:4] offset:4096
53 // GFX9-ERR: :30: error: invalid operand for instruction
54 // VI-ERR: :36: error: not a valid operand.
52 global_load_dword v1, v[3:4], off offset:4096
53 // GFX9-ERR: :35: error: invalid operand for instruction
54 // VI-ERR: :41: error: not a valid operand.
5555
56 global_load_dword v1, v[3:4] offset:-4097
57 // GFX9-ERR: :30: error: invalid operand for instruction
58 // VI-ERR: :36: error: not a valid operand.
56 global_load_dword v1, v[3:4] off, offset:-4097
57 // GFX9-ERR: :35: error: invalid operand for instruction
58 // VI-ERR: :41: error: not a valid operand.
5959
60 global_store_byte v[3:4], v1
61 // GFX9: global_store_byte v[3:4], v1 ; encoding: [0x00,0x80,0x60,0xdc,0x03,0x01,0x00,0x00]
60 global_store_byte v[3:4], v1, off
61 // GFX9: global_store_byte v[3:4], v1, off ; encoding: [0x00,0x80,0x60,0xdc,0x03,0x01,0x7f,0x00]
6262 // VI-ERR: instruction not supported on this GPU
6363
64 global_store_short v[3:4], v1
65 // GFX9: global_store_short v[3:4], v1 ; encoding: [0x00,0x80,0x68,0xdc,0x03,0x01,0x00,0x00]
64 global_store_short v[3:4], v1, off
65 // GFX9: global_store_short v[3:4], v1, off ; encoding: [0x00,0x80,0x68,0xdc,0x03,0x01,0x7f,0x00]
6666 // VI-ERR: instruction not supported on this GPU
6767
68 global_store_dword v[3:4], v1
69 // GFX9: global_store_dword v[3:4], v1 ; encoding: [0x00,0x80,0x70,0xdc,0x03,0x01,0x00,0x00]
68 global_store_dword v[3:4], v1, off
69 // GFX9: global_store_dword v[3:4], v1, off ; encoding: [0x00,0x80,0x70,0xdc,0x03,0x01,0x7f,0x00]
7070 // VI-ERR: instruction not supported on this GPU
7171
72 global_store_dwordx2 v[3:4], v[1:2]
73 // GFX9: global_store_dwordx2 v[3:4], v[1:2] ; encoding: [0x00,0x80,0x74,0xdc,0x03,0x01,0x00,0x00]
72 global_store_dwordx2 v[3:4], v[1:2], off
73 // GFX9: global_store_dwordx2 v[3:4], v[1:2], off ; encoding: [0x00,0x80,0x74,0xdc,0x03,0x01,0x7f,0x00]
7474 // VI-ERR: instruction not supported on this GPU
7575
76 global_store_dwordx3 v[3:4], v[1:3]
77 // GFX9: global_store_dwordx3 v[3:4], v[1:3] ; encoding: [0x00,0x80,0x78,0xdc,0x03,0x01,0x00,0x00]
76 global_store_dwordx3 v[3:4], v[1:3], off
77 // GFX9: global_store_dwordx3 v[3:4], v[1:3], off ; encoding: [0x00,0x80,0x78,0xdc,0x03,0x01,0x7f,0x00]
7878 // VI-ERR: instruction not supported on this GPU
7979
80 global_store_dwordx4 v[3:4], v[1:4]
81 // GFX9: global_store_dwordx4 v[3:4], v[1:4] ; encoding: [0x00,0x80,0x7c,0xdc,0x03,0x01,0x00,0x00]
80 global_store_dwordx4 v[3:4], v[1:4], off
81 // GFX9: global_store_dwordx4 v[3:4], v[1:4], off ; encoding: [0x00,0x80,0x7c,0xdc,0x03,0x01,0x7f,0x00]
8282 // VI-ERR: instruction not supported on this GPU
8383
84 global_store_dword v[3:4], v1 offset:12
85 // GFX9: global_store_dword v[3:4], v1 offset:12 ; encoding: [0x0c,0x80,0x70,0xdc,0x03,0x01,0x00,0x00]
86 // VI-ERR: :37: error: not a valid operand
84 global_store_dword v[3:4], v1, off offset:12
85 // GFX9: global_store_dword v[3:4], v1, off offset:12 ; encoding: [0x0c,0x80,0x70,0xdc,0x03,0x01,0x7f,0x00]
86 // VI-ERR: :42: error: not a valid operand
87
88 global_load_dword v1, v[3:4], s[2:3]
89 // GFX9: global_load_dword v1, v[3:4], s[2:3] ; encoding: [0x00,0x80,0x50,0xdc,0x03,0x00,0x02,0x01]
90 // VI-ERR: instruction not supported on this GPU
91
92 global_load_dword v1, v[3:4], s[2:3] offset:24
93 // GFX9: global_load_dword v1, v[3:4], s[2:3] offset:24 ; encoding: [0x18,0x80,0x50,0xdc,0x03,0x00,0x02,0x01]
94 // VI-ERR: :44: error: not a valid operand.
95
96 global_load_dword v1, v[3:4], s[2:3] offset:-8
97 // GFX9: global_load_dword v1, v[3:4], s[2:3] offset:-8 ; encoding: [0xf8,0x9f,0x50,0xdc,0x03,0x00,0x02,0x01]
98 // VI-ERR: :44: error: not a valid operand.
99
100 global_store_dword v[3:4], v1, s[2:3]
101 // GFX9: global_store_dword v[3:4], v1, s[2:3] ; encoding: [0x00,0x80,0x70,0xdc,0x03,0x01,0x02,0x00]
102 // VI-ERR: instruction not supported on this GPU
103
104 global_store_dword v[3:4], v1, s[2:3] offset:24
105 // GFX9: global_store_dword v[3:4], v1, s[2:3] offset:24 ; encoding: [0x18,0x80,0x70,0xdc,0x03,0x01,0x02,0x00]
106 // VI-ERR: :45: error: not a valid operand.
107
108 global_store_dword v[3:4], v1, s[2:3] offset:-8
109 // GFX9: global_store_dword v[3:4], v1, s[2:3] offset:-8 ; encoding: [0xf8,0x9f,0x70,0xdc,0x03,0x01,0x02,0x00]
110 // VI-ERR: :45: error: not a valid operand.
111
112 // XXX: Is this valid?
113 global_store_dword v[3:4], v1, exec
114 // GFX9: global_store_dword v[3:4], v1, exec ; encoding: [0x00,0x80,0x70,0xdc,0x03,0x01,0x7e,0x00]
115 // VI-ERR: instruction not supported on this GPU
116
117 global_load_dword v1, v[3:4], s2
118 // GFX9-ERR: :31: error: invalid operand for instruction
119 // VI-ERR: :31: error: invalid operand for instruction
120
121 global_load_dword v1, v[3:4], exec_hi
122 // GFX9-ERR: :31: error: invalid operand for instruction
123 // VI-ERR: :31: error: invalid operand for instruction