1 ==============================
2 User Guide for AMDGPU Back-end
3 ==============================
8 The AMDGPU back-end provides ISA code generation for AMD GPUs, starting with
9 the R600 family up until the current Volcanic Islands (GCN Gen 3).
15 The assembler is currently considered experimental.
17 For syntax examples look in test/MC/AMDGPU.
19 Below some of the currently supported features (modulo bugs). These
20 all apply to the Southern Islands ISA, Sea Islands and Volcanic Islands
21 are also supported but may be missing some instructions and have more bugs:
25 All DS instructions are supported.
29 These instructions are only present in the Sea Islands and Volcanic Islands
30 instruction set. All FLAT instructions are supported for these architectures
34 All non-atomic MUBUF instructions are supported.
38 Only the s_load_dword* SMRD instructions are supported.
42 All SOP1 instructions are supported.
46 All SOP2 instructions are supported.
50 All SOPC instructions are supported.
55 Unless otherwise mentioned, all SOPP instructions that have one or more
56 operands accept integer operands only. No verification is performed
57 on the operands, so it is up to the programmer to be familiar with the
58 range or acceptable values.
63 s_waitcnt accepts named arguments to specify which memory counter(s) to
68 // Wait for all counters to be 0
71 // Equivalent to s_waitcnt 0. Counter names can also be delimited by
73 s_waitcnt vmcnt(0) expcnt(0) lgkcmt(0)
75 // Wait for vmcnt counter to be 1.
78 VOP1, VOP2, VOP3, VOPC Instructions
79 -----------------------------------
81 All 32-bit and 64-bit encodings should work.
83 The assembler will automatically detect which encoding size to use for
84 VOP1, VOP2, and VOPC instructions based on the operands. If you want to force
85 a specific encoding size, you can add an _e32 (for 32-bit encoding) or
86 _e64 (for 64-bit encoding) suffix to the instruction. Most, but not all
87 instructions support an explicit suffix. These are all valid assembly
92 v_mul_i32_i24 v1, v2, v3
93 v_mul_i32_i24_e32 v1, v2, v3
94 v_mul_i32_i24_e64 v1, v2, v3