xref: /openbsd/gnu/llvm/llvm/docs/AMDGPU/gfx8_imask.rst (revision d415bd75)
1..
2    **************************************************
3    *                                                *
4    *   Automatically generated file, do not edit!   *
5    *                                                *
6    **************************************************
7
8.. _amdgpu_synid_gfx8_imask:
9
10imask
11=====
12
13This operand is a mask which controls indexing mode for operands of subsequent instructions.
14Bits 0, 1 and 2 control indexing of *src0*, *src1* and *src2*, while bit 3 controls indexing of *dst*.
15Value 1 enables indexing, and value 0 disables it.
16
17    ===== ========================================
18    Bit   Meaning
19    ===== ========================================
20    0     Enables or disables *src0* indexing.
21    1     Enables or disables *src1* indexing.
22    2     Enables or disables *src2* indexing.
23    3     Enables or disables *dst* indexing.
24    ===== ========================================
25
26This operand may be specified as one of the following:
27
28* An :ref:`integer_number<amdgpu_synid_integer_number>` or an :ref:`absolute_expression<amdgpu_synid_absolute_expression>`. The value must be in the range from 0 to 15.
29* A *gpr_idx* value which is described below.
30
31    ==================================== =============================================
32    Gpr_idx Value Syntax                 Description
33    ==================================== =============================================
34    gpr_idx(*<operand list>*)            Enable indexing for the specified *operands*
35                                         and disable it for the rest.
36                                         *Operand list* is a comma-separated list of
37                                         values which may include:
38
39                                         * SRC0 - enable *src0* indexing.
40
41                                         * SRC1 - enable *src1* indexing.
42
43                                         * SRC2 - enable *src2* indexing.
44
45                                         * DST  - enable *dst* indexing.
46
47                                         Each of these values may be specified only
48                                         once.
49
50                                         *Operand list* may be empty; this syntax
51                                         disables indexing for all operands.
52    ==================================== =============================================
53
54Examples:
55
56.. parsed-literal::
57
58    s_set_gpr_idx_mode 0
59    s_set_gpr_idx_mode gpr_idx()                        // the same as above
60
61    s_set_gpr_idx_mode 15
62    s_set_gpr_idx_mode gpr_idx(DST,SRC0,SRC1,SRC2)      // the same as above
63    s_set_gpr_idx_mode gpr_idx(SRC0,SRC1,SRC2,DST)      // the same as above
64
65    s_set_gpr_idx_mode gpr_idx(DST,SRC1)
66