1// RUN: llvm-mc -arch=amdgcn -show-encoding %s | FileCheck %s
2// RUN: llvm-mc -arch=amdgcn -mcpu=SI -show-encoding %s | FileCheck %s
3
4//===----------------------------------------------------------------------===//
5// Test for different operand combinations
6//===----------------------------------------------------------------------===//
7
8//===----------------------------------------------------------------------===//
9// load - immediate offset only
10//===----------------------------------------------------------------------===//
11
12buffer_load_dword v1, s[4:7], s1
13// CHECK: buffer_load_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x30,0xe0,0x00,0x01,0x01,0x01]
14
15buffer_load_dword v1, s[4:7], s1 offset:4
16// CHECK: buffer_load_dword v1, s[4:7], s1 offset:4 ; encoding: [0x04,0x00,0x30,0xe0,0x00,0x01,0x01,0x01]
17
18buffer_load_dword v1, s[4:7], s1 offset:4 glc
19// CHECK: buffer_load_dword v1, s[4:7], s1 offset:4 glc ; encoding: [0x04,0x40,0x30,0xe0,0x00,0x01,0x01,0x01]
20
21buffer_load_dword v1, s[4:7], s1 offset:4 slc
22// CHECK: buffer_load_dword v1, s[4:7], s1 offset:4 slc ; encoding: [0x04,0x00,0x30,0xe0,0x00,0x01,0x41,0x01]
23
24buffer_load_dword v1, s[4:7], s1 offset:4 tfe
25// CHECK: buffer_load_dword v1, s[4:7], s1 offset:4 tfe ; encoding: [0x04,0x00,0x30,0xe0,0x00,0x01,0x81,0x01]
26
27buffer_load_dword v1, s[4:7], s1 tfe glc
28// CHECK: buffer_load_dword v1, s[4:7], s1 glc tfe ; encoding: [0x00,0x40,0x30,0xe0,0x00,0x01,0x81,0x01]
29
30buffer_load_dword v1, s[4:7], s1 offset:4 glc tfe slc
31// CHECK: buffer_load_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x30,0xe0,0x00,0x01,0xc1,0x01]
32
33buffer_load_dword v1, s[4:7], s1 glc tfe slc offset:4
34// CHECK: buffer_load_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x30,0xe0,0x00,0x01,0xc1,0x01]
35
36//===----------------------------------------------------------------------===//
37// load - vgpr offset
38//===----------------------------------------------------------------------===//
39
40buffer_load_dword v1, v2, s[4:7], s1 offen
41// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen ; encoding: [0x00,0x10,0x30,0xe0,0x02,0x01,0x01,0x01]
42
43buffer_load_dword v1, v2, s[4:7], s1 offen offset:4
44// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 ; encoding: [0x04,0x10,0x30,0xe0,0x02,0x01,0x01,0x01]
45
46buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc
47// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen  offset:4 glc ; encoding: [0x04,0x50,0x30,0xe0,0x02,0x01,0x01,0x01]
48
49buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 slc
50// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 slc ; encoding: [0x04,0x10,0x30,0xe0,0x02,0x01,0x41,0x01]
51
52buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 tfe
53// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 tfe ; encoding: [0x04,0x10,0x30,0xe0,0x02,0x01,0x81,0x01]
54
55buffer_load_dword v1, v2, s[4:7], s1 offen tfe glc
56// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen glc tfe ; encoding: [0x00,0x50,0x30,0xe0,0x02,0x01,0x81,0x01]
57
58buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc tfe slc
59// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x30,0xe0,0x02,0x01,0xc1,0x01]
60
61buffer_load_dword v1, v2, s[4:7], s1 offen glc tfe slc offset:4
62// CHECK: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x30,0xe0,0x02,0x01,0xc1,0x01]
63
64//===----------------------------------------------------------------------===//
65// load - vgpr index
66//===----------------------------------------------------------------------===//
67
68buffer_load_dword v1, v2, s[4:7], s1 idxen
69// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen ; encoding: [0x00,0x20,0x30,0xe0,0x02,0x01,0x01,0x01]
70
71buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4
72// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 ; encoding: [0x04,0x20,0x30,0xe0,0x02,0x01,0x01,0x01]
73
74buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc
75// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc ; encoding: [0x04,0x60,0x30,0xe0,0x02,0x01,0x01,0x01]
76
77buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 slc
78// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 slc ; encoding: [0x04,0x20,0x30,0xe0,0x02,0x01,0x41,0x01]
79
80buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
81// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 tfe ; encoding: [0x04,0x20,0x30,0xe0,0x02,0x01,0x81,0x01]
82
83buffer_load_dword v1, v2, s[4:7], s1 idxen tfe glc
84// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen glc tfe ; encoding: [0x00,0x60,0x30,0xe0,0x02,0x01,0x81,0x01]
85
86buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc tfe slc
87// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x30,0xe0,0x02,0x01,0xc1,0x01]
88
89buffer_load_dword v1, v2, s[4:7], s1 idxen glc tfe slc offset:4
90// CHECK: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x30,0xe0,0x02,0x01,0xc1,0x01]
91
92//===----------------------------------------------------------------------===//
93// load - vgpr index and offset
94//===----------------------------------------------------------------------===//
95
96buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen
97// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen ; encoding: [0x00,0x30,0x30,0xe0,0x02,0x01,0x01,0x01]
98
99buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
100// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 ; encoding: [0x04,0x30,0x30,0xe0,0x02,0x01,0x01,0x01]
101
102buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
103// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc ; encoding: [0x04,0x70,0x30,0xe0,0x02,0x01,0x01,0x01]
104
105buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
106// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc ; encoding: [0x04,0x30,0x30,0xe0,0x02,0x01,0x41,0x01]
107
108buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
109// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe ; encoding: [0x04,0x30,0x30,0xe0,0x02,0x01,0x81,0x01]
110
111buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen tfe glc
112// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe ; encoding: [0x00,0x70,0x30,0xe0,0x02,0x01,0x81,0x01]
113
114buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc tfe slc
115// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc slc tfe ; encoding: [0x04,0x70,0x30,0xe0,0x02,0x01,0xc1,0x01]
116
117buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe slc offset:4
118// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc slc tfe ; encoding: [0x04,0x70,0x30,0xe0,0x02,0x01,0xc1,0x01]
119
120//===----------------------------------------------------------------------===//
121// load - addr64
122//===----------------------------------------------------------------------===//
123
124buffer_load_dword v1, v[2:3], s[4:7], s1 addr64
125// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 ; encoding: [0x00,0x80,0x30,0xe0,0x02,0x01,0x01,0x01]
126
127buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
128// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 ; encoding: [0x04,0x80,0x30,0xe0,0x02,0x01,0x01,0x01]
129
130buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
131// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc ; encoding: [0x04,0xc0,0x30,0xe0,0x02,0x01,0x01,0x01]
132
133buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
134// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc ; encoding: [0x04,0x80,0x30,0xe0,0x02,0x01,0x41,0x01]
135
136buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
137// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe ; encoding: [0x04,0x80,0x30,0xe0,0x02,0x01,0x81,0x01]
138
139buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 tfe glc
140// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe ; encoding: [0x00,0xc0,0x30,0xe0,0x02,0x01,0x81,0x01]
141
142buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc tfe slc
143// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc slc tfe ; encoding: [0x04,0xc0,0x30,0xe0,0x02,0x01,0xc1,0x01]
144
145buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe slc offset:4
146// CHECK: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc slc tfe ; encoding: [0x04,0xc0,0x30,0xe0,0x02,0x01,0xc1,0x01]
147
148//===----------------------------------------------------------------------===//
149// store - immediate offset only
150//===----------------------------------------------------------------------===//
151
152buffer_store_dword v1, s[4:7], s1
153// CHECK: buffer_store_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x70,0xe0,0x00,0x01,0x01,0x01]
154
155buffer_store_dword v1, s[4:7], s1 offset:4
156// CHECK: buffer_store_dword v1, s[4:7], s1 offset:4 ; encoding: [0x04,0x00,0x70,0xe0,0x00,0x01,0x01,0x01]
157
158buffer_store_dword v1, s[4:7], s1 offset:4 glc
159// CHECK: buffer_store_dword v1, s[4:7], s1 offset:4 glc ; encoding: [0x04,0x40,0x70,0xe0,0x00,0x01,0x01,0x01]
160
161buffer_store_dword v1, s[4:7], s1 offset:4 slc
162// CHECK: buffer_store_dword v1, s[4:7], s1 offset:4 slc ; encoding: [0x04,0x00,0x70,0xe0,0x00,0x01,0x41,0x01]
163
164buffer_store_dword v1, s[4:7], s1 offset:4 tfe
165// CHECK: buffer_store_dword v1, s[4:7], s1 offset:4 tfe ; encoding: [0x04,0x00,0x70,0xe0,0x00,0x01,0x81,0x01]
166
167buffer_store_dword v1, s[4:7], s1 tfe glc
168// CHECK: buffer_store_dword v1, s[4:7], s1 glc tfe ; encoding: [0x00,0x40,0x70,0xe0,0x00,0x01,0x81,0x01]
169
170buffer_store_dword v1, s[4:7], s1 offset:4 glc tfe slc
171// CHECK: buffer_store_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x70,0xe0,0x00,0x01,0xc1,0x01]
172
173buffer_store_dword v1, s[4:7], s1 glc tfe slc offset:4
174// CHECK: buffer_store_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x70,0xe0,0x00,0x01,0xc1,0x01]
175
176//===----------------------------------------------------------------------===//
177// store - vgpr offset
178//===----------------------------------------------------------------------===//
179
180buffer_store_dword v1, v2, s[4:7], s1 offen
181// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen ; encoding: [0x00,0x10,0x70,0xe0,0x02,0x01,0x01,0x01]
182
183buffer_store_dword v1, v2, s[4:7], s1 offen offset:4
184// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 ; encoding: [0x04,0x10,0x70,0xe0,0x02,0x01,0x01,0x01]
185
186buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc
187// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen  offset:4 glc ; encoding: [0x04,0x50,0x70,0xe0,0x02,0x01,0x01,0x01]
188
189buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 slc
190// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 slc ; encoding: [0x04,0x10,0x70,0xe0,0x02,0x01,0x41,0x01]
191
192buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 tfe
193// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 tfe ; encoding: [0x04,0x10,0x70,0xe0,0x02,0x01,0x81,0x01]
194
195buffer_store_dword v1, v2, s[4:7], s1 offen tfe glc
196// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen glc tfe ; encoding: [0x00,0x50,0x70,0xe0,0x02,0x01,0x81,0x01]
197
198buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc tfe slc
199// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x70,0xe0,0x02,0x01,0xc1,0x01]
200
201buffer_store_dword v1, v2, s[4:7], s1 offen glc tfe slc offset:4
202// CHECK: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x70,0xe0,0x02,0x01,0xc1,0x01]
203
204//===----------------------------------------------------------------------===//
205// store - vgpr index
206//===----------------------------------------------------------------------===//
207
208buffer_store_dword v1, v2, s[4:7], s1 idxen
209// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen ; encoding: [0x00,0x20,0x70,0xe0,0x02,0x01,0x01,0x01]
210
211buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4
212// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 ; encoding: [0x04,0x20,0x70,0xe0,0x02,0x01,0x01,0x01]
213
214buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc
215// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc ; encoding: [0x04,0x60,0x70,0xe0,0x02,0x01,0x01,0x01]
216
217buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 slc
218// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 slc ; encoding: [0x04,0x20,0x70,0xe0,0x02,0x01,0x41,0x01]
219
220buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
221// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 tfe ; encoding: [0x04,0x20,0x70,0xe0,0x02,0x01,0x81,0x01]
222
223buffer_store_dword v1, v2, s[4:7], s1 idxen tfe glc
224// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen glc tfe ; encoding: [0x00,0x60,0x70,0xe0,0x02,0x01,0x81,0x01]
225
226buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc tfe slc
227// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x70,0xe0,0x02,0x01,0xc1,0x01]
228
229buffer_store_dword v1, v2, s[4:7], s1 idxen glc tfe slc offset:4
230// CHECK: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x70,0xe0,0x02,0x01,0xc1,0x01]
231
232//===----------------------------------------------------------------------===//
233// store - vgpr index and offset
234//===----------------------------------------------------------------------===//
235
236buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen
237// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen ; encoding: [0x00,0x30,0x70,0xe0,0x02,0x01,0x01,0x01]
238
239buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
240// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 ; encoding: [0x04,0x30,0x70,0xe0,0x02,0x01,0x01,0x01]
241
242buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
243// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc ; encoding: [0x04,0x70,0x70,0xe0,0x02,0x01,0x01,0x01]
244
245buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
246// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc ; encoding: [0x04,0x30,0x70,0xe0,0x02,0x01,0x41,0x01]
247
248buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
249// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe ; encoding: [0x04,0x30,0x70,0xe0,0x02,0x01,0x81,0x01]
250
251buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen tfe glc
252// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe ; encoding: [0x00,0x70,0x70,0xe0,0x02,0x01,0x81,0x01]
253
254buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc tfe slc
255// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc slc tfe ; encoding: [0x04,0x70,0x70,0xe0,0x02,0x01,0xc1,0x01]
256
257buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe slc offset:4
258// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc slc tfe ; encoding: [0x04,0x70,0x70,0xe0,0x02,0x01,0xc1,0x01]
259
260//===----------------------------------------------------------------------===//
261// store - addr64
262//===----------------------------------------------------------------------===//
263
264buffer_store_dword v1, v[2:3], s[4:7], s1 addr64
265// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 ; encoding: [0x00,0x80,0x70,0xe0,0x02,0x01,0x01,0x01]
266
267buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
268// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 ; encoding: [0x04,0x80,0x70,0xe0,0x02,0x01,0x01,0x01]
269
270buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
271// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc ; encoding: [0x04,0xc0,0x70,0xe0,0x02,0x01,0x01,0x01]
272
273buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
274// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc ; encoding: [0x04,0x80,0x70,0xe0,0x02,0x01,0x41,0x01]
275
276buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
277// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe ; encoding: [0x04,0x80,0x70,0xe0,0x02,0x01,0x81,0x01]
278
279buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 tfe glc
280// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe ; encoding: [0x00,0xc0,0x70,0xe0,0x02,0x01,0x81,0x01]
281
282buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc tfe slc
283// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc slc tfe ; encoding: [0x04,0xc0,0x70,0xe0,0x02,0x01,0xc1,0x01]
284
285buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe slc offset:4
286// CHECK: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc slc tfe ; encoding: [0x04,0xc0,0x70,0xe0,0x02,0x01,0xc1,0x01]
287
288//===----------------------------------------------------------------------===//
289// Instructions
290//===----------------------------------------------------------------------===//
291
292buffer_load_format_x v1, s[4:7], s1
293// CHECK: buffer_load_format_x v1, s[4:7], s1 ; encoding: [0x00,0x00,0x00,0xe0,0x00,0x01,0x01,0x01]
294
295buffer_load_format_xy v[1:2], s[4:7], s1
296// CHECK: buffer_load_format_xy v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x04,0xe0,0x00,0x01,0x01,0x01]
297
298buffer_load_format_xyz v[1:3], s[4:7], s1
299// CHECK: buffer_load_format_xyz v[1:3], s[4:7], s1 ; encoding: [0x00,0x00,0x08,0xe0,0x00,0x01,0x01,0x01]
300
301buffer_load_format_xyzw v[1:4], s[4:7], s1
302// CHECK: buffer_load_format_xyzw v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x0c,0xe0,0x00,0x01,0x01,0x01]
303
304buffer_store_format_x v1, s[4:7], s1
305// CHECK: buffer_store_format_x v1, s[4:7], s1 ; encoding: [0x00,0x00,0x10,0xe0,0x00,0x01,0x01,0x01]
306
307buffer_store_format_xy v[1:2], s[4:7], s1
308// CHECK: buffer_store_format_xy v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x14,0xe0,0x00,0x01,0x01,0x01]
309
310buffer_store_format_xyz v[1:3], s[4:7], s1
311// CHECK: buffer_store_format_xyz v[1:3], s[4:7], s1 ; encoding: [0x00,0x00,0x18,0xe0,0x00,0x01,0x01,0x01]
312
313buffer_store_format_xyzw v[1:4], s[4:7], s1
314// CHECK: buffer_store_format_xyzw v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x1c,0xe0,0x00,0x01,0x01,0x01]
315
316buffer_load_ubyte v1, s[4:7], s1
317// CHECK: buffer_load_ubyte v1, s[4:7], s1 ; encoding: [0x00,0x00,0x20,0xe0,0x00,0x01,0x01,0x01]
318
319buffer_load_sbyte v1, s[4:7], s1
320// CHECK: buffer_load_sbyte v1, s[4:7], s1 ; encoding: [0x00,0x00,0x24,0xe0,0x00,0x01,0x01,0x01]
321
322buffer_load_ushort v1, s[4:7], s1
323// CHECK: buffer_load_ushort v1, s[4:7], s1 ; encoding: [0x00,0x00,0x28,0xe0,0x00,0x01,0x01,0x01]
324
325buffer_load_sshort v1, s[4:7], s1
326// CHECK: buffer_load_sshort v1, s[4:7], s1 ; encoding: [0x00,0x00,0x2c,0xe0,0x00,0x01,0x01,0x01]
327
328buffer_load_dword v1, s[4:7], s1
329// CHECK: buffer_load_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x30,0xe0,0x00,0x01,0x01,0x01]
330
331buffer_load_dwordx2 v[1:2], s[4:7], s1
332// CHECK: buffer_load_dwordx2 v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x34,0xe0,0x00,0x01,0x01,0x01]
333
334buffer_load_dwordx4 v[1:4], s[4:7], s1
335// CHECK: buffer_load_dwordx4 v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x38,0xe0,0x00,0x01,0x01,0x01]
336
337buffer_store_byte v1, s[4:7], s1
338// CHECK: buffer_store_byte v1, s[4:7], s1 ; encoding: [0x00,0x00,0x60,0xe0,0x00,0x01,0x01,0x01]
339
340buffer_store_short v1, s[4:7], s1
341// CHECK: buffer_store_short v1, s[4:7], s1 ; encoding: [0x00,0x00,0x68,0xe0,0x00,0x01,0x01,0x01]
342
343buffer_store_dword v1 s[4:7], s1
344// CHECK: buffer_store_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x70,0xe0,0x00,0x01,0x01,0x01]
345
346buffer_store_dwordx2 v[1:2], s[4:7], s1
347// CHECK: buffer_store_dwordx2 v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x74,0xe0,0x00,0x01,0x01,0x01]
348
349buffer_store_dwordx4 v[1:4], s[4:7], s1
350// CHECK: buffer_store_dwordx4 v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x78,0xe0,0x00,0x01,0x01,0x01]
351
352// TODO: Atomics
353