R600 -> AMDGPU rename
[oota-llvm.git] / test / MC / AMDGPU / mubuf.s
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
12 buffer_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
15 buffer_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
18 buffer_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
21 buffer_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
24 buffer_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
27 buffer_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
30 buffer_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
33 buffer_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
40 buffer_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
43 buffer_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
46 buffer_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
49 buffer_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
52 buffer_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
55 buffer_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
58 buffer_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
61 buffer_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
68 buffer_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
71 buffer_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
74 buffer_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
77 buffer_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
80 buffer_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
83 buffer_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
86 buffer_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
89 buffer_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
96 buffer_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
99 buffer_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
102 buffer_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
105 buffer_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
108 buffer_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
111 buffer_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
114 buffer_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
117 buffer_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
124 buffer_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
127 buffer_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
130 buffer_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
133 buffer_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
136 buffer_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
139 buffer_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
142 buffer_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
145 buffer_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
152 buffer_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
155 buffer_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
158 buffer_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
161 buffer_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
164 buffer_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
167 buffer_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
170 buffer_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
173 buffer_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
180 buffer_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
183 buffer_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
186 buffer_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
189 buffer_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
192 buffer_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
195 buffer_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
198 buffer_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
201 buffer_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
208 buffer_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
211 buffer_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
214 buffer_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
217 buffer_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
220 buffer_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
223 buffer_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
226 buffer_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
229 buffer_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
236 buffer_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
239 buffer_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
242 buffer_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
245 buffer_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
248 buffer_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
251 buffer_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
254 buffer_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
257 buffer_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
264 buffer_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
267 buffer_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
270 buffer_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
273 buffer_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
276 buffer_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
279 buffer_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
282 buffer_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
285 buffer_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
292 buffer_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
295 buffer_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
298 buffer_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
301 buffer_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
304 buffer_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
307 buffer_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
310 buffer_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
313 buffer_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
316 buffer_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
319 buffer_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
322 buffer_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
325 buffer_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
328 buffer_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
331 buffer_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
334 buffer_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
337 buffer_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
340 buffer_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
343 buffer_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
346 buffer_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
349 buffer_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