1 ======================================
2 Syntax of AMDGPU Instruction Modifiers
3 ======================================
11 The following notation is used throughout this document:
13 =================== =============================================================
15 =================== =============================================================
16 {0..N} Any integer value in the range from 0 to N (inclusive).
17 <x> Syntax and meaning of *x* is explained elsewhere.
18 =================== =============================================================
20 .. _amdgpu_syn_modifiers:
28 .. _amdgpu_synid_ds_offset80:
33 Specifies first 8-bit offset, in bytes. The default value is 0.
35 Used with DS instructions that expect two addresses.
37 =================== ====================================================================
39 =================== ====================================================================
40 offset0:{0..0xFF} Specifies an unsigned 8-bit offset as a positive
41 :ref:`integer number <amdgpu_synid_integer_number>`
42 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
43 =================== ====================================================================
53 .. _amdgpu_synid_ds_offset81:
58 Specifies second 8-bit offset, in bytes. The default value is 0.
60 Used with DS instructions that expect two addresses.
62 =================== ====================================================================
64 =================== ====================================================================
65 offset1:{0..0xFF} Specifies an unsigned 8-bit offset as a positive
66 :ref:`integer number <amdgpu_synid_integer_number>`
67 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
68 =================== ====================================================================
78 .. _amdgpu_synid_ds_offset16:
83 Specifies a 16-bit offset, in bytes. The default value is 0.
85 Used with DS instructions that expect a single address.
87 ==================== ====================================================================
89 ==================== ====================================================================
90 offset:{0..0xFFFF} Specifies an unsigned 16-bit offset as a positive
91 :ref:`integer number <amdgpu_synid_integer_number>`
92 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
93 ==================== ====================================================================
103 .. _amdgpu_synid_sw_offset16:
108 This is a special modifier which may be used with *ds_swizzle_b32* instruction only.
109 It specifies a swizzle pattern in numeric or symbolic form. The default value is 0.
111 See AMD documentation for more information.
113 ======================================================= ===========================================================
115 ======================================================= ===========================================================
116 offset:{0..0xFFFF} Specifies a 16-bit swizzle pattern.
117 offset:swizzle(QUAD_PERM,{0..3},{0..3},{0..3},{0..3}) Specifies a quad permute mode pattern
119 Each number is a lane *id*.
120 offset:swizzle(BITMASK_PERM, "<mask>") Specifies a bitmask permute mode pattern.
122 The pattern converts a 5-bit lane *id* to another
123 lane *id* with which the lane interacts.
125 *mask* is a 5 character sequence which
126 specifies how to transform the bits of the
129 The following characters are allowed:
131 * "0" - set bit to 0.
133 * "1" - set bit to 1.
135 * "p" - preserve bit.
139 offset:swizzle(BROADCAST,{2..32},{0..N}) Specifies a broadcast mode.
141 Broadcasts the value of any particular lane to
142 all lanes in its group.
144 The first numeric parameter is a group
145 size and must be equal to 2, 4, 8, 16 or 32.
147 The second numeric parameter is an index of the
148 lane being broadcasted.
150 The index must not exceed group size.
151 offset:swizzle(SWAP,{1..16}) Specifies a swap mode.
153 Swaps the neighboring groups of
154 1, 2, 4, 8 or 16 lanes.
155 offset:swizzle(REVERSE,{2..32}) Specifies a reverse mode.
157 Reverses the lanes for groups of 2, 4, 8, 16 or 32 lanes.
158 ======================================================= ===========================================================
160 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
161 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
169 offset:swizzle(QUAD_PERM, 0, 1, 2, 3)
170 offset:swizzle(BITMASK_PERM, "01pi0")
171 offset:swizzle(BROADCAST, 2, 0)
172 offset:swizzle(SWAP, 8)
173 offset:swizzle(REVERSE, 30 + 2)
175 .. _amdgpu_synid_gds:
180 Specifies whether to use GDS or LDS memory (LDS is the default).
182 ======================================== ================================================
184 ======================================== ================================================
186 ======================================== ================================================
192 .. _amdgpu_synid_done:
197 Specifies if this is the last export from the shader to the target. By default,
198 *exp* instruction does not finish an export sequence.
200 ======================================== ================================================
202 ======================================== ================================================
203 done Indicates the last export operation.
204 ======================================== ================================================
206 .. _amdgpu_synid_compr:
211 Indicates if the data are compressed (data are not compressed by default).
213 ======================================== ================================================
215 ======================================== ================================================
216 compr Data are compressed.
217 ======================================== ================================================
224 Specifies valid mask flag state (off by default).
226 ======================================== ================================================
228 ======================================== ================================================
229 vm Set valid mask flag.
230 ======================================== ================================================
235 .. _amdgpu_synid_flat_offset12:
240 Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.
242 Cannot be used with *global/scratch* opcodes. GFX9 only.
244 ================= ====================================================================
246 ================= ====================================================================
247 offset:{0..4095} Specifies a 12-bit unsigned offset as a positive
248 :ref:`integer number <amdgpu_synid_integer_number>`
249 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
250 ================= ====================================================================
259 .. _amdgpu_synid_flat_offset13s:
264 Specifies an immediate signed 13-bit offset, in bytes. The default value is 0.
266 Can be used with *global/scratch* opcodes only. GFX9 only.
268 ===================== ====================================================================
270 ===================== ====================================================================
271 offset:{-4096..4095} Specifies a 13-bit signed offset as an
272 :ref:`integer number <amdgpu_synid_integer_number>`
273 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
274 ===================== ====================================================================
284 .. _amdgpu_synid_flat_offset12s:
289 Specifies an immediate signed 12-bit offset, in bytes. The default value is 0.
291 Can be used with *global/scratch* opcodes only.
295 ===================== ====================================================================
297 ===================== ====================================================================
298 offset:{-2048..2047} Specifies a 12-bit signed offset as an
299 :ref:`integer number <amdgpu_synid_integer_number>`
300 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
301 ===================== ====================================================================
311 .. _amdgpu_synid_flat_offset11:
316 Specifies an immediate unsigned 11-bit offset, in bytes. The default value is 0.
318 Cannot be used with *global/scratch* opcodes.
322 ================= ====================================================================
324 ================= ====================================================================
325 offset:{0..2047} Specifies an 11-bit unsigned offset as a positive
326 :ref:`integer number <amdgpu_synid_integer_number>`
327 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
328 ================= ====================================================================
340 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
345 See a description :ref:`here<amdgpu_synid_glc>`.
350 See a description :ref:`here<amdgpu_synid_lds>`. GFX10 only.
355 See a description :ref:`here<amdgpu_synid_slc>`.
360 See a description :ref:`here<amdgpu_synid_tfe>`.
365 See a description :ref:`here<amdgpu_synid_nv>`.
370 .. _amdgpu_synid_dmask:
375 Specifies which channels (image components) are used by the operation. By default, no channels
378 =============== ====================================================================
380 =============== ====================================================================
381 dmask:{0..15} Specifies image channels as a positive
382 :ref:`integer number <amdgpu_synid_integer_number>`
383 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
385 Each bit corresponds to one of 4 image components (RGBA).
387 If the specified bit value is 0, the component is not used,
388 value 1 means that the component is used.
389 =============== ====================================================================
391 This modifier has some limitations depending on instruction kind:
393 =================================================== ========================
394 Instruction Kind Valid dmask Values
395 =================================================== ========================
396 32-bit atomic *cmpswap* 0x3
397 32-bit atomic instructions except for *cmpswap* 0x1
398 64-bit atomic *cmpswap* 0xF
399 64-bit atomic instructions except for *cmpswap* 0x3
400 *gather4* 0x1, 0x2, 0x4, 0x8
401 Other instructions any value
402 =================================================== ========================
412 .. _amdgpu_synid_unorm:
417 Specifies whether the address is normalized or not (the address is normalized by default).
419 ======================== ========================================
421 ======================== ========================================
422 unorm Force the address to be unnormalized.
423 ======================== ========================================
428 See a description :ref:`here<amdgpu_synid_glc>`.
433 See a description :ref:`here<amdgpu_synid_slc>`.
435 .. _amdgpu_synid_r128:
440 Specifies texture resource size. The default size is 256 bits.
442 GFX7, GFX8 and GFX10 only.
444 =================== ================================================
446 =================== ================================================
447 r128 Specifies 128 bits texture resource size.
448 =================== ================================================
450 .. WARNING:: Using this modifier should decrease *rsrc* operand size from 8 to 4 dwords, but assembler does not currently support this feature.
455 See a description :ref:`here<amdgpu_synid_tfe>`.
457 .. _amdgpu_synid_lwe:
462 Specifies LOD warning status (LOD warning is disabled by default).
464 ======================================== ================================================
466 ======================================== ================================================
467 lwe Enables LOD warning.
468 ======================================== ================================================
475 Specifies if an array index must be sent to TA. By default, array index is not sent.
477 ======================================== ================================================
479 ======================================== ================================================
480 da Send an array-index to TA.
481 ======================================== ================================================
483 .. _amdgpu_synid_d16:
488 Specifies data size: 16 or 32 bits (32 bits by default). Not supported by GFX7.
490 ======================================== ================================================
492 ======================================== ================================================
493 d16 Enables 16-bits data mode.
495 On loads, convert data in memory to 16-bit
496 format before storing it in VGPRs.
498 For stores, convert 16-bit data in VGPRs to
499 32 bits before going to memory.
501 Note that GFX8.0 does not support data packing.
502 Each 16-bit data element occupies 1 VGPR.
504 GFX8.1, GFX9 and GFX10 support data packing.
505 Each pair of 16-bit data elements
507 ======================================== ================================================
509 .. _amdgpu_synid_a16:
514 Specifies size of image address components: 16 or 32 bits (32 bits by default).
517 ======================================== ================================================
519 ======================================== ================================================
520 a16 Enables 16-bits image address components.
521 ======================================== ================================================
523 .. _amdgpu_synid_dim:
528 Specifies surface dimension. This is a mandatory modifier. There is no default value.
532 =============================== =========================================================
534 =============================== =========================================================
535 dim:1D One-dimensional image.
536 dim:2D Two-dimensional image.
537 dim:3D Three-dimensional image.
538 dim:CUBE Cubemap array.
539 dim:1D_ARRAY One-dimensional image array.
540 dim:2D_ARRAY Two-dimensional image array.
541 dim:2D_MSAA Two-dimensional multi-sample auto-aliasing image.
542 dim:2D_MSAA_ARRAY Two-dimensional multi-sample auto-aliasing image array.
543 =============================== =========================================================
545 The following table defines an alternative syntax which is supported
546 for compatibility with SP3 assembler:
548 =============================== =========================================================
550 =============================== =========================================================
551 dim:SQ_RSRC_IMG_1D One-dimensional image.
552 dim:SQ_RSRC_IMG_2D Two-dimensional image.
553 dim:SQ_RSRC_IMG_3D Three-dimensional image.
554 dim:SQ_RSRC_IMG_CUBE Cubemap array.
555 dim:SQ_RSRC_IMG_1D_ARRAY One-dimensional image array.
556 dim:SQ_RSRC_IMG_2D_ARRAY Two-dimensional image array.
557 dim:SQ_RSRC_IMG_2D_MSAA Two-dimensional multi-sample auto-aliasing image.
558 dim:SQ_RSRC_IMG_2D_MSAA_ARRAY Two-dimensional multi-sample auto-aliasing image array.
559 =============================== =========================================================
564 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
566 Miscellaneous Modifiers
567 -----------------------
569 .. _amdgpu_synid_dlc:
574 Controls device level cache policy for memory operations. Used for synchronization.
575 When specified, forces operation to bypass device level cache making the operation device
576 level coherent. By default, instructions use device level cache.
580 ======================================== ================================================
582 ======================================== ================================================
583 dlc Bypass device level cache.
584 ======================================== ================================================
586 .. _amdgpu_synid_glc:
591 This modifier has different meaning for loads, stores, and atomic operations.
592 The default value is off (0).
594 See AMD documentation for details.
596 ======================================== ================================================
598 ======================================== ================================================
599 glc Set glc bit to 1.
600 ======================================== ================================================
602 .. _amdgpu_synid_lds:
607 Specifies where to store the result: VGPRs or LDS (VGPRs by default).
609 ======================================== ===========================
611 ======================================== ===========================
612 lds Store result in LDS.
613 ======================================== ===========================
620 Specifies if instruction is operating on non-volatile memory. By default, memory is volatile.
624 ======================================== ================================================
626 ======================================== ================================================
627 nv Indicates that instruction operates on
629 ======================================== ================================================
631 .. _amdgpu_synid_slc:
636 Specifies cache policy. The default value is off (0).
638 See AMD documentation for details.
640 ======================================== ================================================
642 ======================================== ================================================
643 slc Set slc bit to 1.
644 ======================================== ================================================
646 .. _amdgpu_synid_tfe:
651 Controls access to partially resident textures. The default value is off (0).
653 See AMD documentation for details.
655 ======================================== ================================================
657 ======================================== ================================================
658 tfe Set tfe bit to 1.
659 ======================================== ================================================
661 MUBUF/MTBUF Modifiers
662 ---------------------
664 .. _amdgpu_synid_idxen:
669 Specifies whether address components include an index. By default, no components are used.
671 Can be used together with :ref:`offen<amdgpu_synid_offen>`.
673 Cannot be used with :ref:`addr64<amdgpu_synid_addr64>`.
675 ======================================== ================================================
677 ======================================== ================================================
678 idxen Address components include an index.
679 ======================================== ================================================
681 .. _amdgpu_synid_offen:
686 Specifies whether address components include an offset. By default, no components are used.
688 Can be used together with :ref:`idxen<amdgpu_synid_idxen>`.
690 Cannot be used with :ref:`addr64<amdgpu_synid_addr64>`.
692 ======================================== ================================================
694 ======================================== ================================================
695 offen Address components include an offset.
696 ======================================== ================================================
698 .. _amdgpu_synid_addr64:
703 Specifies whether a 64-bit address is used. By default, no address is used.
705 GFX7 only. Cannot be used with :ref:`offen<amdgpu_synid_offen>` and
706 :ref:`idxen<amdgpu_synid_idxen>` modifiers.
708 ======================================== ================================================
710 ======================================== ================================================
711 addr64 A 64-bit address is used.
712 ======================================== ================================================
714 .. _amdgpu_synid_buf_offset12:
719 Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.
721 ================== ====================================================================
723 ================== ====================================================================
724 offset:{0..0xFFF} Specifies a 12-bit unsigned offset as a positive
725 :ref:`integer number <amdgpu_synid_integer_number>`
726 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
727 ================== ====================================================================
739 See a description :ref:`here<amdgpu_synid_glc>`.
744 See a description :ref:`here<amdgpu_synid_slc>`.
749 See a description :ref:`here<amdgpu_synid_lds>`.
754 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
759 See a description :ref:`here<amdgpu_synid_tfe>`.
761 .. _amdgpu_synid_fmt:
766 Specifies data and numeric formats used by the operation.
767 The default numeric format is BUF_NUM_FORMAT_UNORM.
768 The default data format is BUF_DATA_FORMAT_8.
770 ========================================= ===============================================================
772 ========================================= ===============================================================
773 format:{0..127} Use format specified as either an
774 :ref:`integer number<amdgpu_synid_integer_number>` or an
775 :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
776 format:[<data format>] Use the specified data format and
777 default numeric format.
778 format:[<numeric format>] Use the specified numeric format and
780 format:[<data format>, <numeric format>] Use the specified data and numeric formats.
781 format:[<numeric format>, <data format>] Use the specified data and numeric formats.
782 ========================================= ===============================================================
784 .. _amdgpu_synid_format_data:
786 Supported data formats are defined in the following table:
788 ========================================= ===============================
790 ========================================= ===============================
791 BUF_DATA_FORMAT_INVALID
792 BUF_DATA_FORMAT_8 Default value.
796 BUF_DATA_FORMAT_16_16
797 BUF_DATA_FORMAT_10_11_11
798 BUF_DATA_FORMAT_11_11_10
799 BUF_DATA_FORMAT_10_10_10_2
800 BUF_DATA_FORMAT_2_10_10_10
801 BUF_DATA_FORMAT_8_8_8_8
802 BUF_DATA_FORMAT_32_32
803 BUF_DATA_FORMAT_16_16_16_16
804 BUF_DATA_FORMAT_32_32_32
805 BUF_DATA_FORMAT_32_32_32_32
806 BUF_DATA_FORMAT_RESERVED_15
807 ========================================= ===============================
809 .. _amdgpu_synid_format_num:
811 Supported numeric formats are defined below:
813 ========================================= ===============================
815 ========================================= ===============================
816 BUF_NUM_FORMAT_UNORM Default value.
818 BUF_NUM_FORMAT_USCALED
819 BUF_NUM_FORMAT_SSCALED
822 BUF_NUM_FORMAT_SNORM_OGL GFX7 only.
823 BUF_NUM_FORMAT_RESERVED_6 GFX8 and GFX9 only.
825 ========================================= ===============================
833 format:[BUF_DATA_FORMAT_16]
834 format:[BUF_DATA_FORMAT_16,BUF_NUM_FORMAT_SSCALED]
835 format:[BUF_NUM_FORMAT_FLOAT]
837 .. _amdgpu_synid_ufmt:
842 Specifies a unified format used by the operation.
843 The default format is BUF_FMT_8_UNORM.
846 ========================================= ===============================================================
848 ========================================= ===============================================================
849 format:{0..127} Use unified format specified as either an
850 :ref:`integer number<amdgpu_synid_integer_number>` or an
851 :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
852 Note that unified format numbers are not compatible with
853 format numbers used for pre-GFX10 ISA.
854 format:[<unified format>] Use the specified unified format.
855 ========================================= ===============================================================
857 Unified format is a replacement for :ref:`data<amdgpu_synid_format_data>`
858 and :ref:`numeric<amdgpu_synid_format_num>` formats. For compatibility with older ISA,
859 :ref:`syntax with data and numeric formats<amdgpu_synid_fmt>` is still accepted
860 provided that the combination of formats can be mapped to a unified format.
862 Supported unified formats and equivalent combinations of data and numeric formats
865 ============================== ============================== =============================
866 Syntax Equivalent Data Format Equivalent Numeric Format
867 ============================== ============================== =============================
868 BUF_FMT_INVALID BUF_DATA_FORMAT_INVALID BUF_NUM_FORMAT_UNORM
870 BUF_FMT_8_UNORM BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_UNORM
871 BUF_FMT_8_SNORM BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_SNORM
872 BUF_FMT_8_USCALED BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_USCALED
873 BUF_FMT_8_SSCALED BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_SSCALED
874 BUF_FMT_8_UINT BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_UINT
875 BUF_FMT_8_SINT BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_SINT
877 BUF_FMT_16_UNORM BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_UNORM
878 BUF_FMT_16_SNORM BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_SNORM
879 BUF_FMT_16_USCALED BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_USCALED
880 BUF_FMT_16_SSCALED BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_SSCALED
881 BUF_FMT_16_UINT BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_UINT
882 BUF_FMT_16_SINT BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_SINT
883 BUF_FMT_16_FLOAT BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_FLOAT
885 BUF_FMT_8_8_UNORM BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_UNORM
886 BUF_FMT_8_8_SNORM BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_SNORM
887 BUF_FMT_8_8_USCALED BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_USCALED
888 BUF_FMT_8_8_SSCALED BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_SSCALED
889 BUF_FMT_8_8_UINT BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_UINT
890 BUF_FMT_8_8_SINT BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_SINT
892 BUF_FMT_32_UINT BUF_DATA_FORMAT_32 BUF_NUM_FORMAT_UINT
893 BUF_FMT_32_SINT BUF_DATA_FORMAT_32 BUF_NUM_FORMAT_SINT
894 BUF_FMT_32_FLOAT BUF_DATA_FORMAT_32 BUF_NUM_FORMAT_FLOAT
896 BUF_FMT_16_16_UNORM BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_UNORM
897 BUF_FMT_16_16_SNORM BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_SNORM
898 BUF_FMT_16_16_USCALED BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_USCALED
899 BUF_FMT_16_16_SSCALED BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_SSCALED
900 BUF_FMT_16_16_UINT BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_UINT
901 BUF_FMT_16_16_SINT BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_SINT
902 BUF_FMT_16_16_FLOAT BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_FLOAT
904 BUF_FMT_10_11_11_UNORM BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_UNORM
905 BUF_FMT_10_11_11_SNORM BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_SNORM
906 BUF_FMT_10_11_11_USCALED BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_USCALED
907 BUF_FMT_10_11_11_SSCALED BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_SSCALED
908 BUF_FMT_10_11_11_UINT BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_UINT
909 BUF_FMT_10_11_11_SINT BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_SINT
910 BUF_FMT_10_11_11_FLOAT BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_FLOAT
912 BUF_FMT_11_11_10_UNORM BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_UNORM
913 BUF_FMT_11_11_10_SNORM BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_SNORM
914 BUF_FMT_11_11_10_USCALED BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_USCALED
915 BUF_FMT_11_11_10_SSCALED BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_SSCALED
916 BUF_FMT_11_11_10_UINT BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_UINT
917 BUF_FMT_11_11_10_SINT BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_SINT
918 BUF_FMT_11_11_10_FLOAT BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_FLOAT
920 BUF_FMT_10_10_10_2_UNORM BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_UNORM
921 BUF_FMT_10_10_10_2_SNORM BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_SNORM
922 BUF_FMT_10_10_10_2_USCALED BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_USCALED
923 BUF_FMT_10_10_10_2_SSCALED BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_SSCALED
924 BUF_FMT_10_10_10_2_UINT BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_UINT
925 BUF_FMT_10_10_10_2_SINT BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_SINT
927 BUF_FMT_2_10_10_10_UNORM BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_UNORM
928 BUF_FMT_2_10_10_10_SNORM BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_SNORM
929 BUF_FMT_2_10_10_10_USCALED BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_USCALED
930 BUF_FMT_2_10_10_10_SSCALED BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_SSCALED
931 BUF_FMT_2_10_10_10_UINT BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_UINT
932 BUF_FMT_2_10_10_10_SINT BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_SINT
934 BUF_FMT_8_8_8_8_UNORM BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_UNORM
935 BUF_FMT_8_8_8_8_SNORM BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_SNORM
936 BUF_FMT_8_8_8_8_USCALED BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_USCALED
937 BUF_FMT_8_8_8_8_SSCALED BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_SSCALED
938 BUF_FMT_8_8_8_8_UINT BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_UINT
939 BUF_FMT_8_8_8_8_SINT BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_SINT
941 BUF_FMT_32_32_UINT BUF_DATA_FORMAT_32_32 BUF_NUM_FORMAT_UINT
942 BUF_FMT_32_32_SINT BUF_DATA_FORMAT_32_32 BUF_NUM_FORMAT_SINT
943 BUF_FMT_32_32_FLOAT BUF_DATA_FORMAT_32_32 BUF_NUM_FORMAT_FLOAT
945 BUF_FMT_16_16_16_16_UNORM BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_UNORM
946 BUF_FMT_16_16_16_16_SNORM BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_SNORM
947 BUF_FMT_16_16_16_16_USCALED BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_USCALED
948 BUF_FMT_16_16_16_16_SSCALED BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_SSCALED
949 BUF_FMT_16_16_16_16_UINT BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_UINT
950 BUF_FMT_16_16_16_16_SINT BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_SINT
951 BUF_FMT_16_16_16_16_FLOAT BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_FLOAT
953 BUF_FMT_32_32_32_UINT BUF_DATA_FORMAT_32_32_32 BUF_NUM_FORMAT_UINT
954 BUF_FMT_32_32_32_SINT BUF_DATA_FORMAT_32_32_32 BUF_NUM_FORMAT_SINT
955 BUF_FMT_32_32_32_FLOAT BUF_DATA_FORMAT_32_32_32 BUF_NUM_FORMAT_FLOAT
956 BUF_FMT_32_32_32_32_UINT BUF_DATA_FORMAT_32_32_32_32 BUF_NUM_FORMAT_UINT
957 BUF_FMT_32_32_32_32_SINT BUF_DATA_FORMAT_32_32_32_32 BUF_NUM_FORMAT_SINT
958 BUF_FMT_32_32_32_32_FLOAT BUF_DATA_FORMAT_32_32_32_32 BUF_NUM_FORMAT_FLOAT
959 ============================== ============================== =============================
966 format:[BUF_FMT_32_UINT]
974 See a description :ref:`here<amdgpu_synid_glc>`.
979 See a description :ref:`here<amdgpu_synid_nv>`. GFX9 only.
984 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
989 .. _amdgpu_synid_high:
994 Specifies which half of the LDS word to use. Low half of LDS word is used by default.
997 ======================================== ================================
999 ======================================== ================================
1000 high Use high half of LDS word.
1001 ======================================== ================================
1008 .. _amdgpu_synid_dpp8_sel:
1013 Selects which lanes to pull data from, within a group of 8 lanes. This is a mandatory modifier.
1014 There is no default value.
1018 The *dpp8_sel* modifier must specify exactly 8 values.
1019 First value selects which lane to read from to supply data into lane 0.
1020 Second value controls lane 1 and so on.
1022 Each value may be specified as either
1023 an :ref:`integer number<amdgpu_synid_integer_number>` or
1024 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1026 =============================================================== ===========================
1028 =============================================================== ===========================
1029 dpp8:[{0..7},{0..7},{0..7},{0..7},{0..7},{0..7},{0..7},{0..7}] Select lanes to read from.
1030 =============================================================== ===========================
1036 dpp8:[7,6,5,4,3,2,1,0]
1037 dpp8:[0,1,0,1,0,1,0,1]
1039 .. _amdgpu_synid_fi8:
1044 Controls interaction with inactive lanes for *dpp8* instructions. The default value is zero.
1046 Note: *inactive* lanes are those whose :ref:`exec<amdgpu_synid_exec>` mask bit is zero.
1050 ==================================== =====================================================
1052 ==================================== =====================================================
1053 fi:0 Fetch zero when accessing data from inactive lanes.
1054 fi:1 Fetch pre-exist values from inactive lanes.
1055 ==================================== =====================================================
1057 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
1058 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1063 GFX8, GFX9 and GFX10 only.
1065 .. _amdgpu_synid_dpp_ctrl:
1070 Specifies how data are shared between threads. This is a mandatory modifier.
1071 There is no default value.
1073 GFX8 and GFX9 only. Use :ref:`dpp16_ctrl<amdgpu_synid_dpp16_ctrl>` for GFX10.
1075 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1077 ======================================== ================================================
1079 ======================================== ================================================
1080 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
1081 row_mirror Mirror threads within row.
1082 row_half_mirror Mirror threads within 1/2 row (8 threads).
1083 row_bcast:15 Broadcast 15th thread of each row to next row.
1084 row_bcast:31 Broadcast thread 31 to rows 2 and 3.
1085 wave_shl:1 Wavefront left shift by 1 thread.
1086 wave_rol:1 Wavefront left rotate by 1 thread.
1087 wave_shr:1 Wavefront right shift by 1 thread.
1088 wave_ror:1 Wavefront right rotate by 1 thread.
1089 row_shl:{1..15} Row shift left by 1-15 threads.
1090 row_shr:{1..15} Row shift right by 1-15 threads.
1091 row_ror:{1..15} Row rotate right by 1-15 threads.
1092 ======================================== ================================================
1094 Note: numeric values may be specified as either
1095 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1096 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1102 quad_perm:[0, 1, 2, 3]
1105 .. _amdgpu_synid_dpp16_ctrl:
1110 Specifies how data are shared between threads. This is a mandatory modifier.
1111 There is no default value.
1113 GFX10 only. Use :ref:`dpp_ctrl<amdgpu_synid_dpp_ctrl>` for GFX8 and GFX9.
1115 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1116 (There are only two rows in *wave32* mode.)
1118 ======================================== ====================================================
1120 ======================================== ====================================================
1121 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
1122 row_mirror Mirror threads within row.
1123 row_half_mirror Mirror threads within 1/2 row (8 threads).
1124 row_share:{0..15} Share the value from the specified lane with other
1126 row_xmask:{0..15} Fetch from XOR(current lane id, specified lane id).
1127 row_shl:{1..15} Row shift left by 1-15 threads.
1128 row_shr:{1..15} Row shift right by 1-15 threads.
1129 row_ror:{1..15} Row rotate right by 1-15 threads.
1130 ======================================== ====================================================
1132 Note: numeric values may be specified as either
1133 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1134 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1140 quad_perm:[0, 1, 2, 3]
1143 .. _amdgpu_synid_dpp32_ctrl:
1148 Specifies how data are shared between threads. This is a mandatory modifier.
1149 There is no default value.
1151 May be used only with GFX90A 32-bit instructions.
1153 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1155 ======================================== ==================================================
1157 ======================================== ==================================================
1158 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
1159 row_mirror Mirror threads within row.
1160 row_half_mirror Mirror threads within 1/2 row (8 threads).
1161 row_bcast:15 Broadcast 15th thread of each row to next row.
1162 row_bcast:31 Broadcast thread 31 to rows 2 and 3.
1163 wave_shl:1 Wavefront left shift by 1 thread.
1164 wave_rol:1 Wavefront left rotate by 1 thread.
1165 wave_shr:1 Wavefront right shift by 1 thread.
1166 wave_ror:1 Wavefront right rotate by 1 thread.
1167 row_shl:{1..15} Row shift left by 1-15 threads.
1168 row_shr:{1..15} Row shift right by 1-15 threads.
1169 row_ror:{1..15} Row rotate right by 1-15 threads.
1170 row_newbcast:{1..15} Broadcast a thread within a row to the whole row.
1171 ======================================== ==================================================
1173 Note: numeric values may be specified as either
1174 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1175 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1181 quad_perm:[0, 1, 2, 3]
1185 .. _amdgpu_synid_dpp64_ctrl:
1190 Specifies how data are shared between threads. This is a mandatory modifier.
1191 There is no default value.
1193 May be used only with GFX90A 64-bit instructions.
1195 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1197 ======================================== ==================================================
1199 ======================================== ==================================================
1200 row_newbcast:{1..15} Broadcast a thread within a row to the whole row.
1201 ======================================== ==================================================
1203 Note: numeric values may be specified as either
1204 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1205 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1214 .. _amdgpu_synid_row_mask:
1219 Controls which rows are enabled for data sharing. By default, all rows are enabled.
1221 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1222 (There are only two rows in *wave32* mode.)
1224 ================= ====================================================================
1226 ================= ====================================================================
1227 row_mask:{0..15} Specifies a *row mask* as a positive
1228 :ref:`integer number <amdgpu_synid_integer_number>`
1229 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1231 Each of 4 bits in the mask controls one row
1232 (0 - disabled, 1 - enabled).
1234 In *wave32* mode the values should be limited to 0..7.
1235 ================= ====================================================================
1245 .. _amdgpu_synid_bank_mask:
1250 Controls which banks are enabled for data sharing. By default, all banks are enabled.
1252 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1253 (There are only two rows in *wave32* mode.)
1255 ================== ====================================================================
1257 ================== ====================================================================
1258 bank_mask:{0..15} Specifies a *bank mask* as a positive
1259 :ref:`integer number <amdgpu_synid_integer_number>`
1260 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1262 Each of 4 bits in the mask controls one bank
1263 (0 - disabled, 1 - enabled).
1264 ================== ====================================================================
1274 .. _amdgpu_synid_bound_ctrl:
1279 Controls data sharing when accessing an invalid lane. By default, data sharing with
1280 invalid lanes is disabled.
1282 ======================================== ================================================
1284 ======================================== ================================================
1285 bound_ctrl:1 Enables data sharing with invalid lanes.
1287 Accessing data from an invalid lane will
1289 ======================================== ================================================
1291 .. _amdgpu_synid_fi16:
1296 Controls interaction with *inactive* lanes for *dpp16* instructions. The default value is zero.
1298 Note: *inactive* lanes are those whose :ref:`exec<amdgpu_synid_exec>` mask bit is zero.
1302 ======================================== ==================================================
1304 ======================================== ==================================================
1305 fi:0 Interaction with inactive lanes is controlled by
1306 :ref:`bound_ctrl<amdgpu_synid_bound_ctrl>`.
1308 fi:1 Fetch pre-exist values from inactive lanes.
1309 ======================================== ==================================================
1311 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
1312 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1317 GFX8, GFX9 and GFX10 only.
1322 See a description :ref:`here<amdgpu_synid_clamp>`.
1327 See a description :ref:`here<amdgpu_synid_omod>`.
1329 GFX9 and GFX10 only.
1331 .. _amdgpu_synid_dst_sel:
1336 Selects which bits in the destination are affected. By default, all bits are affected.
1338 ======================================== ================================================
1340 ======================================== ================================================
1341 dst_sel:DWORD Use bits 31:0.
1342 dst_sel:BYTE_0 Use bits 7:0.
1343 dst_sel:BYTE_1 Use bits 15:8.
1344 dst_sel:BYTE_2 Use bits 23:16.
1345 dst_sel:BYTE_3 Use bits 31:24.
1346 dst_sel:WORD_0 Use bits 15:0.
1347 dst_sel:WORD_1 Use bits 31:16.
1348 ======================================== ================================================
1350 .. _amdgpu_synid_dst_unused:
1355 Controls what to do with the bits in the destination which are not selected
1356 by :ref:`dst_sel<amdgpu_synid_dst_sel>`.
1357 By default, unused bits are preserved.
1359 ======================================== ================================================
1361 ======================================== ================================================
1362 dst_unused:UNUSED_PAD Pad with zeros.
1363 dst_unused:UNUSED_SEXT Sign-extend upper bits, zero lower bits.
1364 dst_unused:UNUSED_PRESERVE Preserve bits.
1365 ======================================== ================================================
1367 .. _amdgpu_synid_src0_sel:
1372 Controls which bits in the src0 are used. By default, all bits are used.
1374 ======================================== ================================================
1376 ======================================== ================================================
1377 src0_sel:DWORD Use bits 31:0.
1378 src0_sel:BYTE_0 Use bits 7:0.
1379 src0_sel:BYTE_1 Use bits 15:8.
1380 src0_sel:BYTE_2 Use bits 23:16.
1381 src0_sel:BYTE_3 Use bits 31:24.
1382 src0_sel:WORD_0 Use bits 15:0.
1383 src0_sel:WORD_1 Use bits 31:16.
1384 ======================================== ================================================
1386 .. _amdgpu_synid_src1_sel:
1391 Controls which bits in the src1 are used. By default, all bits are used.
1393 ======================================== ================================================
1395 ======================================== ================================================
1396 src1_sel:DWORD Use bits 31:0.
1397 src1_sel:BYTE_0 Use bits 7:0.
1398 src1_sel:BYTE_1 Use bits 15:8.
1399 src1_sel:BYTE_2 Use bits 23:16.
1400 src1_sel:BYTE_3 Use bits 31:24.
1401 src1_sel:WORD_0 Use bits 15:0.
1402 src1_sel:WORD_1 Use bits 31:16.
1403 ======================================== ================================================
1405 .. _amdgpu_synid_sdwa_operand_modifiers:
1407 SDWA Operand Modifiers
1408 ----------------------
1410 Operand modifiers are not used separately. They are applied to source operands.
1412 GFX8, GFX9 and GFX10 only.
1417 See a description :ref:`here<amdgpu_synid_abs>`.
1422 See a description :ref:`here<amdgpu_synid_neg>`.
1424 .. _amdgpu_synid_sext:
1429 Sign-extends value of a (sub-dword) operand to fill all 32 bits.
1430 Has no effect for 32-bit operands.
1432 Valid for integer operands only.
1434 ======================================== ================================================
1436 ======================================== ================================================
1437 sext(<operand>) Sign-extend operand value.
1438 ======================================== ================================================
1450 .. _amdgpu_synid_vop3_op_sel:
1455 Selects the low [15:0] or high [31:16] operand bits for source and destination operands.
1456 By default, low bits are used for all operands.
1458 The number of values specified with the op_sel modifier must match the number of instruction
1459 operands (both source and destination). First value controls src0, second value controls src1
1460 and so on, except that the last value controls destination.
1461 The value 0 selects the low bits, while 1 selects the high bits.
1463 Note: op_sel modifier affects 16-bit operands only. For 32-bit operands the value specified
1464 by op_sel must be 0.
1466 GFX9 and GFX10 only.
1468 ======================================== ============================================================
1470 ======================================== ============================================================
1471 op_sel:[{0..1},{0..1}] Select operand bits for instructions with 1 source operand.
1472 op_sel:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1473 op_sel:[{0..1},{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1474 ======================================== ============================================================
1476 Note: numeric values may be specified as either
1477 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1478 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1487 .. _amdgpu_synid_dpp_op_sel:
1492 Special version of *op_sel* used for *permlane* opcodes to specify
1493 dpp-like mode bits - :ref:`fi<amdgpu_synid_fi16>` and
1494 :ref:`bound_ctrl<amdgpu_synid_bound_ctrl>`.
1498 ======================================== ============================================================
1500 ======================================== ============================================================
1501 op_sel:[{0..1},{0..1}] First bit specifies :ref:`fi<amdgpu_synid_fi16>`, second
1502 bit specifies :ref:`bound_ctrl<amdgpu_synid_bound_ctrl>`.
1503 ======================================== ============================================================
1505 Note: numeric values may be specified as either
1506 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1507 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1515 .. _amdgpu_synid_clamp:
1520 Clamp meaning depends on instruction.
1522 For *v_cmp* instructions, clamp modifier indicates that the compare signals
1523 if a floating point exception occurs. By default, signaling is disabled.
1524 Not supported by GFX7.
1526 For integer operations, clamp modifier indicates that the result must be clamped
1527 to the largest and smallest representable value. By default, there is no clamping.
1528 Integer clamping is not supported by GFX7.
1530 For floating point operations, clamp modifier indicates that the result must be clamped
1531 to the range [0.0, 1.0]. By default, there is no clamping.
1533 Note: clamp modifier is applied after :ref:`output modifiers<amdgpu_synid_omod>` (if any).
1535 ======================================== ================================================
1537 ======================================== ================================================
1538 clamp Enables clamping (or signaling).
1539 ======================================== ================================================
1541 .. _amdgpu_synid_omod:
1546 Specifies if an output modifier must be applied to the result.
1547 By default, no output modifiers are applied.
1549 Note: output modifiers are applied before :ref:`clamping<amdgpu_synid_clamp>` (if any).
1551 Output modifiers are valid for f32 and f64 floating point results only.
1552 They must not be used with f16.
1554 Note: *v_cvt_f16_f32* is an exception. This instruction produces f16 result
1555 but accepts output modifiers.
1557 ======================================== ================================================
1559 ======================================== ================================================
1560 mul:2 Multiply the result by 2.
1561 mul:4 Multiply the result by 4.
1562 div:2 Multiply the result by 0.5.
1563 ======================================== ================================================
1565 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
1566 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1573 mul:x // x must be equal to 2 or 4
1575 .. _amdgpu_synid_vop3_operand_modifiers:
1577 VOP3 Operand Modifiers
1578 ----------------------
1580 Operand modifiers are not used separately. They are applied to source operands.
1582 .. _amdgpu_synid_abs:
1587 Computes the absolute value of its operand. Must be applied before :ref:`neg<amdgpu_synid_neg>`
1588 (if any). Valid for floating point operands only.
1590 ======================================== ====================================================
1592 ======================================== ====================================================
1593 abs(<operand>) Get the absolute value of a floating-point operand.
1594 \|<operand>| The same as above (an SP3 syntax).
1595 ======================================== ====================================================
1597 Note: avoid using SP3 syntax with operands specified as expressions because the trailing '|'
1598 may be misinterpreted. Such operands should be enclosed into additional parentheses as shown
1608 \|(x|y)| // additional parentheses are required
1610 .. _amdgpu_synid_neg:
1615 Computes the negative value of its operand. Must be applied after :ref:`abs<amdgpu_synid_abs>`
1616 (if any). Valid for floating point operands only.
1618 ================== ====================================================
1620 ================== ====================================================
1621 neg(<operand>) Get the negative value of a floating-point operand.
1622 The operand may include an optional
1623 :ref:`abs<amdgpu_synid_abs>` modifier.
1624 -<operand> The same as above (an SP3 syntax).
1625 ================== ====================================================
1627 Note: SP3 syntax is supported with limitations because of a potential ambiguity.
1628 Currently it is allowed in the following cases:
1630 * Before a register.
1631 * Before an :ref:`abs<amdgpu_synid_abs>` modifier.
1632 * Before an SP3 :ref:`abs<amdgpu_synid_abs>` modifier.
1634 In all other cases "-" is handled as a part of an expression that follows the sign.
1640 // Operands with negate modifiers
1648 // Operands without negate modifiers
1655 This section describes modifiers of *regular* VOP3P instructions.
1657 *v_mad_mix\** and *v_fma_mix\**
1658 instructions use these modifiers :ref:`in a special manner<amdgpu_synid_mad_mix>`.
1660 GFX9 and GFX10 only.
1662 .. _amdgpu_synid_op_sel:
1667 Selects the low [15:0] or high [31:16] operand bits as input to the operation
1668 which results in the lower-half of the destination.
1669 By default, low bits are used for all operands.
1671 The number of values specified by the *op_sel* modifier must match the number of source
1672 operands. First value controls src0, second value controls src1 and so on.
1674 The value 0 selects the low bits, while 1 selects the high bits.
1676 ================================= =============================================================
1678 ================================= =============================================================
1679 op_sel:[{0..1}] Select operand bits for instructions with 1 source operand.
1680 op_sel:[{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1681 op_sel:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1682 ================================= =============================================================
1684 Note: numeric values may be specified as either
1685 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1686 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1695 .. _amdgpu_synid_op_sel_hi:
1700 Selects the low [15:0] or high [31:16] operand bits as input to the operation
1701 which results in the upper-half of the destination.
1702 By default, high bits are used for all operands.
1704 The number of values specified by the *op_sel_hi* modifier must match the number of source
1705 operands. First value controls src0, second value controls src1 and so on.
1707 The value 0 selects the low bits, while 1 selects the high bits.
1709 =================================== =============================================================
1711 =================================== =============================================================
1712 op_sel_hi:[{0..1}] Select operand bits for instructions with 1 source operand.
1713 op_sel_hi:[{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1714 op_sel_hi:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1715 =================================== =============================================================
1717 Note: numeric values may be specified as either
1718 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1719 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1728 .. _amdgpu_synid_neg_lo:
1733 Specifies whether to change sign of operand values selected by
1734 :ref:`op_sel<amdgpu_synid_op_sel>`. These values are then used
1735 as input to the operation which results in the upper-half of the destination.
1737 The number of values specified by this modifier must match the number of source
1738 operands. First value controls src0, second value controls src1 and so on.
1740 The value 0 indicates that the corresponding operand value is used unmodified,
1741 the value 1 indicates that negative value of the operand must be used.
1743 By default, operand values are used unmodified.
1745 This modifier is valid for floating point operands only.
1747 ================================ ==================================================================
1749 ================================ ==================================================================
1750 neg_lo:[{0..1}] Select affected operands for instructions with 1 source operand.
1751 neg_lo:[{0..1},{0..1}] Select affected operands for instructions with 2 source operands.
1752 neg_lo:[{0..1},{0..1},{0..1}] Select affected operands for instructions with 3 source operands.
1753 ================================ ==================================================================
1755 Note: numeric values may be specified as either
1756 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1757 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1766 .. _amdgpu_synid_neg_hi:
1771 Specifies whether to change sign of operand values selected by
1772 :ref:`op_sel_hi<amdgpu_synid_op_sel_hi>`. These values are then used
1773 as input to the operation which results in the upper-half of the destination.
1775 The number of values specified by this modifier must match the number of source
1776 operands. First value controls src0, second value controls src1 and so on.
1778 The value 0 indicates that the corresponding operand value is used unmodified,
1779 the value 1 indicates that negative value of the operand must be used.
1781 By default, operand values are used unmodified.
1783 This modifier is valid for floating point operands only.
1785 =============================== ==================================================================
1787 =============================== ==================================================================
1788 neg_hi:[{0..1}] Select affected operands for instructions with 1 source operand.
1789 neg_hi:[{0..1},{0..1}] Select affected operands for instructions with 2 source operands.
1790 neg_hi:[{0..1},{0..1},{0..1}] Select affected operands for instructions with 3 source operands.
1791 =============================== ==================================================================
1793 Note: numeric values may be specified as either
1794 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1795 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1807 See a description :ref:`here<amdgpu_synid_clamp>`.
1809 .. _amdgpu_synid_mad_mix:
1811 VOP3P MAD_MIX/FMA_MIX Modifiers
1812 -------------------------------
1814 *v_mad_mix\** and *v_fma_mix\**
1815 instructions use *op_sel* and *op_sel_hi* modifiers
1816 in a manner different from *regular* VOP3P instructions.
1818 See a description below.
1820 GFX9 and GFX10 only.
1822 .. _amdgpu_synid_mad_mix_op_sel:
1827 This operand has meaning only for 16-bit source operands as indicated by
1828 :ref:`m_op_sel_hi<amdgpu_synid_mad_mix_op_sel_hi>`.
1829 It specifies to select either the low [15:0] or high [31:16] operand bits
1830 as input to the operation.
1832 The number of values specified by the *op_sel* modifier must match the number of source
1833 operands. First value controls src0, second value controls src1 and so on.
1835 The value 0 indicates the low bits, the value 1 indicates the high 16 bits.
1837 By default, low bits are used for all operands.
1839 =============================== ================================================
1841 =============================== ================================================
1842 op_sel:[{0..1},{0..1},{0..1}] Select location of each 16-bit source operand.
1843 =============================== ================================================
1845 Note: numeric values may be specified as either
1846 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1847 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1855 .. _amdgpu_synid_mad_mix_op_sel_hi:
1860 Selects the size of source operands: either 32 bits or 16 bits.
1861 By default, 32 bits are used for all source operands.
1863 The number of values specified by the *op_sel_hi* modifier must match the number of source
1864 operands. First value controls src0, second value controls src1 and so on.
1866 The value 0 indicates 32 bits, the value 1 indicates 16 bits.
1868 The location of 16 bits in the operand may be specified by
1869 :ref:`m_op_sel<amdgpu_synid_mad_mix_op_sel>`.
1871 ======================================== ====================================
1873 ======================================== ====================================
1874 op_sel_hi:[{0..1},{0..1},{0..1}] Select size of each source operand.
1875 ======================================== ====================================
1877 Note: numeric values may be specified as either
1878 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1879 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1890 See a description :ref:`here<amdgpu_synid_abs>`.
1895 See a description :ref:`here<amdgpu_synid_neg>`.
1900 See a description :ref:`here<amdgpu_synid_clamp>`.
1902 VOP3P MFMA Modifiers
1903 --------------------
1905 These modifiers may only be used with GFX908 and GFX90A.
1907 .. _amdgpu_synid_cbsz:
1912 Specifies a broadcast mode.
1914 =============================== ==================================================================
1916 =============================== ==================================================================
1917 cbsz:[{0..7}] A broadcast mode.
1918 =============================== ==================================================================
1920 Note: numeric value may be specified as either
1921 an :ref:`integer number<amdgpu_synid_integer_number>` or
1922 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1924 .. _amdgpu_synid_abid:
1929 Specifies matrix A group select.
1931 =============================== ==================================================================
1933 =============================== ==================================================================
1934 abid:[{0..15}] Matrix A group select id.
1935 =============================== ==================================================================
1937 Note: numeric value may be specified as either
1938 an :ref:`integer number<amdgpu_synid_integer_number>` or
1939 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1941 .. _amdgpu_synid_blgp:
1946 Specifies matrix B lane group pattern.
1948 =============================== ==================================================================
1950 =============================== ==================================================================
1951 blgp:[{0..7}] Matrix B lane group pattern.
1952 =============================== ==================================================================
1954 Note: numeric value may be specified as either
1955 an :ref:`integer number<amdgpu_synid_integer_number>` or
1956 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.