1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355
|
# RUN: llvm-mc -triple=amdgcn -mcpu=gfx900 -disassemble -show-encoding < %s | FileCheck %s -check-prefix=GFX9
#===------------------------------------------------------------------------===#
# s_scratch
#===------------------------------------------------------------------------===#
# GFX9: s_scratch_load_dword s5, s[2:3], s101 ; encoding: [0x41,0x01,0x14,0xc0,0x65,0x00,0x00,0x00]
0x41,0x01,0x14,0xc0,0x65,0x00,0x00,0x00
# GFX9: s_scratch_load_dword s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x15,0xc0,0x00,0x00,0x00,0x00]
0x41,0x01,0x15,0xc0,0x00,0x00,0x00,0x00
# GFX9: s_scratch_load_dwordx2 s[100:101], s[2:3], s0 ; encoding: [0x01,0x19,0x18,0xc0,0x00,0x00,0x00,0x00]
0x01,0x19,0x18,0xc0,0x00,0x00,0x00,0x00
# GFX9: s_scratch_load_dwordx2 s[10:11], s[2:3], 0x1 glc ; encoding: [0x81,0x02,0x1b,0xc0,0x01,0x00,0x00,0x00]
0x81,0x02,0x1b,0xc0,0x01,0x00,0x00,0x00
# GFX9: s_scratch_load_dwordx4 s[20:23], s[4:5], s0 ; encoding: [0x02,0x05,0x1c,0xc0,0x00,0x00,0x00,0x00]
0x02,0x05,0x1c,0xc0,0x00,0x00,0x00,0x00
# GFX9: s_scratch_store_dword s101, s[4:5], s0 ; encoding: [0x42,0x19,0x54,0xc0,0x00,0x00,0x00,0x00]
0x42,0x19,0x54,0xc0,0x00,0x00,0x00,0x00
# GFX9: s_scratch_store_dword s1, s[4:5], 0x123 glc ; encoding: [0x42,0x00,0x57,0xc0,0x23,0x01,0x00,0x00]
0x42,0x00,0x57,0xc0,0x23,0x01,0x00,0x00
# GFX9: s_scratch_store_dwordx2 s[2:3], s[4:5], s101 glc ; encoding: [0x82,0x00,0x59,0xc0,0x65,0x00,0x00,0x00]
0x82,0x00,0x59,0xc0,0x65,0x00,0x00,0x00
# GFX9: s_scratch_store_dwordx4 s[4:7], s[4:5], s0 glc ; encoding: [0x02,0x01,0x5d,0xc0,0x00,0x00,0x00,0x00]
0x02,0x01,0x5d,0xc0,0x00,0x00,0x00,0x00
#===------------------------------------------------------------------------===#
# s_dcache_discard
#===------------------------------------------------------------------------===#
# GFX9: s_dcache_discard s[100:101], s0 ; encoding: [0x32,0x00,0xa0,0xc0,0x00,0x00,0x00,0x00]
0x32,0x00,0xa0,0xc0,0x00,0x00,0x00,0x00
# The SGRP variants can alternatively be encoded with imm=0, soffset_en=1
# and the offset register encoded in the soffset field with the offset
# field being disregarded.
# GFX9: s_dcache_discard s[100:101], s64 ; encoding: [0x32,0x40,0xa0,0xc0,0x00,0x00,0x00,0x80]
0x32,0x40,0xa0,0xc0,0x25,0x00,0x00,0x80
# GFX9: s_dcache_discard s[2:3], 0x0 ; encoding: [0x01,0x00,0xa2,0xc0,0x00,0x00,0x00,0x00]
0x01,0x00,0xa2,0xc0,0x00,0x00,0x00,0x00
# GFX9: s_dcache_discard s[2:3], s2 offset:0x12345 ; encoding: [0x01,0x40,0xa2,0xc0,0x45,0x23,0x01,0x04]
0x01,0x40,0xa2,0xc0,0x45,0x23,0x01,0x04
# GFX9: s_dcache_discard_x2 s[2:3], s101 ; encoding: [0x01,0x00,0xa4,0xc0,0x65,0x00,0x00,0x00]
0x01,0x00,0xa4,0xc0,0x65,0x00,0x00,0x00
# GFX9: s_dcache_discard_x2 s[2:3], 0x0 ; encoding: [0x01,0x00,0xa6,0xc0,0x00,0x00,0x00,0x00]
0x01,0x00,0xa6,0xc0,0x00,0x00,0x00,0x00
# GFX9: s_dcache_discard_x2 s[2:3], s2 offset:0x12345 ; encoding: [0x01,0x40,0xa6,0xc0,0x45,0x23,0x01,0x04]
0x01,0x40,0xa6,0xc0,0x45,0x23,0x01,0x04
#===------------------------------------------------------------------------===#
# s_atomic
#===------------------------------------------------------------------------===#
# GFX9: s_atomic_add s5, s[2:3], s101 ; encoding: [0x41,0x01,0x08,0xc2,0x65,0x00,0x00,0x00]
0x41,0x01,0x08,0xc2,0x65,0x00,0x00,0x00
# The SGRP variants can alternatively be encoded with imm=0, soffset_en=1
# and the offset register encoded in the soffset field with the offset
# field being disregarded.
# GFX9: s_atomic_add s5, s[2:3], s101 ; encoding: [0x41,0x41,0x08,0xc2,0x00,0x00,0x00,0xca]
0x41,0x41,0x08,0xc2,0x2e,0x00,0x00,0xca
# The SGRP variants can alternatively be encoded with imm=0, soffset_en=1
# and the offset register encoded in the soffset field with the offset
# field being disregarded.
# GFX9: s_atomic_add s5, s[2:3], s101 glc ; encoding: [0x41,0x41,0x09,0xc2,0x00,0x00,0x00,0xca]
0x41,0x41,0x09,0xc2,0x2e,0x00,0x00,0xca
# GFX9: s_atomic_add_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x88,0xc2,0x65,0x00,0x00,0x00]
0x81,0x02,0x88,0xc2,0x65,0x00,0x00,0x00
# GFX9: s_atomic_add s5, s[2:3], s7 offset:0x12345 ; encoding: [0x41,0x41,0x0a,0xc2,0x45,0x23,0x01,0x0e]
0x41,0x41,0x0a,0xc2,0x45,0x23,0x01,0x0e
# GFX9: s_atomic_add s5, s[2:3], s7 offset:0x12345 glc ; encoding: [0x41,0x41,0x0b,0xc2,0x45,0x23,0x01,0x0e]
0x41,0x41,0x0b,0xc2,0x45,0x23,0x01,0x0e
# GFX9: s_atomic_and s101, s[2:3], s0 ; encoding: [0x41,0x19,0x20,0xc2,0x00,0x00,0x00,0x00]
0x41,0x19,0x20,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_and_x2 s[12:13], s[2:3], s0 ; encoding: [0x01,0x03,0xa0,0xc2,0x00,0x00,0x00,0x00]
0x01,0x03,0xa0,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_cmpswap s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0x04,0xc2,0x65,0x00,0x00,0x00]
0x81,0x02,0x04,0xc2,0x65,0x00,0x00,0x00
# GFX9: s_atomic_cmpswap s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0x06,0xc2,0x00,0x00,0x00,0x00]
0x81,0x02,0x06,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_cmpswap s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x05,0xc2,0x00,0x00,0x00,0x00]
0x81,0x02,0x05,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_cmpswap_x2 s[20:23], s[2:3], s101 ; encoding: [0x01,0x05,0x84,0xc2,0x65,0x00,0x00,0x00]
0x01,0x05,0x84,0xc2,0x65,0x00,0x00,0x00
# GFX9: s_atomic_cmpswap_x2 s[20:23], s[2:3], 0x0 ; encoding: [0x01,0x05,0x86,0xc2,0x00,0x00,0x00,0x00]
0x01,0x05,0x86,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_cmpswap_x2 s[20:23], s[2:3], s0 glc ; encoding: [0x01,0x05,0x85,0xc2,0x00,0x00,0x00,0x00]
0x01,0x05,0x85,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_dec s5, s[4:5], s0 ; encoding: [0x42,0x01,0x30,0xc2,0x00,0x00,0x00,0x00]
0x42,0x01,0x30,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_dec_x2 s[100:101], s[2:3], s0 ; encoding: [0x01,0x19,0xb0,0xc2,0x00,0x00,0x00,0x00]
0x01,0x19,0xb0,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_inc s5, s[100:101], s0 ; encoding: [0x72,0x01,0x2c,0xc2,0x00,0x00,0x00,0x00]
0x72,0x01,0x2c,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_inc_x2 s[10:11], s[4:5], s0 ; encoding: [0x82,0x02,0xac,0xc2,0x00,0x00,0x00,0x00]
0x82,0x02,0xac,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_or s5, s[2:3], s101 ; encoding: [0x41,0x01,0x24,0xc2,0x65,0x00,0x00,0x00]
0x41,0x01,0x24,0xc2,0x65,0x00,0x00,0x00
# GFX9: s_atomic_or_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xa4,0xc2,0x65,0x00,0x00,0x00]
0x81,0x02,0xa4,0xc2,0x65,0x00,0x00,0x00
# GFX9: s_atomic_smax s5, s[2:3], 0x0 ; encoding: [0x41,0x01,0x1a,0xc2,0x00,0x00,0x00,0x00]
0x41,0x01,0x1a,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_smax_x2 s[10:11], s[2:3], 0x0 ; encoding: [0x81,0x02,0x9a,0xc2,0x00,0x00,0x00,0x00]
0x81,0x02,0x9a,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_smin s5, s[2:3], s0 glc ; encoding: [0x41,0x01,0x11,0xc2,0x00,0x00,0x00,0x00]
0x41,0x01,0x11,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_smin_x2 s[10:11], s[2:3], s0 glc ; encoding: [0x81,0x02,0x91,0xc2,0x00,0x00,0x00,0x00]
0x81,0x02,0x91,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_sub s5, s[2:3], s0 ; encoding: [0x41,0x01,0x0c,0xc2,0x00,0x00,0x00,0x00]
0x41,0x01,0x0c,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_sub_x2 s[10:11], s[2:3], s0 ; encoding: [0x81,0x02,0x8c,0xc2,0x00,0x00,0x00,0x00]
0x81,0x02,0x8c,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_swap s101, s[2:3], s0 ; encoding: [0x41,0x19,0x00,0xc2,0x00,0x00,0x00,0x00]
0x41,0x19,0x00,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_swap_x2 s[12:13], s[2:3], s0 ; encoding: [0x01,0x03,0x80,0xc2,0x00,0x00,0x00,0x00]
0x01,0x03,0x80,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_umax s5, s[4:5], s0 ; encoding: [0x42,0x01,0x1c,0xc2,0x00,0x00,0x00,0x00]
0x42,0x01,0x1c,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_umax_x2 s[100:101], s[2:3], s0 ; encoding: [0x01,0x19,0x9c,0xc2,0x00,0x00,0x00,0x00]
0x01,0x19,0x9c,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_umin s5, s[100:101], s0 ; encoding: [0x72,0x01,0x14,0xc2,0x00,0x00,0x00,0x00]
0x72,0x01,0x14,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_umin_x2 s[10:11], s[4:5], s0 ; encoding: [0x82,0x02,0x94,0xc2,0x00,0x00,0x00,0x00]
0x82,0x02,0x94,0xc2,0x00,0x00,0x00,0x00
# GFX9: s_atomic_xor s5, s[2:3], s101 ; encoding: [0x41,0x01,0x28,0xc2,0x65,0x00,0x00,0x00]
0x41,0x01,0x28,0xc2,0x65,0x00,0x00,0x00
# GFX9: s_atomic_xor_x2 s[10:11], s[2:3], s101 ; encoding: [0x81,0x02,0xa8,0xc2,0x65,0x00,0x00,0x00]
0x81,0x02,0xa8,0xc2,0x65,0x00,0x00,0x00
#===------------------------------------------------------------------------===#
# s_buffer_atomic
#===------------------------------------------------------------------------===#
# GFX9: s_buffer_atomic_add s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x0a,0xc1,0x00,0x00,0x00,0x00]
0x42,0x01,0x0a,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_add_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x89,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0x89,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_and s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x21,0xc1,0x00,0x00,0x00,0x00]
0x42,0x01,0x21,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_and_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0xa1,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0xa1,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_cmpswap s[10:11], s[4:7], s101 ; encoding: [0x82,0x02,0x04,0xc1,0x65,0x00,0x00,0x00]
0x82,0x02,0x04,0xc1,0x65,0x00,0x00,0x00
# GFX9: s_buffer_atomic_cmpswap s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0x06,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0x06,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_cmpswap s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x05,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0x05,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s101 ; encoding: [0x02,0x05,0x84,0xc1,0x65,0x00,0x00,0x00]
0x02,0x05,0x84,0xc1,0x65,0x00,0x00,0x00
# GFX9: s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], 0x0 ; encoding: [0x02,0x05,0x86,0xc1,0x00,0x00,0x00,0x00]
0x02,0x05,0x86,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_cmpswap_x2 s[20:23], s[4:7], s0 glc ; encoding: [0x02,0x05,0x85,0xc1,0x00,0x00,0x00,0x00]
0x02,0x05,0x85,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_dec s5, s[4:7], s0 ; encoding: [0x42,0x01,0x30,0xc1,0x00,0x00,0x00,0x00]
0x42,0x01,0x30,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_dec_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0xb0,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0xb0,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_inc s101, s[4:7], s0 ; encoding: [0x42,0x19,0x2c,0xc1,0x00,0x00,0x00,0x00]
0x42,0x19,0x2c,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_inc_x2 s[12:13], s[4:7], s0 ; encoding: [0x02,0x03,0xac,0xc1,0x00,0x00,0x00,0x00]
0x02,0x03,0xac,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_or s5, s[8:11], s0 ; encoding: [0x44,0x01,0x24,0xc1,0x00,0x00,0x00,0x00]
0x44,0x01,0x24,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_or_x2 s[100:101], s[4:7], s0 ; encoding: [0x02,0x19,0xa4,0xc1,0x00,0x00,0x00,0x00]
0x02,0x19,0xa4,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_smax s5, s[96:99], s0 ; encoding: [0x70,0x01,0x18,0xc1,0x00,0x00,0x00,0x00]
0x70,0x01,0x18,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_smax_x2 s[10:11], s[96:99], s0 ; encoding: [0xb0,0x02,0x98,0xc1,0x00,0x00,0x00,0x00]
0xb0,0x02,0x98,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_smin s5, s[4:7], s101 ; encoding: [0x42,0x01,0x10,0xc1,0x65,0x00,0x00,0x00]
0x42,0x01,0x10,0xc1,0x65,0x00,0x00,0x00
# GFX9: s_buffer_atomic_smin_x2 s[10:11], s[4:7], s101 ; encoding: [0x82,0x02,0x90,0xc1,0x65,0x00,0x00,0x00]
0x82,0x02,0x90,0xc1,0x65,0x00,0x00,0x00
# GFX9: s_buffer_atomic_sub s5, s[4:7], 0x0 ; encoding: [0x42,0x01,0x0e,0xc1,0x00,0x00,0x00,0x00]
0x42,0x01,0x0e,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_sub_x2 s[10:11], s[4:7], 0x0 ; encoding: [0x82,0x02,0x8e,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0x8e,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_swap s5, s[4:7], s0 glc ; encoding: [0x42,0x01,0x01,0xc1,0x00,0x00,0x00,0x00]
0x42,0x01,0x01,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_swap_x2 s[10:11], s[4:7], s0 glc ; encoding: [0x82,0x02,0x81,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0x81,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_umax s5, s[4:7], s0 ; encoding: [0x42,0x01,0x1c,0xc1,0x00,0x00,0x00,0x00]
0x42,0x01,0x1c,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_umax_x2 s[10:11], s[4:7], s0 ; encoding: [0x82,0x02,0x9c,0xc1,0x00,0x00,0x00,0x00]
0x82,0x02,0x9c,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_umin s101, s[4:7], s0 ; encoding: [0x42,0x19,0x14,0xc1,0x00,0x00,0x00,0x00]
0x42,0x19,0x14,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_umin_x2 s[12:13], s[4:7], s0 ; encoding: [0x02,0x03,0x94,0xc1,0x00,0x00,0x00,0x00]
0x02,0x03,0x94,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_xor s5, s[8:11], s0 ; encoding: [0x44,0x01,0x28,0xc1,0x00,0x00,0x00,0x00]
0x44,0x01,0x28,0xc1,0x00,0x00,0x00,0x00
# GFX9: s_buffer_atomic_xor_x2 s[100:101], s[4:7], s0 ; encoding: [0x02,0x19,0xa8,0xc1,0x00,0x00,0x00,0x00]
0x02,0x19,0xa8,0xc1,0x00,0x00,0x00,0x00
#===------------------------------------------------------------------------===#
# Unsigned 20-bit offsets
#===------------------------------------------------------------------------===#
# GFX9: s_atc_probe 7, s[4:5], 0xfffff ; encoding: [0xc2,0x01,0x9a,0xc0,0xff,0xff,0x0f,0x00]
0xc2,0x01,0x9a,0xc0,0xff,0xff,0x0f,0x00
# GFX9: s_atc_probe_buffer 1, s[8:11], 0xfffff ; encoding: [0x44,0x00,0x9e,0xc0,0xff,0xff,0x0f,0x00]
0x44,0x00,0x9e,0xc0,0xff,0xff,0x0f,0x00
# GFX9: s_store_dword s1, s[2:3], 0xfffff ; encoding: [0x41,0x00,0x42,0xc0,0xff,0xff,0x0f,0x00]
0x41,0x00,0x42,0xc0,0xff,0xff,0x0f,0x00
# GFX9: s_buffer_store_dword s10, s[92:95], 0xfffff ; encoding: [0xae,0x02,0x62,0xc0,0xff,0xff,0x0f,0x00]
0xae,0x02,0x62,0xc0,0xff,0xff,0x0f,0x00
# GFX9: s_atomic_swap s5, s[2:3], 0xfffff ; encoding: [0x41,0x01,0x02,0xc2,0xff,0xff,0x0f,0x00]
0x41,0x01,0x02,0xc2,0xff,0xff,0x0f,0x00
# GFX9: s_buffer_atomic_swap s5, s[4:7], 0xfffff ; encoding: [0x42,0x01,0x02,0xc1,0xff,0xff,0x0f,0x00]
0x42,0x01,0x02,0xc1,0xff,0xff,0x0f,0x00
#===------------------------------------------------------------------------===#
# Signed 20-bit offsets
#===------------------------------------------------------------------------===#
# GFX9: s_atc_probe 7, s[4:5], -0x1 ; encoding: [0xc2,0x01,0x9a,0xc0,0xff,0xff,0x1f,0x00]
0xc2,0x01,0x9a,0xc0,0xff,0xff,0x1f,0x00
# GFX9: s_store_dword s1, s[2:3], -0x1 ; encoding: [0x41,0x00,0x42,0xc0,0xff,0xff,0x1f,0x00]
0x41,0x00,0x42,0xc0,0xff,0xff,0x1f,0x00
# GFX9: s_load_dword s1, s[2:3], -0x1 ; encoding: [0x41,0x00,0x02,0xc0,0xff,0xff,0x1f,0x00]
0x41,0x00,0x02,0xc0,0xff,0xff,0x1f,0x00
# GFX9: s_atomic_swap s5, s[2:3], -0x1 ; encoding: [0x41,0x01,0x02,0xc2,0xff,0xff,0x1f,0x00]
0x41,0x01,0x02,0xc2,0xff,0xff,0x1f,0x00
# GFX9: s_atc_probe 7, s[4:5], -0x100000 ; encoding: [0xc2,0x01,0x9a,0xc0,0x00,0x00,0x10,0x00]
0xc2,0x01,0x9a,0xc0,0x00,0x00,0x10,0x00
# GFX9: s_store_dword s1, s[2:3], -0x100000 ; encoding: [0x41,0x00,0x42,0xc0,0x00,0x00,0x10,0x00]
0x41,0x00,0x42,0xc0,0x00,0x00,0x10,0x00
# GFX9: s_load_dword s1, s[2:3], -0x100000 ; encoding: [0x41,0x00,0x02,0xc0,0x00,0x00,0x10,0x00]
0x41,0x00,0x02,0xc0,0x00,0x00,0x10,0x00
# GFX9: s_atomic_swap s5, s[2:3], -0x100000 ; encoding: [0x41,0x01,0x02,0xc2,0x00,0x00,0x10,0x00]
0x41,0x01,0x02,0xc2,0x00,0x00,0x10,0x00
#===------------------------------------------------------------------------===#
# Decoding of invalid buffer offsets
#===------------------------------------------------------------------------===#
# GFX9: s_atc_probe_buffer 1, s[8:11], -0x1 ; encoding: [0x44,0x00,0x9e,0xc0,0xff,0xff,0x1f,0x00]
0x44,0x00,0x9e,0xc0,0xff,0xff,0x1f,0x00
#===------------------------------------------------------------------------===#
# Decoding of OFFSET>127 with IMM=0
#===------------------------------------------------------------------------===#
# GFX9: s_atomic_or s5, s[2:3], s15 ; encoding: [0x41,0x01,0x24,0xc2,0x0f,0x00,0x00,0x00]
0x41,0x01,0x24,0xc2,0x8f,0x00,0x00,0x00
# GFX9: s_atomic_or s5, s[2:3], exec_hi ; encoding: [0x41,0x01,0x24,0xc2,0x7f,0x00,0x00,0x00]
0x41,0x01,0x24,0xc2,0xff,0xff,0x00,0x00
# GFX9: s_atomic_add_x2 s[34:35], exec, s11 glc ; encoding: [0xbf,0x08,0x89,0xc2,0x0b,0x00,0x00,0x00]
0xbf,0x08,0x89,0xc2,0x0b,0x00,0x00,0x00
#===------------------------------------------------------------------------===#
# s_atc_probe
#===------------------------------------------------------------------------===#
# GFX9: s_atc_probe 7, s[4:5], s9 ; encoding: [0xc2,0x01,0x98,0xc0,0x09,0x00,0x00,0x00]
0xc2,0x01,0x98,0xc0,0x09,0x00,0x00,0x00
# The SGRP variants can alternatively be encoded with imm=0, soffset_en=1
# and the offset register encoded in the soffset field with the offset
# field being disregarded.
# GFX9: s_atc_probe 7, s[4:5], s9 ; encoding: [0xc2,0x41,0x98,0xc0,0x00,0x00,0x00,0x12]
0xc2,0x41,0x98,0xc0,0x2e,0x00,0x00,0x12
# GFX9: s_atc_probe 7, s[4:5], s9 offset:0x64 ; encoding: [0xc2,0x41,0x9a,0xc0,0x64,0x00,0x00,0x12]
0xc2,0x41,0x9a,0xc0,0x64,0x00,0x00,0x12
# GFX9: s_atc_probe_buffer 7, s[8:11], s9 offset:0x64 ; encoding: [0xc4,0x41,0x9e,0xc0,0x64,0x00,0x00,0x12]
0xc4,0x41,0x9e,0xc0,0x64,0x00,0x00,0x12
|