1// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck -check-prefix=SICI %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck -check-prefix=SICI %s
3// RUN: not llvm-mc -arch=amdgcn -mcpu=kaveri -show-encoding %s | FileCheck -check-prefix=SICI %s
4// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck --check-prefixes=VI,GFX89 %s
5// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck --check-prefixes=GFX89,GFX9 %s
6// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1012 -show-encoding %s | FileCheck --check-prefixes=GFX10,GFX1012 %s
7// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck -check-prefix=GFX10 %s
8// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck --check-prefixes=NOSICI,NOSICIGFX10,NOSICIGFX1030,NOSICIVIGFX1030 --implicit-check-not=error: %s
9// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck --check-prefixes=NOSICI,NOSICIGFX10,NOSICIGFX1030,NOSICIVIGFX1030 --implicit-check-not=error: %s
10// RUN: not llvm-mc -arch=amdgcn -mcpu=kaveri %s 2>&1 | FileCheck --check-prefixes=NOSICI,NOSICIGFX10,NOSICIGFX1030,NOSICIVIGFX1030 --implicit-check-not=error: %s
11// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck --check-prefixes=NOVI,NOSICIVIGFX1030 --implicit-check-not=error: %s
12// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck --check-prefixes=NOGFX9,NOGFX9GFX1012 --implicit-check-not=error: %s
13// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1012 %s 2>&1 | FileCheck --check-prefixes=NOSICIGFX10,NOGFX9,NOGFX9GFX1012 --implicit-check-not=error: %s
14// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1030 %s 2>&1 | FileCheck --check-prefixes=NOSICIGFX1030,NOSICIVIGFX1030,NOSICIGFX10,NOGFX9,NOGFX1030 --implicit-check-not=error: %s
15
16s_dcache_wb
17// GFX89: s_dcache_wb  ; encoding: [0x00,0x00,0x84,0xc0,0x00,0x00,0x00,0x00]
18// GFX1012: s_dcache_wb  ; encoding: [0x00,0x00,0x84,0xf4,0x00,0x00,0x00,0x00]
19// NOSICIGFX1030: error: instruction not supported on this GPU
20
21s_dcache_wb_vol
22// GFX89: s_dcache_wb_vol ; encoding: [0x00,0x00,0x8c,0xc0,0x00,0x00,0x00,0x00]
23// NOSICIGFX10: error: instruction not supported on this GPU
24
25s_atc_probe 0x7, s[4:5], s0
26// GFX89:  s_atc_probe 7, s[4:5], s0 ; encoding: [0xc2,0x01,0x98,0xc0,0x00,0x00,0x00,0x00]
27// GFX10:  s_atc_probe 7, s[4:5], s0 ; encoding: [0xc2,0x01,0x98,0xf4,0x00,0x00,0x00,0x00]
28// NOSICI: error: instruction not supported on this GPU
29
30s_atc_probe 0x0, s[4:5], 0x0
31// GFX89:  s_atc_probe 0, s[4:5], 0x0 ; encoding: [0x02,0x00,0x9a,0xc0,0x00,0x00,0x00,0x00]
32// GFX10:  s_atc_probe 0, s[4:5], 0x0 ; encoding: [0x02,0x00,0x98,0xf4,0x00,0x00,0x00,0xfa]
33// NOSICI: error: instruction not supported on this GPU
34
35s_atc_probe_buffer 0x1, s[8:11], s0
36// GFX89:  s_atc_probe_buffer 1, s[8:11], s0 ; encoding: [0x44,0x00,0x9c,0xc0,0x00,0x00,0x00,0x00]
37// GFX10:  s_atc_probe_buffer 1, s[8:11], s0 ; encoding: [0x44,0x00,0x9c,0xf4,0x00,0x00,0x00,0x00]
38// NOSICI: error: instruction not supported on this GPU
39
40s_atc_probe_buffer 0x0, s[8:11], s101
41// GFX89:  s_atc_probe_buffer 0, s[8:11], s101 ; encoding: [0x04,0x00,0x9c,0xc0,0x65,0x00,0x00,0x00]
42// GFX10:  s_atc_probe_buffer 0, s[8:11], s101 ; encoding: [0x04,0x00,0x9c,0xf4,0x00,0x00,0x00,0xca]
43// NOSICI: error: instruction not supported on this GPU
44
45s_memrealtime s[4:5]
46// GFX89: s_memrealtime s[4:5] ; encoding: [0x00,0x01,0x94,0xc0,0x00,0x00,0x00,0x00]
47// GFX10: s_memrealtime s[4:5] ; encoding: [0x00,0x01,0x94,0xf4,0x00,0x00,0x00,0x00]
48// NOSICI: error: instruction not supported on this GPU
49
50s_memrealtime tba
51// VI: s_memrealtime tba ; encoding: [0x00,0x1b,0x94,0xc0,0x00,0x00,0x00,0x00]
52// NOSICI: error: instruction not supported on this GPU
53// NOGFX9: error: register not available on this GPU
54
55s_memrealtime tma
56// VI: s_memrealtime tma ; encoding: [0x80,0x1b,0x94,0xc0,0x00,0x00,0x00,0x00]
57// NOSICI: error: instruction not supported on this GPU
58// NOGFX9: error: register not available on this GPU
59
60s_memrealtime ttmp[0:1]
61// VI:    s_memrealtime ttmp[0:1] ; encoding: [0x00,0x1c,0x94,0xc0,0x00,0x00,0x00,0x00]
62// GFX9:  s_memrealtime ttmp[0:1] ; encoding: [0x00,0x1b,0x94,0xc0,0x00,0x00,0x00,0x00]
63// GFX10: s_memrealtime ttmp[0:1] ; encoding: [0x00,0x1b,0x94,0xf4,0x00,0x00,0x00,0x00]
64// NOSICI: error: instruction not supported on this GPU
65
66s_store_dword s1, s[2:3], 0xfc
67// GFX89: s_store_dword s1, s[2:3], 0xfc  ; encoding: [0x41,0x00,0x42,0xc0,0xfc,0x00,0x00,0x00]
68// GFX1012: s_store_dword s1, s[2:3], 0xfc ; encoding: [0x41,0x00,0x40,0xf4,0xfc,0x00,0x00,0xfa]
69// NOSICIGFX1030: error: instruction not supported on this GPU
70
71s_store_dword s1, s[2:3], 0xfc glc
72// GFX89: s_store_dword s1, s[2:3], 0xfc glc ; encoding: [0x41,0x00,0x43,0xc0,0xfc,0x00,0x00,0x00]
73// GFX1012: s_store_dword s1, s[2:3], 0xfc glc ; encoding: [0x41,0x00,0x41,0xf4,0xfc,0x00,0x00,0xfa]
74// NOSICIGFX1030: error: instruction not supported on this GPU
75
76s_store_dword s1, s[2:3], s4
77// GFX89: s_store_dword s1, s[2:3], s4 ; encoding: [0x41,0x00,0x40,0xc0,0x04,0x00,0x00,0x00]
78// GFX1012: s_store_dword s1, s[2:3], s4 ; encoding: [0x41,0x00,0x40,0xf4,0x00,0x00,0x00,0x08]
79// NOSICIGFX1030: error: instruction not supported on this GPU
80
81s_store_dword s1, s[2:3], s4 glc
82// GFX89: s_store_dword s1, s[2:3], s4 glc ; encoding: [0x41,0x00,0x41,0xc0,0x04,0x00,0x00,0x00]
83// GFX1012: s_store_dword s1, s[2:3], s4 glc ; encoding: [0x41,0x00,0x41,0xf4,0x00,0x00,0x00,0x08]
84// NOSICIGFX1030: error: instruction not supported on this GPU
85
86s_store_dword tba_lo, s[2:3], s4
87// VI: s_store_dword tba_lo, s[2:3], s4 ; encoding: [0x01,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
88// NOSICI: error: instruction not supported on this GPU
89// NOGFX9GFX1012: error: register not available on this GPU
90// NOGFX1030: error: instruction not supported on this GPU
91
92s_store_dword tba_hi, s[2:3], s4
93// VI: s_store_dword tba_hi, s[2:3], s4 ; encoding: [0x41,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
94// NOSICI: error: instruction not supported on this GPU
95// NOGFX9GFX1012: error: register not available on this GPU
96// NOGFX1030: error: instruction not supported on this GPU
97
98s_store_dword tma_lo, s[2:3], s4
99// VI: s_store_dword tma_lo, s[2:3], s4 ; encoding: [0x81,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
100// NOSICI: error: instruction not supported on this GPU
101// NOGFX9GFX1012: error: register not available on this GPU
102// NOGFX1030: error: instruction not supported on this GPU
103
104s_store_dword tma_hi, s[2:3], s4
105// VI: s_store_dword tma_hi, s[2:3], s4 ; encoding: [0xc1,0x1b,0x40,0xc0,0x04,0x00,0x00,0x00]
106// NOSICI: error: instruction not supported on this GPU
107// NOGFX9GFX1012: error: register not available on this GPU
108// NOGFX1030: error: instruction not supported on this GPU
109
110// FIXME: Should error on SI instead of silently ignoring glc
111s_load_dword s1, s[2:3], 0xfc glc
112// GFX89: s_load_dword s1, s[2:3], 0xfc glc ; encoding: [0x41,0x00,0x03,0xc0,0xfc,0x00,0x00,0x00]
113// GFX10: s_load_dword s1, s[2:3], 0xfc glc ; encoding: [0x41,0x00,0x01,0xf4,0xfc,0x00,0x00,0xfa]
114// SICI: s_load_dword s1, s[2:3], 0xfc glc ; encoding: [0xfc,0x83,0x00,0xc0
115
116s_load_dword s1, s[2:3], s4 glc
117// GFX89: s_load_dword s1, s[2:3], s4 glc ; encoding: [0x41,0x00,0x01,0xc0,0x04,0x00,0x00,0x00]
118// GFX10: s_load_dword s1, s[2:3], s4 glc ; encoding: [0x41,0x00,0x01,0xf4,0x00,0x00,0x00,0x08]
119// SICI: s_load_dword s1, s[2:3], s4 glc ; encoding: [0x04,0x82,0x00,0xc0]
120
121s_buffer_store_dword s10, s[92:95], m0
122// GFX89: s_buffer_store_dword s10, s[92:95], m0 ; encoding: [0xae,0x02,0x60,0xc0,0x7c,0x00,0x00,0x00]
123// NOSICIGFX1030: error: instruction not supported on this GPU
124// GFX1012: s_buffer_store_dword s10, s[92:95], m0 ; encoding: [0xae,0x02,0x60,0xf4,0x00,0x00,0x00,0xf8]
125
126s_buffer_store_dword tba_lo, s[92:95], m0
127// VI: s_buffer_store_dword tba_lo, s[92:95], m0 ; encoding: [0x2e,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
128// NOSICI: error: instruction not supported on this GPU
129// NOGFX9GFX1012: error: register not available on this GPU
130// NOGFX1030: error: instruction not supported on this GPU
131
132s_buffer_store_dword tba_hi, s[92:95], m0
133// VI: s_buffer_store_dword tba_hi, s[92:95], m0 ; encoding: [0x6e,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
134// NOSICI: error: instruction not supported on this GPU
135// NOGFX9GFX1012: error: register not available on this GPU
136// NOGFX1030: error: instruction not supported on this GPU
137
138s_buffer_store_dword tma_lo, s[92:95], m0
139// VI: s_buffer_store_dword tma_lo, s[92:95], m0 ; encoding: [0xae,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
140// NOSICI: error: instruction not supported on this GPU
141// NOGFX9GFX1012: error: register not available on this GPU
142// NOGFX1030: error: instruction not supported on this GPU
143
144s_buffer_store_dword tma_hi, s[92:95], m0
145// VI: s_buffer_store_dword tma_hi, s[92:95], m0 ; encoding: [0xee,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
146// NOSICI: error: instruction not supported on this GPU
147// NOGFX9GFX1012: error: register not available on this GPU
148// NOGFX1030: error: instruction not supported on this GPU
149
150s_buffer_store_dword ttmp0, s[92:95], m0
151// VI:   s_buffer_store_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1c,0x60,0xc0,0x7c,0x00,0x00,0x00]
152// GFX9: s_buffer_store_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1b,0x60,0xc0,0x7c,0x00,0x00,0x00]
153// NOSICIGFX1030: error: instruction not supported on this GPU
154// GFX1012: s_buffer_store_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1b,0x60,0xf4,0x00,0x00,0x00,0xf8]
155
156s_buffer_store_dwordx2 s[10:11], s[92:95], m0
157// GFX89: s_buffer_store_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0xae,0x02,0x64,0xc0,0x7c,0x00,0x00,0x00]
158// NOSICIGFX1030: error: instruction not supported on this GPU
159// GFX1012: s_buffer_store_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0xae,0x02,0x64,0xf4,0x00,0x00,0x00,0xf8]
160
161s_buffer_store_dwordx4 s[8:11], s[92:95], m0 glc
162// GFX89: s_buffer_store_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x2e,0x02,0x69,0xc0,0x7c,0x00,0x00,0x00]
163// NOSICIGFX1030: error: instruction not supported on this GPU
164// GFX1012: s_buffer_store_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x2e,0x02,0x69,0xf4,0x00,0x00,0x00,0xf8]
165
166s_buffer_store_dwordx2 tba, s[92:95], m0 glc
167// VI: s_buffer_store_dwordx2 tba, s[92:95], m0 glc ; encoding: [0x2e,0x1b,0x65,0xc0,0x7c,0x00,0x00,0x00]
168// NOSICI: error: instruction not supported on this GPU
169// NOGFX9GFX1012: error: register not available on this GPU
170// NOGFX1030: error: instruction not supported on this GPU
171
172s_buffer_load_dword s10, s[92:95], m0
173// GFX89: s_buffer_load_dword s10, s[92:95], m0 ; encoding: [0xae,0x02,0x20,0xc0,0x7c,0x00,0x00,0x00]
174// SICI: s_buffer_load_dword s10, s[92:95], m0 ; encoding: [0x7c,0x5c,0x05,0xc2]
175// GFX10: s_buffer_load_dword s10, s[92:95], m0 ; encoding: [0xae,0x02,0x20,0xf4,0x00,0x00,0x00,0xf8]
176
177s_buffer_load_dword tba_lo, s[92:95], m0
178// VI: s_buffer_load_dword tba_lo, s[92:95], m0 ; encoding: [0x2e,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
179// SICI: s_buffer_load_dword tba_lo, s[92:95], m0 ; encoding: [0x7c,0x5c,0x36,0xc2]
180// NOGFX9: error: register not available on this GPU
181
182s_buffer_load_dword tba_hi, s[92:95], m0
183// VI: s_buffer_load_dword tba_hi, s[92:95], m0 ; encoding: [0x6e,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
184// SICI: s_buffer_load_dword tba_hi, s[92:95], m0 ; encoding: [0x7c,0xdc,0x36,0xc2]
185// NOGFX9: error: register not available on this GPU
186
187s_buffer_load_dword tma_lo, s[92:95], m0
188// VI: s_buffer_load_dword tma_lo, s[92:95], m0 ; encoding: [0xae,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
189// SICI: s_buffer_load_dword tma_lo, s[92:95], m0 ; encoding: [0x7c,0x5c,0x37,0xc2]
190// NOGFX9: error: register not available on this GPU
191
192s_buffer_load_dword tma_hi, s[92:95], m0
193// VI: s_buffer_load_dword tma_hi, s[92:95], m0 ; encoding: [0xee,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
194// SICI: s_buffer_load_dword tma_hi, s[92:95], m0 ; encoding: [0x7c,0xdc,0x37,0xc2]
195// NOGFX9: error: register not available on this GPU
196
197s_buffer_load_dword ttmp0, s[92:95], m0
198// VI:    s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1c,0x20,0xc0,0x7c,0x00,0x00,0x00]
199// GFX9:  s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1b,0x20,0xc0,0x7c,0x00,0x00,0x00]
200// SICI:  s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x7c,0x5c,0x38,0xc2]
201// GFX10: s_buffer_load_dword ttmp0, s[92:95], m0 ; encoding: [0x2e,0x1b,0x20,0xf4,0x00,0x00,0x00,0xf8]
202
203s_buffer_load_dwordx2 s[10:11], s[92:95], m0
204// GFX89: s_buffer_load_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0xae,0x02,0x24,0xc0,0x7c,0x00,0x00,0x00]
205// SICI:  s_buffer_load_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0x7c,0x5c,0x45,0xc2]
206// GFX10: s_buffer_load_dwordx2 s[10:11], s[92:95], m0 ; encoding: [0xae,0x02,0x24,0xf4,0x00,0x00,0x00,0xf8]
207
208s_buffer_load_dwordx2 tba, s[92:95], m0
209// VI:   s_buffer_load_dwordx2 tba, s[92:95], m0 ; encoding: [0x2e,0x1b,0x24,0xc0,0x7c,0x00,0x00,0x00]
210// SICI: s_buffer_load_dwordx2 tba, s[92:95], m0 ; encoding: [0x7c,0x5c,0x76,0xc2]
211// NOGFX9: error: register not available on this GPU
212
213s_buffer_load_dwordx2 tma, s[92:95], m0
214// VI: s_buffer_load_dwordx2 tma, s[92:95], m0 ; encoding: [0xae,0x1b,0x24,0xc0,0x7c,0x00,0x00,0x00]
215// SICI: s_buffer_load_dwordx2 tma, s[92:95], m0 ; encoding: [0x7c,0x5c,0x77,0xc2]
216// NOGFX9: error: register not available on this GPU
217
218s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0
219// VI:    s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x2e,0x1c,0x24,0xc0,0x7c,0x00,0x00,0x00]
220// GFX9:  s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x2e,0x1b,0x24,0xc0,0x7c,0x00,0x00,0x00]
221// SICI:  s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x7c,0x5c,0x78,0xc2]
222// GFX10: s_buffer_load_dwordx2 ttmp[0:1], s[92:95], m0 ; encoding: [0x2e,0x1b,0x24,0xf4,0x00,0x00,0x00,0xf8]
223
224// FIXME: Should error on SI instead of silently ignoring glc
225s_buffer_load_dwordx4 s[8:11], s[92:95], m0 glc
226// GFX89: s_buffer_load_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x2e,0x02,0x29,0xc0,0x7c,0x00,0x00,0x00]
227// GFX10: s_buffer_load_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x2e,0x02,0x29,0xf4,0x00,0x00,0x00,0xf8]
228// SICI: s_buffer_load_dwordx4 s[8:11], s[92:95], m0 glc ; encoding: [0x7c,0x5c,0x84,0xc2]
229
230//===----------------------------------------------------------------------===//
231// s_scratch instructions
232//===----------------------------------------------------------------------===//
233
234s_scratch_load_dword s5, s[2:3], s101
235// GFX9: s_scratch_load_dword s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xc0,0x65,0x00,0x00,0x00]
236// GFX1012: s_scratch_load_dword s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xf4,0x00,0x00,0x00,0xca]
237// NOSICIVIGFX1030: error: instruction not supported on this GPU
238
239s_scratch_load_dword s5, s[2:3], s0 glc
240// GFX9: s_scratch_load_dword s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x15,0xc0,0x00,0x00,0x00,0x00]
241// GFX1012: s_scratch_load_dword s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x15,0xf4,0x00,0x00,0x00,0x00]
242// NOSICIVIGFX1030: error: instruction not supported on this GPU
243
244s_scratch_load_dwordx2 s[100:101], s[2:3], s0
245// GFX9: s_scratch_load_dwordx2 s[100:101], s[2:3], s0 ; encoding: [0x01,0x19,0x18,0xc0,0x00,0x00,0x00,0x00]
246// GFX1012: s_scratch_load_dwordx2 s[100:101], s[2:3], s0 ; encoding: [0x01,0x19,0x18,0xf4,0x00,0x00,0x00,0x00]
247// NOSICIVIGFX1030: error: instruction not supported on this GPU
248
249s_scratch_load_dwordx2 s[10:11], s[2:3], 0x1 glc
250// GFX9: s_scratch_load_dwordx2 s[10:11], s[2:3], 0x1 glc ; encoding: [0x81,0x02,0x1b,0xc0,0x01,0x00,0x00,0x00]
251// GFX1012: s_scratch_load_dwordx2 s[10:11], s[2:3], 0x1 glc ; encoding: [0x81,0x02,0x19,0xf4,0x01,0x00,0x00,0xfa]
252// NOSICIVIGFX1030: error: instruction not supported on this GPU
253
254s_scratch_load_dwordx4 s[20:23], s[4:5], s0
255// GFX9: s_scratch_load_dwordx4 s[20:23], s[4:5], s0 ; encoding: [0x02,0x05,0x1c,0xc0,0x00,0x00,0x00,0x00]
256// GFX1012: s_scratch_load_dwordx4 s[20:23], s[4:5], s0 ; encoding: [0x02,0x05,0x1c,0xf4,0x00,0x00,0x00,0x00]
257// NOSICIVIGFX1030: error: instruction not supported on this GPU
258
259s_scratch_store_dword s101, s[4:5], s0
260// GFX9: s_scratch_store_dword s101, s[4:5], s0 ; encoding: [0x42,0x19,0x54,0xc0,0x00,0x00,0x00,0x00]
261// GFX1012: s_scratch_store_dword s101, s[4:5], s0 ; encoding: [0x42,0x19,0x54,0xf4,0x00,0x00,0x00,0x00]
262// NOSICIVIGFX1030: error: instruction not supported on this GPU
263
264s_scratch_store_dword s1, s[4:5], 0x123 glc
265// GFX9: s_scratch_store_dword s1, s[4:5], 0x123 glc ; encoding: [0x42,0x00,0x57,0xc0,0x23,0x01,0x00,0x00]
266// GFX1012: s_scratch_store_dword s1, s[4:5], 0x123 glc ; encoding: [0x42,0x00,0x55,0xf4,0x23,0x01,0x00,0xfa]
267// NOSICIVIGFX1030: error: instruction not supported on this GPU
268
269s_scratch_store_dwordx2 s[2:3], s[4:5], s101 glc
270// GFX9: s_scratch_store_dwordx2 s[2:3], s[4:5], s101 glc ; encoding: [0x82,0x00,0x59,0xc0,0x65,0x00,0x00,0x00]
271// GFX1012: s_scratch_store_dwordx2 s[2:3], s[4:5], s101 glc ; encoding: [0x82,0x00,0x59,0xf4,0x00,0x00,0x00,0xca]
272// NOSICIVIGFX1030: error: instruction not supported on this GPU
273
274s_scratch_store_dwordx4 s[4:7], s[4:5], s0 glc
275// GFX9: s_scratch_store_dwordx4 s[4:7], s[4:5], s0 glc ; encoding: [0x02,0x01,0x5d,0xc0,0x00,0x00,0x00,0x00]
276// GFX1012: s_scratch_store_dwordx4 s[4:7], s[4:5], s0 glc ; encoding: [0x02,0x01,0x5d,0xf4,0x00,0x00,0x00,0x00]
277// NOSICIVIGFX1030: error: instruction not supported on this GPU
278
279//===----------------------------------------------------------------------===//
280// s_dcache_discard instructions
281//===----------------------------------------------------------------------===//
282
283s_dcache_discard s[2:3], s0
284// GFX9:     s_dcache_discard s[2:3], s0 ; encoding: [0x01,0x00,0xa0,0xc0,0x00,0x00,0x00,0x00]
285// GFX1012:  s_dcache_discard s[2:3], s0 ; encoding: [0x01,0x00,0xa0,0xf4,0x00,0x00,0x00,0x00]
286// NOSICIVIGFX1030: error: instruction not supported on this GPU
287
288s_dcache_discard s[2:3], 0x0
289// GFX9:     s_dcache_discard s[2:3], 0x0 ; encoding: [0x01,0x00,0xa2,0xc0,0x00,0x00,0x00,0x00]
290// GFX1012:  s_dcache_discard s[2:3], 0x0 ; encoding: [0x01,0x00,0xa0,0xf4,0x00,0x00,0x00,0xfa]
291// NOSICIVIGFX1030: error: instruction not supported on this GPU
292
293s_dcache_discard_x2 s[2:3], s101
294// GFX9:     s_dcache_discard_x2 s[2:3], s101 ; encoding: [0x01,0x00,0xa4,0xc0,0x65,0x00,0x00,0x00]
295// GFX1012:  s_dcache_discard_x2 s[2:3], s101 ; encoding: [0x01,0x00,0xa4,0xf4,0x00,0x00,0x00,0xca]
296// NOSICIVIGFX1030: error: instruction not supported on this GPU
297
298s_dcache_discard_x2 s[2:3], 0x0
299// GFX9:     s_dcache_discard_x2 s[2:3], 0x0 ; encoding: [0x01,0x00,0xa6,0xc0,0x00,0x00,0x00,0x00]
300// GFX1012:  s_dcache_discard_x2 s[2:3], 0x0 ; encoding: [0x01,0x00,0xa4,0xf4,0x00,0x00,0x00,0xfa]
301// NOSICIVIGFX1030: error: instruction not supported on this GPU
302
303//===----------------------------------------------------------------------===//
304// s_atomic instructions
305//===----------------------------------------------------------------------===//
306
307s_atomic_add s5, s[2:3], s101
308// GFX9:     s_atomic_add s5, s[2:3], s101 ; encoding: [0x41,0x01,0x08,0xc2,0x65,0x00,0x00,0x00]
309// GFX1012:  s_atomic_add s5, s[2:3], s101 ; encoding: [0x41,0x01,0x08,0xf6,0x00,0x00,0x00,0xca]
310// NOSICIVIGFX1030: error: instruction not supported on this GPU
311
312s_atomic_add s5, s[2:3], 0x0
313// GFX9:     s_atomic_add s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x0a,0xc2,0x00,0x00,0x00,0x00]
314// GFX1012:  s_atomic_add s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x08,0xf6,0x00,0x00,0x00,0xfa]
315// NOSICIVIGFX1030: error: instruction not supported on this GPU
316
317s_atomic_add s5, s[2:3], s0 glc
318// GFX9:     s_atomic_add s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x09,0xc2,0x00,0x00,0x00,0x00]
319// GFX1012:  s_atomic_add s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x09,0xf6,0x00,0x00,0x00,0x00]
320// NOSICIVIGFX1030: error: instruction not supported on this GPU
321
322s_atomic_add_x2 s[10:11], s[2:3], s101
323// GFX9:     s_atomic_add_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x88,0xc2,0x65,0x00,0x00,0x00]
324// GFX1012:  s_atomic_add_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x88,0xf6,0x00,0x00,0x00,0xca]
325// NOSICIVIGFX1030: error: instruction not supported on this GPU
326
327s_atomic_and s5, s[2:3], s101
328// GFX9:     s_atomic_and s5, s[2:3], s101 ; encoding: [0x41,0x01,0x20,0xc2,0x65,0x00,0x00,0x00]
329// GFX1012:  s_atomic_and s5, s[2:3], s101 ; encoding: [0x41,0x01,0x20,0xf6,0x00,0x00,0x00,0xca]
330// NOSICIVIGFX1030: error: instruction not supported on this GPU
331
332s_atomic_and_x2 s[10:11], s[2:3], 0x0
333// GFX9:     s_atomic_and_x2 s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0xa2,0xc2,0x00,0x00,0x00,0x00]
334// GFX1012:  s_atomic_and_x2 s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0xa0,0xf6,0x00,0x00,0x00,0xfa]
335// NOSICIVIGFX1030: error: instruction not supported on this GPU
336
337s_atomic_cmpswap s[10:11], s[2:3], s101
338// GFX9:     s_atomic_cmpswap s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x04,0xc2,0x65,0x00,0x00,0x00]
339// GFX1012:  s_atomic_cmpswap s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x04,0xf6,0x00,0x00,0x00,0xca]
340// NOSICIVIGFX1030: error: instruction not supported on this GPU
341
342s_atomic_cmpswap s[10:11], s[2:3], 0x0
343// GFX9:     s_atomic_cmpswap s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0x06,0xc2,0x00,0x00,0x00,0x00]
344// GFX1012:  s_atomic_cmpswap s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0x04,0xf6,0x00,0x00,0x00,0xfa]
345// NOSICIVIGFX1030: error: instruction not supported on this GPU
346
347s_atomic_cmpswap s[10:11], s[2:3], s0 glc
348// GFX9:     s_atomic_cmpswap s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x05,0xc2,0x00,0x00,0x00,0x00]
349// GFX1012:  s_atomic_cmpswap s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x05,0xf6,0x00,0x00,0x00,0x00]
350// NOSICIVIGFX1030: error: instruction not supported on this GPU
351
352s_atomic_cmpswap_x2 s[20:23], s[2:3], s101
353// GFX9:     s_atomic_cmpswap_x2 s[20:23], s[2:3], s101 ; encoding: [0x01,0x05,0x84,0xc2,0x65,0x00,0x00,0x00]
354// GFX1012:  s_atomic_cmpswap_x2 s[20:23], s[2:3], s101 ; encoding: [0x01,0x05,0x84,0xf6,0x00,0x00,0x00,0xca]
355// NOSICIVIGFX1030: error: instruction not supported on this GPU
356
357s_atomic_cmpswap_x2 s[20:23], s[2:3], 0x0
358// GFX9:     s_atomic_cmpswap_x2 s[20:23], s[2:3], 0x0 ; encoding: [0x01,0x05,0x86,0xc2,0x00,0x00,0x00,0x00]
359// GFX1012:  s_atomic_cmpswap_x2 s[20:23], s[2:3], 0x0 ; encoding: [0x01,0x05,0x84,0xf6,0x00,0x00,0x00,0xfa]
360// NOSICIVIGFX1030: error: instruction not supported on this GPU
361
362s_atomic_cmpswap_x2 s[20:23], s[2:3], s0 glc
363// GFX9:     s_atomic_cmpswap_x2 s[20:23], s[2:3], s0 glc ; encoding: [0x01,0x05,0x85,0xc2,0x00,0x00,0x00,0x00]
364// GFX1012:  s_atomic_cmpswap_x2 s[20:23], s[2:3], s0 glc ; encoding: [0x01,0x05,0x85,0xf6,0x00,0x00,0x00,0x00]
365// NOSICIVIGFX1030: error: instruction not supported on this GPU
366
367s_atomic_dec s5, s[2:3], s0 glc
368// GFX9:     s_atomic_dec s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x31,0xc2,0x00,0x00,0x00,0x00]
369// GFX1012:  s_atomic_dec s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x31,0xf6,0x00,0x00,0x00,0x00]
370// NOSICIVIGFX1030: error: instruction not supported on this GPU
371
372s_atomic_dec_x2 s[10:11], s[2:3], s101
373// GFX9:     s_atomic_dec_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xb0,0xc2,0x65,0x00,0x00,0x00]
374// GFX1012:  s_atomic_dec_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xb0,0xf6,0x00,0x00,0x00,0xca]
375// NOSICIVIGFX1030: error: instruction not supported on this GPU
376
377s_atomic_inc s5, s[2:3], s0 glc
378// GFX9:     s_atomic_inc s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x2d,0xc2,0x00,0x00,0x00,0x00]
379// GFX1012:  s_atomic_inc s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x2d,0xf6,0x00,0x00,0x00,0x00]
380// NOSICIVIGFX1030: error: instruction not supported on this GPU
381
382s_atomic_inc_x2 s[10:11], s[2:3], s101
383// GFX9:     s_atomic_inc_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xac,0xc2,0x65,0x00,0x00,0x00]
384// GFX1012:  s_atomic_inc_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xac,0xf6,0x00,0x00,0x00,0xca]
385// NOSICIVIGFX1030: error: instruction not supported on this GPU
386
387s_atomic_or s5, s[2:3], 0x0
388// GFX9:     s_atomic_or s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x26,0xc2,0x00,0x00,0x00,0x00]
389// GFX1012:  s_atomic_or s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x24,0xf6,0x00,0x00,0x00,0xfa]
390// NOSICIVIGFX1030: error: instruction not supported on this GPU
391
392s_atomic_or_x2 s[10:11], s[2:3], s0 glc
393// GFX9:     s_atomic_or_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0xa5,0xc2,0x00,0x00,0x00,0x00]
394// GFX1012:  s_atomic_or_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0xa5,0xf6,0x00,0x00,0x00,0x00]
395// NOSICIVIGFX1030: error: instruction not supported on this GPU
396
397s_atomic_smax s5, s[2:3], s101
398// GFX9:     s_atomic_smax s5, s[2:3], s101 ; encoding: [0x41,0x01,0x18,0xc2,0x65,0x00,0x00,0x00]
399// GFX1012:  s_atomic_smax s5, s[2:3], s101 ; encoding: [0x41,0x01,0x18,0xf6,0x00,0x00,0x00,0xca]
400// NOSICIVIGFX1030: error: instruction not supported on this GPU
401
402s_atomic_smax_x2 s[10:11], s[2:3], s0 glc
403// GFX9:     s_atomic_smax_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x99,0xc2,0x00,0x00,0x00,0x00]
404// GFX1012:  s_atomic_smax_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x99,0xf6,0x00,0x00,0x00,0x00]
405// NOSICIVIGFX1030: error: instruction not supported on this GPU
406
407s_atomic_smin s5, s[2:3], s101
408// GFX9:     s_atomic_smin s5, s[2:3], s101 ; encoding: [0x41,0x01,0x10,0xc2,0x65,0x00,0x00,0x00]
409// GFX1012:  s_atomic_smin s5, s[2:3], s101 ; encoding: [0x41,0x01,0x10,0xf6,0x00,0x00,0x00,0xca]
410// NOSICIVIGFX1030: error: instruction not supported on this GPU
411
412s_atomic_smin_x2 s[10:11], s[2:3], s0 glc
413// GFX9:     s_atomic_smin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x91,0xc2,0x00,0x00,0x00,0x00]
414// GFX1012:  s_atomic_smin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x91,0xf6,0x00,0x00,0x00,0x00]
415// NOSICIVIGFX1030: error: instruction not supported on this GPU
416
417s_atomic_sub s5, s[2:3], s101
418// GFX9:     s_atomic_sub s5, s[2:3], s101 ; encoding: [0x41,0x01,0x0c,0xc2,0x65,0x00,0x00,0x00]
419// GFX1012:  s_atomic_sub s5, s[2:3], s101 ; encoding: [0x41,0x01,0x0c,0xf6,0x00,0x00,0x00,0xca]
420// NOSICIVIGFX1030: error: instruction not supported on this GPU
421
422s_atomic_sub_x2 s[10:11], s[2:3], s0 glc
423// GFX9:     s_atomic_sub_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x8d,0xc2,0x00,0x00,0x00,0x00]
424// GFX1012:  s_atomic_sub_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x8d,0xf6,0x00,0x00,0x00,0x00]
425// NOSICIVIGFX1030: error: instruction not supported on this GPU
426
427s_atomic_swap s5, s[2:3], s101
428// GFX9:     s_atomic_swap s5, s[2:3], s101 ; encoding: [0x41,0x01,0x00,0xc2,0x65,0x00,0x00,0x00]
429// GFX1012:  s_atomic_swap s5, s[2:3], s101 ; encoding: [0x41,0x01,0x00,0xf6,0x00,0x00,0x00,0xca]
430// NOSICIVIGFX1030: error: instruction not supported on this GPU
431
432s_atomic_swap_x2 s[10:11], s[2:3], s0 glc
433// GFX9:     s_atomic_swap_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x81,0xc2,0x00,0x00,0x00,0x00]
434// GFX1012:  s_atomic_swap_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x81,0xf6,0x00,0x00,0x00,0x00]
435// NOSICIVIGFX1030: error: instruction not supported on this GPU
436
437s_atomic_umax s5, s[2:3], s0 glc
438// GFX9:     s_atomic_umax s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x1d,0xc2,0x00,0x00,0x00,0x00]
439// GFX1012:  s_atomic_umax s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x1d,0xf6,0x00,0x00,0x00,0x00]
440// NOSICIVIGFX1030: error: instruction not supported on this GPU
441
442s_atomic_umax_x2 s[10:11], s[2:3], s101
443// GFX9:     s_atomic_umax_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x9c,0xc2,0x65,0x00,0x00,0x00]
444// GFX1012:  s_atomic_umax_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x9c,0xf6,0x00,0x00,0x00,0xca]
445// NOSICIVIGFX1030: error: instruction not supported on this GPU
446
447s_atomic_umin s5, s[2:3], s101
448// GFX9:     s_atomic_umin s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xc2,0x65,0x00,0x00,0x00]
449// GFX1012:  s_atomic_umin s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xf6,0x00,0x00,0x00,0xca]
450// NOSICIVIGFX1030: error: instruction not supported on this GPU
451
452s_atomic_umin_x2 s[10:11], s[2:3], s0 glc
453// GFX9:     s_atomic_umin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x95,0xc2,0x00,0x00,0x00,0x00]
454// GFX1012:  s_atomic_umin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x95,0xf6,0x00,0x00,0x00,0x00]
455// NOSICIVIGFX1030: error: instruction not supported on this GPU
456
457s_atomic_xor s5, s[2:3], s101
458// GFX9:     s_atomic_xor s5, s[2:3], s101 ; encoding: [0x41,0x01,0x28,0xc2,0x65,0x00,0x00,0x00]
459// GFX1012:  s_atomic_xor s5, s[2:3], s101 ; encoding: [0x41,0x01,0x28,0xf6,0x00,0x00,0x00,0xca]
460// NOSICIVIGFX1030: error: instruction not supported on this GPU
461
462s_atomic_xor_x2 s[10:11], s[2:3], s0 glc
463// GFX9:     s_atomic_xor_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0xa9,0xc2,0x00,0x00,0x00,0x00]
464// GFX1012:  s_atomic_xor_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0xa9,0xf6,0x00,0x00,0x00,0x00]
465// NOSICIVIGFX1030: error: instruction not supported on this GPU
466
467//===----------------------------------------------------------------------===//
468// s_buffer_atomic instructions
469//===----------------------------------------------------------------------===//
470
471s_buffer_atomic_add s5, s[4:7], s101
472// GFX9:     s_buffer_atomic_add s5, s[4:7], s101 ; encoding: [0x42,0x01,0x08,0xc1,0x65,0x00,0x00,0x00]
473// GFX1012:  s_buffer_atomic_add s5, s[4:7], s101 ; encoding: [0x42,0x01,0x08,0xf5,0x00,0x00,0x00,0xca]
474// NOSICIVIGFX1030: error: instruction not supported on this GPU
475
476s_buffer_atomic_add s5, s[4:7], 0x0
477// GFX9:     s_buffer_atomic_add s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x0a,0xc1,0x00,0x00,0x00,0x00]
478// GFX1012:  s_buffer_atomic_add s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x08,0xf5,0x00,0x00,0x00,0xfa]
479// NOSICIVIGFX1030: error: instruction not supported on this GPU
480
481s_buffer_atomic_add s5, s[4:7], s0 glc
482// GFX9:     s_buffer_atomic_add s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x09,0xc1,0x00,0x00,0x00,0x00]
483// GFX1012:  s_buffer_atomic_add s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x09,0xf5,0x00,0x00,0x00,0x00]
484// NOSICIVIGFX1030: error: instruction not supported on this GPU
485
486s_buffer_atomic_add_x2 s[10:11], s[4:7], s0
487// GFX9:     s_buffer_atomic_add_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x88,0xc1,0x00,0x00,0x00,0x00]
488// GFX1012:  s_buffer_atomic_add_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x88,0xf5,0x00,0x00,0x00,0x00]
489// NOSICIVIGFX1030: error: instruction not supported on this GPU
490
491s_buffer_atomic_and s101, s[4:7], s0
492// GFX9:     s_buffer_atomic_and s101, s[4:7], s0 ; encoding: [0x42,0x19,0x20,0xc1,0x00,0x00,0x00,0x00]
493// GFX1012:  s_buffer_atomic_and s101, s[4:7], s0 ; encoding: [0x42,0x19,0x20,0xf5,0x00,0x00,0x00,0x00]
494// NOSICIVIGFX1030: error: instruction not supported on this GPU
495
496s_buffer_atomic_and_x2 s[10:11], s[8:11], s0
497// GFX9:     s_buffer_atomic_and_x2 s[10:11], s[8:11], s0 ; encoding: [0x84,0x02,0xa0,0xc1,0x00,0x00,0x00,0x00]
498// GFX1012:  s_buffer_atomic_and_x2 s[10:11], s[8:11], s0 ; encoding: [0x84,0x02,0xa0,0xf5,0x00,0x00,0x00,0x00]
499// NOSICIVIGFX1030: error: instruction not supported on this GPU
500
501s_buffer_atomic_cmpswap s[10:11], s[4:7], s0
502// GFX9:     s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x04,0xc1,0x00,0x00,0x00,0x00]
503// GFX1012:  s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x04,0xf5,0x00,0x00,0x00,0x00]
504// NOSICIVIGFX1030: error: instruction not supported on this GPU
505
506s_buffer_atomic_cmpswap s[10:11], s[4:7], 0x0
507// GFX9:     s_buffer_atomic_cmpswap s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0x06,0xc1,0x00,0x00,0x00,0x00]
508// GFX1012:  s_buffer_atomic_cmpswap s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0x04,0xf5,0x00,0x00,0x00,0xfa]
509// NOSICIVIGFX1030: error: instruction not supported on this GPU
510
511s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 glc
512// GFX9:     s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x05,0xc1,0x00,0x00,0x00,0x00]
513// GFX1012:  s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x05,0xf5,0x00,0x00,0x00,0x00]
514// NOSICIVIGFX1030: error: instruction not supported on this GPU
515
516s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s101
517// GFX9:     s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s101 ; encoding: [0x02,0x05,0x84,0xc1,0x65,0x00,0x00,0x00]
518// GFX1012:  s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s101 ; encoding: [0x02,0x05,0x84,0xf5,0x00,0x00,0x00,0xca]
519// NOSICIVIGFX1030: error: instruction not supported on this GPU
520
521s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], 0x0
522// GFX9:     s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], 0x0 ; encoding: [0x02,0x05,0x86,0xc1,0x00,0x00,0x00,0x00]
523// GFX1012:  s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], 0x0 ; encoding: [0x02,0x05,0x84,0xf5,0x00,0x00,0x00,0xfa]
524// NOSICIVIGFX1030: error: instruction not supported on this GPU
525
526s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s0 glc
527// GFX9:     s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s0 glc ; encoding: [0x02,0x05,0x85,0xc1,0x00,0x00,0x00,0x00]
528// GFX1012:  s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s0 glc ; encoding: [0x02,0x05,0x85,0xf5,0x00,0x00,0x00,0x00]
529// NOSICIVIGFX1030: error: instruction not supported on this GPU
530
531s_buffer_atomic_dec s5, s[4:7], s0
532// GFX9:     s_buffer_atomic_dec s5, s[4:7], s0 ; encoding: [0x42,0x01,0x30,0xc1,0x00,0x00,0x00,0x00]
533// GFX1012:  s_buffer_atomic_dec s5, s[4:7], s0 ; encoding: [0x42,0x01,0x30,0xf5,0x00,0x00,0x00,0x00]
534// NOSICIVIGFX1030: error: instruction not supported on this GPU
535
536s_buffer_atomic_dec_x2 s[10:11], s[4:7], s0 glc
537// GFX9:     s_buffer_atomic_dec_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xb1,0xc1,0x00,0x00,0x00,0x00]
538// GFX1012:  s_buffer_atomic_dec_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xb1,0xf5,0x00,0x00,0x00,0x00]
539// NOSICIVIGFX1030: error: instruction not supported on this GPU
540
541s_buffer_atomic_inc s101, s[4:7], s0
542// GFX9:     s_buffer_atomic_inc s101, s[4:7], s0 ; encoding: [0x42,0x19,0x2c,0xc1,0x00,0x00,0x00,0x00]
543// GFX1012:  s_buffer_atomic_inc s101, s[4:7], s0 ; encoding: [0x42,0x19,0x2c,0xf5,0x00,0x00,0x00,0x00]
544// NOSICIVIGFX1030: error: instruction not supported on this GPU
545
546s_buffer_atomic_inc_x2 s[10:11], s[4:7], 0x0
547// GFX9:     s_buffer_atomic_inc_x2 s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0xae,0xc1,0x00,0x00,0x00,0x00]
548// GFX1012:  s_buffer_atomic_inc_x2 s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0xac,0xf5,0x00,0x00,0x00,0xfa]
549// NOSICIVIGFX1030: error: instruction not supported on this GPU
550
551s_buffer_atomic_or s5, s[8:11], s0
552// GFX9:     s_buffer_atomic_or s5, s[8:11], s0 ; encoding: [0x44,0x01,0x24,0xc1,0x00,0x00,0x00,0x00]
553// GFX1012:  s_buffer_atomic_or s5, s[8:11], s0 ; encoding: [0x44,0x01,0x24,0xf5,0x00,0x00,0x00,0x00]
554// NOSICIVIGFX1030: error: instruction not supported on this GPU
555
556s_buffer_atomic_or_x2 s[10:11], s[96:99], s0
557// GFX9:     s_buffer_atomic_or_x2 s[10:11], s[96:99], s0 ; encoding: [0xb0,0x02,0xa4,0xc1,0x00,0x00,0x00,0x00]
558// GFX1012:  s_buffer_atomic_or_x2 s[10:11], s[96:99], s0 ; encoding: [0xb0,0x02,0xa4,0xf5,0x00,0x00,0x00,0x00]
559// NOSICIVIGFX1030: error: instruction not supported on this GPU
560
561s_buffer_atomic_smax s5, s[4:7], s101
562// GFX9:     s_buffer_atomic_smax s5, s[4:7], s101 ; encoding: [0x42,0x01,0x18,0xc1,0x65,0x00,0x00,0x00]
563// GFX1012:  s_buffer_atomic_smax s5, s[4:7], s101 ; encoding: [0x42,0x01,0x18,0xf5,0x00,0x00,0x00,0xca]
564// NOSICIVIGFX1030: error: instruction not supported on this GPU
565
566s_buffer_atomic_smax_x2 s[100:101], s[4:7], s0
567// GFX9:     s_buffer_atomic_smax_x2 s[100:101], s[4:7], s0 ; encoding: [0x02,0x19,0x98,0xc1,0x00,0x00,0x00,0x00]
568// GFX1012:  s_buffer_atomic_smax_x2 s[100:101], s[4:7], s0 ; encoding: [0x02,0x19,0x98,0xf5,0x00,0x00,0x00,0x00]
569// NOSICIVIGFX1030: error: instruction not supported on this GPU
570
571s_buffer_atomic_smin s5, s[4:7], 0x0
572// GFX9:     s_buffer_atomic_smin s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x12,0xc1,0x00,0x00,0x00,0x00]
573// GFX1012:  s_buffer_atomic_smin s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x10,0xf5,0x00,0x00,0x00,0xfa]
574// NOSICIVIGFX1030: error: instruction not supported on this GPU
575
576s_buffer_atomic_smin_x2 s[12:13], s[4:7], s0
577// GFX9:     s_buffer_atomic_smin_x2 s[12:13], s[4:7], s0 ; encoding: [0x02,0x03,0x90,0xc1,0x00,0x00,0x00,0x00]
578// GFX1012:  s_buffer_atomic_smin_x2 s[12:13], s[4:7], s0 ; encoding: [0x02,0x03,0x90,0xf5,0x00,0x00,0x00,0x00]
579// NOSICIVIGFX1030: error: instruction not supported on this GPU
580
581s_buffer_atomic_sub s5, s[4:7], s0 glc
582// GFX9:     s_buffer_atomic_sub s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x0d,0xc1,0x00,0x00,0x00,0x00]
583// GFX1012:  s_buffer_atomic_sub s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x0d,0xf5,0x00,0x00,0x00,0x00]
584// NOSICIVIGFX1030: error: instruction not supported on this GPU
585
586s_buffer_atomic_sub_x2 s[10:11], s[4:7], s0
587// GFX9:     s_buffer_atomic_sub_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x8c,0xc1,0x00,0x00,0x00,0x00]
588// GFX1012:  s_buffer_atomic_sub_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x8c,0xf5,0x00,0x00,0x00,0x00]
589// NOSICIVIGFX1030: error: instruction not supported on this GPU
590
591s_buffer_atomic_swap s5, s[4:7], s0
592// GFX9:     s_buffer_atomic_swap s5, s[4:7], s0 ; encoding: [0x42,0x01,0x00,0xc1,0x00,0x00,0x00,0x00]
593// GFX1012:  s_buffer_atomic_swap s5, s[4:7], s0 ; encoding: [0x42,0x01,0x00,0xf5,0x00,0x00,0x00,0x00]
594// NOSICIVIGFX1030: error: instruction not supported on this GPU
595
596s_buffer_atomic_swap_x2 s[10:11], s[4:7], s0 glc
597// GFX9:     s_buffer_atomic_swap_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x81,0xc1,0x00,0x00,0x00,0x00]
598// GFX1012:  s_buffer_atomic_swap_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x81,0xf5,0x00,0x00,0x00,0x00]
599// NOSICIVIGFX1030: error: instruction not supported on this GPU
600
601s_buffer_atomic_umax s5, s[4:7], s0
602// GFX9:     s_buffer_atomic_umax s5, s[4:7], s0 ; encoding: [0x42,0x01,0x1c,0xc1,0x00,0x00,0x00,0x00]
603// GFX1012:  s_buffer_atomic_umax s5, s[4:7], s0 ; encoding: [0x42,0x01,0x1c,0xf5,0x00,0x00,0x00,0x00]
604// NOSICIVIGFX1030: error: instruction not supported on this GPU
605
606s_buffer_atomic_umax_x2 s[10:11], s[4:7], s0 glc
607// GFX9:     s_buffer_atomic_umax_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x9d,0xc1,0x00,0x00,0x00,0x00]
608// GFX1012:  s_buffer_atomic_umax_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x9d,0xf5,0x00,0x00,0x00,0x00]
609// NOSICIVIGFX1030: error: instruction not supported on this GPU
610
611s_buffer_atomic_umin s5, s[4:7], s0
612// GFX9:     s_buffer_atomic_umin s5, s[4:7], s0 ; encoding: [0x42,0x01,0x14,0xc1,0x00,0x00,0x00,0x00]
613// GFX1012:  s_buffer_atomic_umin s5, s[4:7], s0 ; encoding: [0x42,0x01,0x14,0xf5,0x00,0x00,0x00,0x00]
614// NOSICIVIGFX1030: error: instruction not supported on this GPU
615
616s_buffer_atomic_umin_x2 s[10:11], s[4:7], s0 glc
617// GFX9:     s_buffer_atomic_umin_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x95,0xc1,0x00,0x00,0x00,0x00]
618// GFX1012:  s_buffer_atomic_umin_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x95,0xf5,0x00,0x00,0x00,0x00]
619// NOSICIVIGFX1030: error: instruction not supported on this GPU
620
621s_buffer_atomic_xor s5, s[4:7], s0
622// GFX9:     s_buffer_atomic_xor s5, s[4:7], s0 ; encoding: [0x42,0x01,0x28,0xc1,0x00,0x00,0x00,0x00]
623// GFX1012:  s_buffer_atomic_xor s5, s[4:7], s0 ; encoding: [0x42,0x01,0x28,0xf5,0x00,0x00,0x00,0x00]
624// NOSICIVIGFX1030: error: instruction not supported on this GPU
625
626s_buffer_atomic_xor_x2 s[10:11], s[4:7], s0 glc
627// GFX9:     s_buffer_atomic_xor_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xa9,0xc1,0x00,0x00,0x00,0x00]
628// GFX1012:  s_buffer_atomic_xor_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xa9,0xf5,0x00,0x00,0x00,0x00]
629// NOSICIVIGFX1030: error: instruction not supported on this GPU
630
631//===----------------------------------------------------------------------===//
632// Unsigned 20-bit offsets (VI+)
633//===----------------------------------------------------------------------===//
634
635s_atc_probe 0x7, s[4:5], 0xFFFFF
636// NOSICI: error: instruction not supported on this GPU
637// GFX89: s_atc_probe 7, s[4:5], 0xfffff ; encoding: [0xc2,0x01,0x9a,0xc0,0xff,0xff,0x0f,0x00]
638// GFX10: s_atc_probe 7, s[4:5], 0xfffff ; encoding: [0xc2,0x01,0x98,0xf4,0xff,0xff,0x0f,0xfa]
639
640s_atc_probe_buffer 0x1, s[8:11], 0xFFFFF
641// NOSICI: error: instruction not supported on this GPU
642// GFX89: s_atc_probe_buffer 1, s[8:11], 0xfffff ; encoding: [0x44,0x00,0x9e,0xc0,0xff,0xff,0x0f,0x00]
643// GFX10: s_atc_probe_buffer 1, s[8:11], 0xfffff ; encoding: [0x44,0x00,0x9c,0xf4,0xff,0xff,0x0f,0xfa]
644
645s_store_dword s1, s[2:3], 0xFFFFF
646// NOSICIGFX1030: error: instruction not supported on this GPU
647// GFX89: s_store_dword s1, s[2:3], 0xfffff ; encoding: [0x41,0x00,0x42,0xc0,0xff,0xff,0x0f,0x00]
648// GFX1012: s_store_dword s1, s[2:3], 0xfffff ; encoding: [0x41,0x00,0x40,0xf4,0xff,0xff,0x0f,0xfa]
649
650s_buffer_store_dword s10, s[92:95], 0xFFFFF
651// NOSICIGFX1030: error: instruction not supported on this GPU
652// GFX89: s_buffer_store_dword s10, s[92:95], 0xfffff ; encoding: [0xae,0x02,0x62,0xc0,0xff,0xff,0x0f,0x00]
653// GFX1012: s_buffer_store_dword s10, s[92:95], 0xfffff ; encoding: [0xae,0x02,0x60,0xf4,0xff,0xff,0x0f,0xfa]
654
655s_atomic_swap s5, s[2:3], 0xFFFFF
656// NOSICIVIGFX1030: error: instruction not supported on this GPU
657// GFX1012: s_atomic_swap s5, s[2:3], 0xfffff ; encoding: [0x41,0x01,0x00,0xf6,0xff,0xff,0x0f,0xfa]
658// GFX9: s_atomic_swap s5, s[2:3], 0xfffff ; encoding: [0x41,0x01,0x02,0xc2,0xff,0xff,0x0f,0x00]
659
660s_buffer_atomic_swap s5, s[4:7], 0xFFFFF
661// NOSICIVIGFX1030: error: instruction not supported on this GPU
662// GFX1012: s_buffer_atomic_swap s5, s[4:7], 0xfffff ; encoding: [0x42,0x01,0x00,0xf5,0xff,0xff,0x0f,0xfa]
663// GFX9: s_buffer_atomic_swap s5, s[4:7], 0xfffff ; encoding: [0x42,0x01,0x02,0xc1,0xff,0xff,0x0f,0x00]
664
665s_atc_probe 0x7, s[4:5], 0x1FFFFF
666// NOSICI: error: instruction not supported on this GPU
667// NOGFX9: error: expected a 21-bit signed offset
668// NOVI: error: expected a 20-bit unsigned offset
669
670s_atc_probe_buffer 0x1, s[8:11], 0x1FFFFF
671// NOSICI: error: instruction not supported on this GPU
672// NOGFX9: error: expected a 20-bit unsigned offset
673// NOVI: error: expected a 20-bit unsigned offset
674
675s_store_dword s1, s[2:3], 0x1FFFFF
676// NOSICIGFX1030: error: instruction not supported on this GPU
677// NOGFX9GFX1012: error: expected a 21-bit signed offset
678// NOVI: error: expected a 20-bit unsigned offset
679
680s_buffer_store_dword s10, s[92:95], 0x1FFFFF
681// NOSICIGFX1030: error: instruction not supported on this GPU
682// NOGFX9GFX1012: error: expected a 20-bit unsigned offset
683// NOVI: error: expected a 20-bit unsigned offset
684
685s_atomic_swap s5, s[2:3], 0x1FFFFF
686// NOSICIVIGFX1030: error: instruction not supported on this GPU
687// NOGFX9GFX1012: error: expected a 21-bit signed offset
688
689s_buffer_atomic_swap s5, s[4:7], 0x1FFFFF
690// NOSICIVIGFX1030: error: instruction not supported on this GPU
691// NOGFX9GFX1012: error: expected a 20-bit unsigned offset
692
693//===----------------------------------------------------------------------===//
694// Signed offsets (gfx9+)
695//===----------------------------------------------------------------------===//
696
697s_atc_probe 0x7, s[4:5], -1
698// NOVI: error: expected a 20-bit unsigned offset
699// GFX9: s_atc_probe 7, s[4:5], -0x1 ; encoding: [0xc2,0x01,0x9a,0xc0,0xff,0xff,0x1f,0x00]
700// GFX10: s_atc_probe 7, s[4:5], -0x1 ; encoding: [0xc2,0x01,0x98,0xf4,0xff,0xff,0x1f,0xfa]
701// NOSICI: error: instruction not supported on this GPU
702
703s_atc_probe_buffer 0x1, s[8:11], -1
704// NOVI: error: expected a 20-bit unsigned offset
705// NOSICI: error: instruction not supported on this GPU
706// NOGFX9: error: expected a 20-bit unsigned offset
707
708s_store_dword s1, s[2:3], -1
709// NOVI: error: expected a 20-bit unsigned offset
710// GFX9: s_store_dword s1, s[2:3], -0x1 ; encoding: [0x41,0x00,0x42,0xc0,0xff,0xff,0x1f,0x00]
711// GFX1012: s_store_dword s1, s[2:3], -0x1 ; encoding: [0x41,0x00,0x40,0xf4,0xff,0xff,0x1f,0xfa]
712// NOSICIGFX1030: error: instruction not supported on this GPU
713
714s_buffer_store_dword s10, s[92:95], -1
715// NOVI: error: expected a 20-bit unsigned offset
716// NOSICIGFX1030: error: instruction not supported on this GPU
717// NOGFX9GFX1012: error: expected a 20-bit unsigned offset
718
719s_load_dword s1, s[2:3], -1
720// NOVI: error: expected a 20-bit unsigned offset
721// GFX9: s_load_dword s1, s[2:3], -0x1 ; encoding: [0x41,0x00,0x02,0xc0,0xff,0xff,0x1f,0x00]
722// GFX10: s_load_dword s1, s[2:3], -0x1 ; encoding: [0x41,0x00,0x00,0xf4,0xff,0xff,0x1f,0xfa]
723// NOSICI: error: operands are not valid for this GPU or mode
724
725s_buffer_load_dword s10, s[92:95], -1
726// NOVI: error: expected a 20-bit unsigned offset
727// NOSICI: error: operands are not valid for this GPU or mode
728// NOGFX9: error: expected a 20-bit unsigned offset
729
730s_atomic_swap s5, s[2:3], -1
731// NOVI: error: instruction not supported on this GPU
732// GFX9: s_atomic_swap s5, s[2:3], -0x1 ; encoding: [0x41,0x01,0x02,0xc2,0xff,0xff,0x1f,0x00]
733// GFX1012: s_atomic_swap s5, s[2:3], -0x1 ; encoding: [0x41,0x01,0x00,0xf6,0xff,0xff,0x1f,0xfa]
734// NOSICIGFX1030: error: instruction not supported on this GPU
735
736s_buffer_atomic_swap s5, s[4:7], -1
737// NOVI: error: instruction not supported on this GPU
738// NOSICIGFX1030: error: instruction not supported on this GPU
739// NOGFX9GFX1012: error: expected a 20-bit unsigned offset
740
741s_atc_probe 0x7, s[4:5], 0xFFFFFFFFFFF00000
742// NOSICI: error: instruction not supported on this GPU
743// GFX10: s_atc_probe 7, s[4:5], -0x100000 ; encoding: [0xc2,0x01,0x98,0xf4,0x00,0x00,0x10,0xfa]
744// GFX9: s_atc_probe 7, s[4:5], -0x100000 ; encoding: [0xc2,0x01,0x9a,0xc0,0x00,0x00,0x10,0x00]
745// NOVI: error: expected a 20-bit unsigned offset
746
747s_atc_probe_buffer 0x1, s[8:11], 0xFFFFFFFFFFF00000
748// NOSICI: error: instruction not supported on this GPU
749// NOGFX9: error: expected a 20-bit unsigned offset
750// NOVI: error: expected a 20-bit unsigned offset
751
752s_store_dword s1, s[2:3], 0xFFFFFFFFFFF00000
753// NOSICIGFX1030: error: instruction not supported on this GPU
754// GFX1012: s_store_dword s1, s[2:3], -0x100000 ; encoding: [0x41,0x00,0x40,0xf4,0x00,0x00,0x10,0xfa]
755// GFX9: s_store_dword s1, s[2:3], -0x100000 ; encoding: [0x41,0x00,0x42,0xc0,0x00,0x00,0x10,0x00]
756// NOVI: error: expected a 20-bit unsigned offset
757
758s_buffer_store_dword s10, s[92:95], 0xFFFFFFFFFFF00000
759// NOSICIGFX1030: error: instruction not supported on this GPU
760// NOGFX9GFX1012: error: expected a 20-bit unsigned offset
761// NOVI: error: expected a 20-bit unsigned offset
762
763s_load_dword s1, s[2:3], 0xFFFFFFFFFFF00000
764// NOSICI: error: operands are not valid for this GPU or mode
765// GFX10: s_load_dword s1, s[2:3], -0x100000 ; encoding: [0x41,0x00,0x00,0xf4,0x00,0x00,0x10,0xfa]
766// GFX9: s_load_dword s1, s[2:3], -0x100000 ; encoding: [0x41,0x00,0x02,0xc0,0x00,0x00,0x10,0x00]
767// NOVI: error: expected a 20-bit unsigned offset
768
769s_buffer_load_dword s10, s[92:95], 0xFFFFFFFFFFF00000
770// NOSICI: error: operands are not valid for this GPU or mode
771// NOGFX9: error: expected a 20-bit unsigned offset
772// NOVI: error: expected a 20-bit unsigned offset
773
774s_atomic_swap s5, s[2:3], 0xFFFFFFFFFFF00000
775// NOSICIVIGFX1030: error: instruction not supported on this GPU
776// GFX1012: s_atomic_swap s5, s[2:3], -0x100000 ; encoding: [0x41,0x01,0x00,0xf6,0x00,0x00,0x10,0xfa]
777// GFX9: s_atomic_swap s5, s[2:3], -0x100000 ; encoding: [0x41,0x01,0x02,0xc2,0x00,0x00,0x10,0x00]
778
779s_buffer_atomic_swap s5, s[4:7], 0xFFFFFFFFFFF00000
780// NOSICIVIGFX1030: error: instruction not supported on this GPU
781// NOGFX9GFX1012: error: expected a 20-bit unsigned offset
782