blob: a865f72c11f0339d7092ab1bcbc9817aef800577 [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
Nikolay Haustovea8febd2016-03-01 08:34:43 +000031buffer_load_dword v1, s[4:7], s1 glc tfe
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
Nikolay Haustovea8febd2016-03-01 08:34:43 +000034buffer_load_dword v1, s[4:7], s1 offset:4 glc slc tfe
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
37//===----------------------------------------------------------------------===//
38// load - vgpr offset
39//===----------------------------------------------------------------------===//
40
41buffer_load_dword v1, v2, s[4:7], s1 offen
Matt Arsenaultc1167672015-09-24 19:52:15 +000042// 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 +000043
44buffer_load_dword v1, v2, s[4:7], s1 offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000045// 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 +000046
47buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000048// 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 +000049
50buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000051// 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 +000052
53buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000054// 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 +000055
Nikolay Haustovea8febd2016-03-01 08:34:43 +000056buffer_load_dword v1, v2, s[4:7], s1 offen glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000057// 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 +000058
Nikolay Haustovea8febd2016-03-01 08:34:43 +000059buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000060// 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 +000061
62//===----------------------------------------------------------------------===//
63// load - vgpr index
64//===----------------------------------------------------------------------===//
65
66buffer_load_dword v1, v2, s[4:7], s1 idxen
Matt Arsenaultc1167672015-09-24 19:52:15 +000067// 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 +000068
69buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000070// 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 +000071
72buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000073// 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 +000074
75buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000076// 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 +000077
78buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000079// 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 +000080
Nikolay Haustovea8febd2016-03-01 08:34:43 +000081buffer_load_dword v1, v2, s[4:7], s1 idxen glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000082// 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 +000083
Nikolay Haustovea8febd2016-03-01 08:34:43 +000084buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000085// 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 +000086
87//===----------------------------------------------------------------------===//
88// load - vgpr index and offset
89//===----------------------------------------------------------------------===//
90
91buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen
Matt Arsenaultc1167672015-09-24 19:52:15 +000092// 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 +000093
94buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000095// 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 +000096
97buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000098// 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 +000099
100buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000101// 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 +0000102
103buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000104// 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 +0000105
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000106buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000107// 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 +0000108
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000109buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000110// 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 +0000111
112//===----------------------------------------------------------------------===//
113// load - addr64
114//===----------------------------------------------------------------------===//
115
116buffer_load_dword v1, v[2:3], s[4:7], s1 addr64
Matt Arsenaultc1167672015-09-24 19:52:15 +0000117// 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 +0000118
119buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000120// 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 +0000121
122buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000123// 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 +0000124
125buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000126// 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 +0000127
128buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000129// 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 +0000130
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000131buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000132// 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 +0000133
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000134buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000135// 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 +0000136
137//===----------------------------------------------------------------------===//
138// store - immediate offset only
139//===----------------------------------------------------------------------===//
140
141buffer_store_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000142// 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 +0000143
144buffer_store_dword v1, s[4:7], s1 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000145// 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 +0000146
147buffer_store_dword v1, s[4:7], s1 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000148// 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 +0000149
150buffer_store_dword v1, s[4:7], s1 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000151// 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 +0000152
153buffer_store_dword v1, s[4:7], s1 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000154// 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 +0000155
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000156buffer_store_dword v1, s[4:7], s1 glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000157// 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 +0000158
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000159buffer_store_dword v1, s[4:7], s1 offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000160// 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 +0000161
162//===----------------------------------------------------------------------===//
163// store - vgpr offset
164//===----------------------------------------------------------------------===//
165
166buffer_store_dword v1, v2, s[4:7], s1 offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000167// 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 +0000168
169buffer_store_dword v1, v2, s[4:7], s1 offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000170// 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 +0000171
172buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000173// 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 +0000174
175buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000176// 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 +0000177
178buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000179// 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 +0000180
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000181buffer_store_dword v1, v2, s[4:7], s1 offen glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000182// 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 +0000183
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000184buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000185// 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 +0000186
187//===----------------------------------------------------------------------===//
188// store - vgpr index
189//===----------------------------------------------------------------------===//
190
191buffer_store_dword v1, v2, s[4:7], s1 idxen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000192// 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 +0000193
194buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000195// 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 +0000196
197buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000198// 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 +0000199
200buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000201// 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 +0000202
203buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000204// 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 +0000205
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000206buffer_store_dword v1, v2, s[4:7], s1 idxen glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000207// 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 +0000208
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000209buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000210// 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 +0000211
212//===----------------------------------------------------------------------===//
213// store - vgpr index and offset
214//===----------------------------------------------------------------------===//
215
216buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000217// 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 +0000218
219buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000220// 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 +0000221
222buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000223// 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 +0000224
225buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000226// 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 +0000227
228buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000229// 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 +0000230
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000231buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000232// 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 +0000233
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000234buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000235// 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 +0000236
237//===----------------------------------------------------------------------===//
238// store - addr64
239//===----------------------------------------------------------------------===//
240
241buffer_store_dword v1, v[2:3], s[4:7], s1 addr64
Matt Arsenaultc1167672015-09-24 19:52:15 +0000242// 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 +0000243
244buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000245// 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 +0000246
247buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000248// 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 +0000249
250buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000251// 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 +0000252
253buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000254// 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 +0000255
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000256buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000257// 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 +0000258
Nikolay Haustovea8febd2016-03-01 08:34:43 +0000259buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc slc tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000260// 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 +0000261
262//===----------------------------------------------------------------------===//
263// Instructions
264//===----------------------------------------------------------------------===//
265
266buffer_load_format_x v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000267// 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 +0000268
269buffer_load_format_xy v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000270// 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 +0000271
272buffer_load_format_xyz v[1:3], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000273// 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 +0000274
275buffer_load_format_xyzw v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000276// 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 +0000277
278buffer_store_format_x v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000279// 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 +0000280
281buffer_store_format_xy v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000282// 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 +0000283
284buffer_store_format_xyz v[1:3], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000285// 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 +0000286
287buffer_store_format_xyzw v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000288// 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 +0000289
290buffer_load_ubyte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000291// 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 +0000292
293buffer_load_sbyte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000294// 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 +0000295
296buffer_load_ushort v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000297// 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 +0000298
299buffer_load_sshort v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000300// 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 +0000301
302buffer_load_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000303// 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 +0000304
305buffer_load_dwordx2 v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000306// 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 +0000307
308buffer_load_dwordx4 v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000309// 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 +0000310
311buffer_store_byte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000312// 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 +0000313
314buffer_store_short v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000315// 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 +0000316
317buffer_store_dword v1 s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000318// 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 +0000319
320buffer_store_dwordx2 v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000321// 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 +0000322
323buffer_store_dwordx4 v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000324// 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 +0000325
Matt Arsenaultd6adfb42015-09-24 19:52:21 +0000326//===----------------------------------------------------------------------===//
327// Cache invalidation
328//===----------------------------------------------------------------------===//
329
330buffer_wbinvl1
331// SICI: buffer_wbinvl1 ; encoding: [0x00,0x00,0xc4,0xe1,0x00,0x00,0x00,0x00]
332
333buffer_wbinvl1_sc
334// SI: buffer_wbinvl1_sc ; encoding: [0x00,0x00,0xc0,0xe1,0x00,0x00,0x00,0x00]
335// NOCI: error: instruction not supported on this GPU
336// NOVI: error: instruction not supported on this GPU
337
338buffer_wbinvl1_vol
339// CI: buffer_wbinvl1_vol ; encoding: [0x00,0x00,0xc0,0xe1,0x00,0x00,0x00,0x00]
340// NOSI: error: instruction not supported on this GPU
341
Tom Stellardd7e6f132015-04-08 01:09:26 +0000342// TODO: Atomics