blob: 6fee332d1d2b0dbd3810c5edc145f88ca05e8d30 [file] [log] [blame]
Matt Arsenaultc1167672015-09-24 19:52:15 +00001// RUN: llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=SI -check-prefix=SICI %s
2// RUN: llvm-mc -arch=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck -check-prefix=GCN -check-prefix=CI -check-prefix=SICI %s
Tom Stellardd7e6f132015-04-08 01:09:26 +00003
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
Matt Arsenaultc1167672015-09-24 19:52:15 +000013// 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 +000014
15buffer_load_dword v1, s[4:7], s1 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000016// 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 +000017
18buffer_load_dword v1, s[4:7], s1 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000019// 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 +000020
21buffer_load_dword v1, s[4:7], s1 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000022// 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 +000023
24buffer_load_dword v1, s[4:7], s1 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000025// 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 +000026
27buffer_load_dword v1, s[4:7], s1 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000028// 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 +000029
30buffer_load_dword v1, s[4:7], s1 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000031// 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 +000032
33buffer_load_dword v1, s[4:7], s1 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000034// 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 +000035
36//===----------------------------------------------------------------------===//
37// load - vgpr offset
38//===----------------------------------------------------------------------===//
39
40buffer_load_dword v1, v2, s[4:7], s1 offen
Matt Arsenaultc1167672015-09-24 19:52:15 +000041// 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 +000042
43buffer_load_dword v1, v2, s[4:7], s1 offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000044// 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 +000045
46buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000047// 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 +000048
49buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000050// 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 +000051
52buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000053// 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 +000054
55buffer_load_dword v1, v2, s[4:7], s1 offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000056// 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 +000057
58buffer_load_dword v1, v2, s[4:7], s1 offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000059// 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 +000060
61buffer_load_dword v1, v2, s[4:7], s1 offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000062// 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 +000063
64//===----------------------------------------------------------------------===//
65// load - vgpr index
66//===----------------------------------------------------------------------===//
67
68buffer_load_dword v1, v2, s[4:7], s1 idxen
Matt Arsenaultc1167672015-09-24 19:52:15 +000069// 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 +000070
71buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000072// 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 +000073
74buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000075// 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 +000076
77buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000078// 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 +000079
80buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +000081// 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 +000082
83buffer_load_dword v1, v2, s[4:7], s1 idxen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +000084// 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 +000085
86buffer_load_dword v1, v2, s[4:7], s1 idxen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +000087// 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 +000088
89buffer_load_dword v1, v2, s[4:7], s1 idxen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +000090// 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 +000091
92//===----------------------------------------------------------------------===//
93// load - vgpr index and offset
94//===----------------------------------------------------------------------===//
95
96buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen
Matt Arsenaultc1167672015-09-24 19:52:15 +000097// 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 +000098
99buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000100// 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 +0000101
102buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000103// 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 +0000104
105buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000106// 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 +0000107
108buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000109// 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 +0000110
111buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000112// 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 +0000113
114buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000115// 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 +0000116
117buffer_load_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000118// 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 +0000119
120//===----------------------------------------------------------------------===//
121// load - addr64
122//===----------------------------------------------------------------------===//
123
124buffer_load_dword v1, v[2:3], s[4:7], s1 addr64
Matt Arsenaultc1167672015-09-24 19:52:15 +0000125// 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 +0000126
127buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000128// 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 +0000129
130buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000131// 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 +0000132
133buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000134// 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 +0000135
136buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000137// 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 +0000138
139buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000140// 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 +0000141
142buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000143// 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 +0000144
145buffer_load_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000146// 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 +0000147
148//===----------------------------------------------------------------------===//
149// store - immediate offset only
150//===----------------------------------------------------------------------===//
151
152buffer_store_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000153// 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 +0000154
155buffer_store_dword v1, s[4:7], s1 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000156// 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 +0000157
158buffer_store_dword v1, s[4:7], s1 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000159// 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 +0000160
161buffer_store_dword v1, s[4:7], s1 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000162// 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 +0000163
164buffer_store_dword v1, s[4:7], s1 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000165// 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 +0000166
167buffer_store_dword v1, s[4:7], s1 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000168// 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 +0000169
170buffer_store_dword v1, s[4:7], s1 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000171// 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 +0000172
173buffer_store_dword v1, s[4:7], s1 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000174// 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 +0000175
176//===----------------------------------------------------------------------===//
177// store - vgpr offset
178//===----------------------------------------------------------------------===//
179
180buffer_store_dword v1, v2, s[4:7], s1 offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000181// 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 +0000182
183buffer_store_dword v1, v2, s[4:7], s1 offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000184// 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 +0000185
186buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000187// 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 +0000188
189buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000190// 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 +0000191
192buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000193// 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 +0000194
195buffer_store_dword v1, v2, s[4:7], s1 offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000196// 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 +0000197
198buffer_store_dword v1, v2, s[4:7], s1 offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000199// 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 +0000200
201buffer_store_dword v1, v2, s[4:7], s1 offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000202// 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 +0000203
204//===----------------------------------------------------------------------===//
205// store - vgpr index
206//===----------------------------------------------------------------------===//
207
208buffer_store_dword v1, v2, s[4:7], s1 idxen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000209// 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 +0000210
211buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000212// 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 +0000213
214buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000215// 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 +0000216
217buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000218// 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 +0000219
220buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000221// 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 +0000222
223buffer_store_dword v1, v2, s[4:7], s1 idxen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000224// 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 +0000225
226buffer_store_dword v1, v2, s[4:7], s1 idxen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000227// 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 +0000228
229buffer_store_dword v1, v2, s[4:7], s1 idxen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000230// 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 +0000231
232//===----------------------------------------------------------------------===//
233// store - vgpr index and offset
234//===----------------------------------------------------------------------===//
235
236buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen
Matt Arsenaultc1167672015-09-24 19:52:15 +0000237// 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 +0000238
239buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000240// 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 +0000241
242buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000243// 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 +0000244
245buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000246// 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 +0000247
248buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000249// 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 +0000250
251buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000252// 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 +0000253
254buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000255// 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 +0000256
257buffer_store_dword v1, v[2:3], s[4:7], s1 idxen offen glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000258// 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 +0000259
260//===----------------------------------------------------------------------===//
261// store - addr64
262//===----------------------------------------------------------------------===//
263
264buffer_store_dword v1, v[2:3], s[4:7], s1 addr64
Matt Arsenaultc1167672015-09-24 19:52:15 +0000265// 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 +0000266
267buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000268// 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 +0000269
270buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000271// 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 +0000272
273buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000274// 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 +0000275
276buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 tfe
Matt Arsenaultc1167672015-09-24 19:52:15 +0000277// 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 +0000278
279buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 tfe glc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000280// 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 +0000281
282buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 offset:4 glc tfe slc
Matt Arsenaultc1167672015-09-24 19:52:15 +0000283// 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 +0000284
285buffer_store_dword v1, v[2:3], s[4:7], s1 addr64 glc tfe slc offset:4
Matt Arsenaultc1167672015-09-24 19:52:15 +0000286// 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 +0000287
288//===----------------------------------------------------------------------===//
289// Instructions
290//===----------------------------------------------------------------------===//
291
292buffer_load_format_x v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000293// 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 +0000294
295buffer_load_format_xy v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000296// 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 +0000297
298buffer_load_format_xyz v[1:3], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000299// 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 +0000300
301buffer_load_format_xyzw v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000302// 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 +0000303
304buffer_store_format_x v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000305// 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 +0000306
307buffer_store_format_xy v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000308// 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 +0000309
310buffer_store_format_xyz v[1:3], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000311// 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 +0000312
313buffer_store_format_xyzw v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000314// 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 +0000315
316buffer_load_ubyte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000317// 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 +0000318
319buffer_load_sbyte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000320// 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 +0000321
322buffer_load_ushort v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000323// 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 +0000324
325buffer_load_sshort v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000326// 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 +0000327
328buffer_load_dword v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000329// 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 +0000330
331buffer_load_dwordx2 v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000332// 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 +0000333
334buffer_load_dwordx4 v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000335// 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 +0000336
337buffer_store_byte v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000338// 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 +0000339
340buffer_store_short v1, s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000341// 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 +0000342
343buffer_store_dword v1 s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000344// 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 +0000345
346buffer_store_dwordx2 v[1:2], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000347// 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 +0000348
349buffer_store_dwordx4 v[1:4], s[4:7], s1
Matt Arsenaultc1167672015-09-24 19:52:15 +0000350// 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 +0000351
352// TODO: Atomics