@@ -10,10 +10,10 @@ AMDGPU Instructions Notation
10
10
Introduction
11
11
============
12
12
13
- This is an overview of notation used to describe syntax of AMDGPU assembler instructions.
13
+ This is an overview of notation used to describe the syntax of AMDGPU assembler instructions.
14
14
15
- This notation mimics the :ref: `syntax of assembler instructions<amdgpu_syn_instructions> `
16
- except that instead of real operands and modifiers it provides references to their description .
15
+ This notation looks a lot like the :ref: `syntax of assembler instructions<amdgpu_syn_instructions> `,
16
+ except that instead of real operands and modifiers, it uses references to their descriptions .
17
17
18
18
Instructions
19
19
============
@@ -23,7 +23,9 @@ Notation
23
23
24
24
This is the notation used to describe AMDGPU instructions:
25
25
26
- ``< ``\ :ref: `opcode description<amdgpu_syn_opcode_notation> `\ ``> < ``\ :ref: `operands description<amdgpu_syn_instruction_operands_notation> `\ ``> < ``\ :ref: `modifiers description<amdgpu_syn_instruction_modifiers_notation> `\ ``> ``
26
+ | ``<``\ :ref:`opcode description<amdgpu_syn_opcode_notation>`\ ``>
27
+ <``\ :ref:`operands description<amdgpu_syn_instruction_operands_notation>`\ ``>
28
+ <``\ :ref:`modifiers description<amdgpu_syn_instruction_modifiers_notation>`\ ``>``
27
29
28
30
.. _amdgpu_syn_opcode_notation :
29
31
@@ -42,7 +44,8 @@ Operands
42
44
43
45
An instruction may have zero or more *operands *. They are comma-separated in the description:
44
46
45
- ``< ``\ :ref: `description of operand 0<amdgpu_syn_instruction_operand_notation> `\ ``>, < ``\ :ref: `description of operand 1<amdgpu_syn_instruction_operand_notation> `\ ``>, ... ``
47
+ | ``<``\ :ref:`description of operand 0<amdgpu_syn_instruction_operand_notation>`\ ``>,
48
+ <``\ :ref:`description of operand 1<amdgpu_syn_instruction_operand_notation>`\ ``>, ...``
46
49
47
50
The order of *operands * is fixed. *Operands * cannot be omitted
48
51
except for special cases described below.
60
63
61
64
* *kind * is an optional prefix describing operand :ref: `kind<amdgpu_syn_instruction_operand_kinds> `.
62
65
* *name * is a link to a description of the operand.
63
- * *tags * are optional. They are used to indicate :ref: `special operand properties<amdgpu_syn_instruction_operand_tags> `.
66
+ * *tags * are optional. They are used to indicate
67
+ :ref: `special operand properties<amdgpu_syn_instruction_operand_tags> `.
64
68
65
69
.. _amdgpu_syn_instruction_operand_kinds :
66
70
@@ -70,16 +74,16 @@ Operand Kinds
70
74
Operand kind indicates which values are accepted by the operand.
71
75
72
76
* Operands which only accept *vector * registers are labelled with 'v' prefix.
73
- * Operands which only accept *scalar * values are labelled with 's' prefix.
74
- * Operands which accept both * vector * registers and * scalar * values have no prefix.
77
+ * Operands which only accept *scalar * registers and values are labelled with 's' prefix.
78
+ * Operands which accept any registers and values have no prefix.
75
79
76
80
Examples:
77
81
78
82
.. parsed-literal ::
79
83
80
84
vdata // operand only accepts vector registers
81
85
sdst // operand only accepts scalar registers
82
- src1 // operand accepts both scalar and vector registers
86
+ src1 // operand accepts vector registers, scalar registers, and scalar values
83
87
84
88
.. _amdgpu_syn_instruction_operand_tags :
85
89
@@ -92,16 +96,16 @@ Operand tags indicate special operand properties.
92
96
Operand tag Meaning
93
97
============== =================================================================================
94
98
:opt An optional operand.
95
- :m An operand which may be used with
96
- :ref: `VOP3 operand modifiers<amdgpu_synid_vop3_operand_modifiers > ` or
97
- :ref: `SDWA operand modifiers<amdgpu_synid_sdwa_operand_modifiers > `.
98
- :dst An input operand which may also serve as a destination
99
+ :m An operand which may be used with operand modifiers
100
+ :ref: `abs<amdgpu_synid_abs> `, :ref: ` neg<amdgpu_synid_neg > ` or
101
+ :ref: `sext<amdgpu_synid_sext > `.
102
+ :dst An input operand which is also used as a destination
99
103
if :ref: `glc<amdgpu_synid_glc> ` modifier is specified.
100
- :fx This is an *f32 * or *f16 * operand depending on
104
+ :fx This is a *f32 * or *f16 * operand, depending on
101
105
:ref: `m_op_sel_hi<amdgpu_synid_mad_mix_op_sel_hi> ` modifier.
102
- :<type> Operand *type * differs from *type *
106
+ :<type> The operand *type * differs from the *type *
103
107
:ref: `implied by the opcode name<amdgpu_syn_instruction_type> `.
104
- This tag specifies actual operand *type *.
108
+ This tag specifies the actual operand *type *.
105
109
============== =================================================================================
106
110
107
111
Examples:
@@ -119,7 +123,8 @@ Modifiers
119
123
120
124
An instruction may have zero or more optional *modifiers *. They are space-separated in the description:
121
125
122
- ``< ``\ :ref: `description of modifier 0<amdgpu_syn_instruction_modifier_notation> `\ ``> < ``\ :ref: `description of modifier 1<amdgpu_syn_instruction_modifier_notation> `\ ``> ... ``
126
+ | ``<``\ :ref:`description of modifier 0<amdgpu_syn_instruction_modifier_notation>`\ ``>
127
+ <``\ :ref:`description of modifier 1<amdgpu_syn_instruction_modifier_notation>`\ ``> ...``
123
128
124
129
The order of *modifiers * is fixed.
125
130
@@ -132,4 +137,4 @@ A *modifier* is described using the following notation:
132
137
133
138
*<name> *
134
139
135
- Where *name * is a link to a description of the *modifier *.
140
+ Where the *name * is a link to a description of the *modifier *.
0 commit comments