Skip to content

Commit 5975f1c

Browse files
committed
[AMDGPU][DOC][NFC] Added GFX1030 assembler syntax description
1 parent cf396c5 commit 5975f1c

File tree

103 files changed

+4162
-31
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+4162
-31
lines changed

llvm/docs/AMDGPU/AMDGPUAsmGFX10.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
**************************************************
77

88
====================================================================================
9-
Syntax of Core GFX10 Instructions
9+
Syntax of GFX10 RDNA1 Instructions
1010
====================================================================================
1111

1212
.. contents::
@@ -15,7 +15,7 @@ Syntax of Core GFX10 Instructions
1515
Introduction
1616
============
1717

18-
This document describes the syntax of *core* GFX10 instructions.
18+
This document describes the syntax of GFX10 RDNA1 (gfx1010) instructions.
1919

2020
Notation
2121
========

llvm/docs/AMDGPU/AMDGPUAsmGFX1011.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Introduction
1717

1818
This document describes the syntax of *instructions specific to gfx1011 and gfx1012*.
1919

20-
For a description of other gfx1011 and gfx1012 instructions see :doc:`Syntax of Core GFX10 Instructions<AMDGPUAsmGFX10>`.
20+
For a description of other gfx1011 and gfx1012 instructions see :doc:`Syntax of GFX10 RDNA1 Instructions<AMDGPUAsmGFX10>`.
2121

2222
Notation
2323
========

llvm/docs/AMDGPU/AMDGPUAsmGFX1030.rst

Lines changed: 2166 additions & 0 deletions
Large diffs are not rendered by default.

llvm/docs/AMDGPU/gfx1030_attr.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_attr:
9+
10+
attr
11+
====
12+
13+
Interpolation attribute and channel:
14+
15+
============== ===================================
16+
Syntax Description
17+
============== ===================================
18+
attr{0..32}.x Attribute 0..32 with *x* channel.
19+
attr{0..32}.y Attribute 0..32 with *y* channel.
20+
attr{0..32}.z Attribute 0..32 with *z* channel.
21+
attr{0..32}.w Attribute 0..32 with *w* channel.
22+
============== ===================================
23+
24+
Examples:
25+
26+
.. parsed-literal::
27+
28+
v_interp_p1_f32 v1, v0, attr0.x
29+
v_interp_p1_f32 v1, v0, attr32.w

llvm/docs/AMDGPU/gfx1030_dst.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_dst:
9+
10+
dst
11+
===
12+
13+
This is an input operand. It may optionally serve as a destination if :ref:`glc<amdgpu_synid_glc>` is specified.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_fx_operand:
9+
10+
FX Operand
11+
==========
12+
13+
This is an *f32* or *f16* operand depending on instruction modifiers:
14+
15+
* Operand size is controlled by :ref:`m_op_sel_hi<amdgpu_synid_mad_mix_op_sel_hi>`.
16+
* Location of 16-bit operand is controlled by :ref:`m_op_sel<amdgpu_synid_mad_mix_op_sel>`.

llvm/docs/AMDGPU/gfx1030_hwreg.rst

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_hwreg:
9+
10+
hwreg
11+
=====
12+
13+
Bits of a hardware register being accessed.
14+
15+
The bits of this operand have the following meaning:
16+
17+
======= ===================== ============
18+
Bits Description Value Range
19+
======= ===================== ============
20+
5:0 Register *id*. 0..63
21+
10:6 First bit *offset*. 0..31
22+
15:11 *Size* in bits. 1..32
23+
======= ===================== ============
24+
25+
This operand may be specified as one of the following:
26+
27+
* An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range 0..0xFFFF.
28+
* An *hwreg* value described below.
29+
30+
==================================== ============================================================================
31+
Hwreg Value Syntax Description
32+
==================================== ============================================================================
33+
hwreg({0..63}) All bits of a register indicated by its *id*.
34+
hwreg(<*name*>) All bits of a register indicated by its *name*.
35+
hwreg({0..63}, {0..31}, {1..32}) Register bits indicated by register *id*, first bit *offset* and *size*.
36+
hwreg(<*name*>, {0..31}, {1..32}) Register bits indicated by register *name*, first bit *offset* and *size*.
37+
==================================== ============================================================================
38+
39+
Numeric values may be specified as positive :ref:`integer numbers<amdgpu_synid_integer_number>`
40+
or :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
41+
42+
Defined register *names* include:
43+
44+
==================== ==========================================
45+
Name Description
46+
==================== ==========================================
47+
HW_REG_MODE Shader writeable mode bits.
48+
HW_REG_STATUS Shader read-only status.
49+
HW_REG_TRAPSTS Trap status.
50+
HW_REG_HW_ID1 Id of wave, simd, compute unit, etc.
51+
HW_REG_HW_ID2 Id of queue, pipeline, etc.
52+
HW_REG_GPR_ALLOC Per-wave SGPR and VGPR allocation.
53+
HW_REG_LDS_ALLOC Per-wave LDS allocation.
54+
HW_REG_IB_STS Counters of outstanding instructions.
55+
HW_REG_SH_MEM_BASES Memory aperture.
56+
HW_REG_TBA_LO tba_lo register.
57+
HW_REG_TBA_HI tba_hi register.
58+
HW_REG_TMA_LO tma_lo register.
59+
HW_REG_TMA_HI tma_hi register.
60+
HW_REG_FLAT_SCR_LO flat_scratch_lo register.
61+
HW_REG_FLAT_SCR_HI flat_scratch_hi register.
62+
HW_REG_POPS_PACKER pops_packer register.
63+
HW_REG_SHADER_CYCLES Current graphics clock counter value.
64+
==================== ==========================================
65+
66+
Examples:
67+
68+
.. parsed-literal::
69+
70+
reg = 1
71+
offset = 2
72+
size = 4
73+
hwreg_enc = reg | (offset << 6) | ((size - 1) << 11)
74+
75+
s_getreg_b32 s2, 0x1881
76+
s_getreg_b32 s2, hwreg_enc // the same as above
77+
s_getreg_b32 s2, hwreg(1, 2, 4) // the same as above
78+
s_getreg_b32 s2, hwreg(reg, offset, size) // the same as above
79+
80+
s_getreg_b32 s2, hwreg(15)
81+
s_getreg_b32 s2, hwreg(51, 1, 31)
82+
s_getreg_b32 s2, hwreg(HW_REG_LDS_ALLOC, 0, 1)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_imm16_73139a:
9+
10+
imm16
11+
=====
12+
13+
An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range -32768..65535.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_imm16_a04fb3:
9+
10+
imm16
11+
=====
12+
13+
An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range 0..65535.

llvm/docs/AMDGPU/gfx1030_label.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
..
2+
**************************************************
3+
* *
4+
* Automatically generated file, do not edit! *
5+
* *
6+
**************************************************
7+
8+
.. _amdgpu_synid_gfx1030_label:
9+
10+
label
11+
=====
12+
13+
A branch target which is a 16-bit signed integer treated as a PC-relative dword offset.
14+
15+
This operand may be specified as one of the following:
16+
17+
* An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range -32768..65535.
18+
* A :ref:`symbol<amdgpu_synid_symbol>` (for example, a label) representing a relocatable address in the same compilation unit where it is referred from. The value is handled as a 16-bit PC-relative dword offset to be resolved by a linker.
19+
20+
Examples:
21+
22+
.. parsed-literal::
23+
24+
offset = 30
25+
label_1:
26+
label_2 = . + 4
27+
28+
s_branch 32
29+
s_branch offset + 2
30+
s_branch label_1
31+
s_branch label_2
32+
s_branch label_3
33+
s_branch label_4
34+
35+
label_3 = label_2 + 4
36+
label_4:

0 commit comments

Comments
 (0)