blob: 18cca70226990c3b7e1ee153edd97dd8ac766f06 [file] [log] [blame]
Matt Arsenaultd6adfb42015-09-24 19:52:21 +00001// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=SI -check-prefix=SICI %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=CI -check-prefix=SICI %s
3
4// RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck -check-prefix=NOSI %s
5// RUN: not llvm-mc -arch=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck -check-prefix=NOCI %s
6// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga %s 2>&1 | FileCheck -check-prefix=NOVI %s
Tom Stellardd7e6f132015-04-08 01:09:26 +00007
8//===----------------------------------------------------------------------===//
9// Test for different operand combinations
10//===----------------------------------------------------------------------===//
11
12//===----------------------------------------------------------------------===//
13// load - immediate offset only
14//===----------------------------------------------------------------------===//
15
16buffer_load_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +000017// SICI: buffer_load_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x30,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000018
19buffer_load_dword v1, s[4:7], s1 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000020// SICI: buffer_load_dword v1, s[4:7], s1 offset:4 ; encoding: [0x04,0x00,0x30,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000021
22buffer_load_dword v1, s[4:7], s1 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000023// SICI: buffer_load_dword v1, s[4:7], s1 offset:4 glc ; encoding: [0x04,0x40,0x30,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000024
25buffer_load_dword v1, s[4:7], s1 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000026// SICI: buffer_load_dword v1, s[4:7], s1 offset:4 slc ; encoding: [0x04,0x00,0x30,0xe0,0x00,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000027
28buffer_load_dword v1, s[4:7], s1 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000029// SICI: buffer_load_dword v1, s[4:7], s1 offset:4 tfe ; encoding: [0x04,0x00,0x30,0xe0,0x00,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000030
31buffer_load_dword v1, s[4:7], s1 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000032// SICI: buffer_load_dword v1, s[4:7], s1 glc tfe ; encoding: [0x00,0x40,0x30,0xe0,0x00,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000033
34buffer_load_dword v1, s[4:7], s1 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000035// SICI: buffer_load_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x30,0xe0,0x00,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000036
37buffer_load_dword v1, s[4:7], s1 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000038// SICI: buffer_load_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x30,0xe0,0x00,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000039
40//===----------------------------------------------------------------------===//
41// load - vgpr offset
42//===----------------------------------------------------------------------===//
43
44buffer_load_dword v1, v2, s[4:7], s1 offen
Matt Arsenaultc1167672015-09-24 19:52:15 +000045// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen ; encoding: [0x00,0x10,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000046
47buffer_load_dword v1, v2, s[4:7], s1 offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000048// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 ; encoding: [0x04,0x10,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000049
50buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000051// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc ; encoding: [0x04,0x50,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000052
53buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000054// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 slc ; encoding: [0x04,0x10,0x30,0xe0,0x02,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000055
56buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000057// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 tfe ; encoding: [0x04,0x10,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000058
59buffer_load_dword v1, v2, s[4:7], s1 offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000060// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen glc tfe ; encoding: [0x00,0x50,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000061
62buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000063// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x30,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000064
65buffer_load_dword v1, v2, s[4:7], s1 offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000066// SICI: buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x30,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000067
68//===----------------------------------------------------------------------===//
69// load - vgpr index
70//===----------------------------------------------------------------------===//
71
72buffer_load_dword v1, v2, s[4:7], s1 idxen
Matt Arsenaultc1167672015-09-24 19:52:15 +000073// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen ; encoding: [0x00,0x20,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000074
75buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000076// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 ; encoding: [0x04,0x20,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000077
78buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000079// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc ; encoding: [0x04,0x60,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000080
81buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000082// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 slc ; encoding: [0x04,0x20,0x30,0xe0,0x02,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000083
84buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000085// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 tfe ; encoding: [0x04,0x20,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000086
87buffer_load_dword v1, v2, s[4:7], s1 idxen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000088// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen glc tfe ; encoding: [0x00,0x60,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000089
90buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000091// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x30,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000092
93buffer_load_dword v1, v2, s[4:7], s1 idxen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000094// SICI: buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x30,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +000095
96//===----------------------------------------------------------------------===//
97// load - vgpr index and offset
98//===----------------------------------------------------------------------===//
99
100buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000101// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen ; encoding: [0x00,0x30,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000102
103buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000104// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 ; encoding: [0x04,0x30,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000105
106buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000107// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000108
109buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000110// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000111
112buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000113// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000114
115buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000116// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe ; encoding: [0x00,0x70,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000117
118buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000119// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000120
121buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000122// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000123
124//===----------------------------------------------------------------------===//
125// load - addr64
126//===----------------------------------------------------------------------===//
127
128buffer_load_dword v1, v[2:3], s[4:7], s1 addr64
Matt Arsenaultc1167672015-09-24 19:52:15 +0000129// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 ; encoding: [0x00,0x80,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000130
131buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000132// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 ; encoding: [0x04,0x80,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000133
134buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000135// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc ; encoding: [0x04,0xc0,0x30,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000136
137buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000138// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc ; encoding: [0x04,0x80,0x30,0xe0,0x02,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000139
140buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000141// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe ; encoding: [0x04,0x80,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000142
143buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000144// SICI: buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe ; encoding: [0x00,0xc0,0x30,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000145
146buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000147// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000148
149buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000150// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000151
152//===----------------------------------------------------------------------===//
153// store - immediate offset only
154//===----------------------------------------------------------------------===//
155
156buffer_store_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000157// SICI: buffer_store_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x70,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000158
159buffer_store_dword v1, s[4:7], s1 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000160// SICI: buffer_store_dword v1, s[4:7], s1 offset:4 ; encoding: [0x04,0x00,0x70,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000161
162buffer_store_dword v1, s[4:7], s1 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000163// SICI: buffer_store_dword v1, s[4:7], s1 offset:4 glc ; encoding: [0x04,0x40,0x70,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000164
165buffer_store_dword v1, s[4:7], s1 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000166// SICI: buffer_store_dword v1, s[4:7], s1 offset:4 slc ; encoding: [0x04,0x00,0x70,0xe0,0x00,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000167
168buffer_store_dword v1, s[4:7], s1 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000169// SICI: buffer_store_dword v1, s[4:7], s1 offset:4 tfe ; encoding: [0x04,0x00,0x70,0xe0,0x00,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000170
171buffer_store_dword v1, s[4:7], s1 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000172// SICI: buffer_store_dword v1, s[4:7], s1 glc tfe ; encoding: [0x00,0x40,0x70,0xe0,0x00,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000173
174buffer_store_dword v1, s[4:7], s1 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000175// SICI: buffer_store_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x70,0xe0,0x00,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000176
177buffer_store_dword v1, s[4:7], s1 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000178// SICI: buffer_store_dword v1, s[4:7], s1 offset:4 glc slc tfe ; encoding: [0x04,0x40,0x70,0xe0,0x00,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000179
180//===----------------------------------------------------------------------===//
181// store - vgpr offset
182//===----------------------------------------------------------------------===//
183
184buffer_store_dword v1, v2, s[4:7], s1 offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000185// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen ; encoding: [0x00,0x10,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000186
187buffer_store_dword v1, v2, s[4:7], s1 offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000188// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 ; encoding: [0x04,0x10,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000189
190buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000191// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc ; encoding: [0x04,0x50,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000192
193buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000194// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 slc ; encoding: [0x04,0x10,0x70,0xe0,0x02,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000195
196buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000197// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 tfe ; encoding: [0x04,0x10,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000198
199buffer_store_dword v1, v2, s[4:7], s1 offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000200// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen glc tfe ; encoding: [0x00,0x50,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000201
202buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000203// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x70,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000204
205buffer_store_dword v1, v2, s[4:7], s1 offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000206// SICI: buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe ; encoding: [0x04,0x50,0x70,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000207
208//===----------------------------------------------------------------------===//
209// store - vgpr index
210//===----------------------------------------------------------------------===//
211
212buffer_store_dword v1, v2, s[4:7], s1 idxen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000213// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen ; encoding: [0x00,0x20,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000214
215buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000216// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 ; encoding: [0x04,0x20,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000217
218buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000219// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc ; encoding: [0x04,0x60,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000220
221buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000222// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 slc ; encoding: [0x04,0x20,0x70,0xe0,0x02,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000223
224buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000225// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 tfe ; encoding: [0x04,0x20,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000226
227buffer_store_dword v1, v2, s[4:7], s1 idxen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000228// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen glc tfe ; encoding: [0x00,0x60,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000229
230buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000231// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x70,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000232
233buffer_store_dword v1, v2, s[4:7], s1 idxen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000234// SICI: buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe ; encoding: [0x04,0x60,0x70,0xe0,0x02,0x01,0xc1,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000235
236//===----------------------------------------------------------------------===//
237// store - vgpr index and offset
238//===----------------------------------------------------------------------===//
239
240buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000241// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen ; encoding: [0x00,0x30,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000242
243buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000244// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 ; encoding: [0x04,0x30,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000245
246buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000247// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000248
249buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000250// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000251
252buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000253// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000254
255buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000256// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe ; encoding: [0x00,0x70,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000257
258buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000259// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000260
261buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000262// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000263
264//===----------------------------------------------------------------------===//
265// store - addr64
266//===----------------------------------------------------------------------===//
267
268buffer_store_dword v1, v[2:3], s[4:7], s1 addr64
Matt Arsenaultc1167672015-09-24 19:52:15 +0000269// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 ; encoding: [0x00,0x80,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000270
271buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000272// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 ; encoding: [0x04,0x80,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000273
274buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000275// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc ; encoding: [0x04,0xc0,0x70,0xe0,0x02,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000276
277buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000278// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc ; encoding: [0x04,0x80,0x70,0xe0,0x02,0x01,0x41,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000279
280buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000281// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe ; encoding: [0x04,0x80,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000282
283buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000284// SICI: buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe ; encoding: [0x00,0xc0,0x70,0xe0,0x02,0x01,0x81,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000285
286buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000287// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000288
289buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000290// SICI: 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]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000291
292//===----------------------------------------------------------------------===//
293// Instructions
294//===----------------------------------------------------------------------===//
295
296buffer_load_format_x v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000297// SICI: buffer_load_format_x v1, s[4:7], s1 ; encoding: [0x00,0x00,0x00,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000298
299buffer_load_format_xy v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000300// SICI: buffer_load_format_xy v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x04,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000301
302buffer_load_format_xyz v[1:3], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000303// SICI: buffer_load_format_xyz v[1:3], s[4:7], s1 ; encoding: [0x00,0x00,0x08,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000304
305buffer_load_format_xyzw v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000306// SICI: buffer_load_format_xyzw v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x0c,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000307
308buffer_store_format_x v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000309// SICI: buffer_store_format_x v1, s[4:7], s1 ; encoding: [0x00,0x00,0x10,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000310
311buffer_store_format_xy v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000312// SICI: buffer_store_format_xy v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x14,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000313
314buffer_store_format_xyz v[1:3], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000315// SICI: buffer_store_format_xyz v[1:3], s[4:7], s1 ; encoding: [0x00,0x00,0x18,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000316
317buffer_store_format_xyzw v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000318// SICI: buffer_store_format_xyzw v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x1c,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000319
320buffer_load_ubyte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000321// SICI: buffer_load_ubyte v1, s[4:7], s1 ; encoding: [0x00,0x00,0x20,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000322
323buffer_load_sbyte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000324// SICI: buffer_load_sbyte v1, s[4:7], s1 ; encoding: [0x00,0x00,0x24,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000325
326buffer_load_ushort v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000327// SICI: buffer_load_ushort v1, s[4:7], s1 ; encoding: [0x00,0x00,0x28,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000328
329buffer_load_sshort v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000330// SICI: buffer_load_sshort v1, s[4:7], s1 ; encoding: [0x00,0x00,0x2c,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000331
332buffer_load_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000333// SICI: buffer_load_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x30,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000334
335buffer_load_dwordx2 v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000336// SICI: buffer_load_dwordx2 v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x34,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000337
338buffer_load_dwordx4 v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000339// SICI: buffer_load_dwordx4 v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x38,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000340
341buffer_store_byte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000342// SICI: buffer_store_byte v1, s[4:7], s1 ; encoding: [0x00,0x00,0x60,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000343
344buffer_store_short v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000345// SICI: buffer_store_short v1, s[4:7], s1 ; encoding: [0x00,0x00,0x68,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000346
347buffer_store_dword v1 s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000348// SICI: buffer_store_dword v1, s[4:7], s1 ; encoding: [0x00,0x00,0x70,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000349
350buffer_store_dwordx2 v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000351// SICI: buffer_store_dwordx2 v[1:2], s[4:7], s1 ; encoding: [0x00,0x00,0x74,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000352
353buffer_store_dwordx4 v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000354// SICI: buffer_store_dwordx4 v[1:4], s[4:7], s1 ; encoding: [0x00,0x00,0x78,0xe0,0x00,0x01,0x01,0x01]
Tom Stellardd7e6f132015-04-08 01:09:26 +0000355
Matt Arsenaultd6adfb42015-09-24 19:52:21 +0000356//===----------------------------------------------------------------------===//
357// Cache invalidation
358//===----------------------------------------------------------------------===//
359
360buffer_wbinvl1
361// SICI: buffer_wbinvl1 ; encoding: [0x00,0x00,0xc4,0xe1,0x00,0x00,0x00,0x00]
362
363buffer_wbinvl1_sc
364// SI: buffer_wbinvl1_sc ; encoding: [0x00,0x00,0xc0,0xe1,0x00,0x00,0x00,0x00]
365// NOCI: error: instruction not supported on this GPU
366// NOVI: error: instruction not supported on this GPU
367
368buffer_wbinvl1_vol
369// CI: buffer_wbinvl1_vol ; encoding: [0x00,0x00,0xc0,0xe1,0x00,0x00,0x00,0x00]
370// NOSI: error: instruction not supported on this GPU
371
Tom Stellardd7e6f132015-04-08 01:09:26 +0000372// TODO: Atomics