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