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_offset8:
33 Specifies an immediate unsigned 8-bit offset, in bytes. The default value is 0.
35 Used with DS instructions which have 2 addresses.
37 =================== ====================================================================
39 =================== ====================================================================
40 offset:{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_offset16:
58 Specifies an immediate unsigned 16-bit offset, in bytes. The default value is 0.
60 Used with DS instructions which have 1 address.
62 ==================== ====================================================================
64 ==================== ====================================================================
65 offset:{0..0xFFFF} Specifies an unsigned 16-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_sw_offset16:
83 This is a special modifier which may be used with *ds_swizzle_b32* instruction only.
84 It specifies a swizzle pattern in numeric or symbolic form. The default value is 0.
86 See AMD documentation for more information.
88 ======================================================= ===========================================================
90 ======================================================= ===========================================================
91 offset:{0..0xFFFF} Specifies a 16-bit swizzle pattern.
92 offset:swizzle(QUAD_PERM,{0..3},{0..3},{0..3},{0..3}) Specifies a quad permute mode pattern
94 Each number is a lane *id*.
95 offset:swizzle(BITMASK_PERM, "<mask>") Specifies a bitmask permute mode pattern.
97 The pattern converts a 5-bit lane *id* to another
98 lane *id* with which the lane interacts.
100 *mask* is a 5 character sequence which
101 specifies how to transform the bits of the
104 The following characters are allowed:
106 * "0" - set bit to 0.
108 * "1" - set bit to 1.
110 * "p" - preserve bit.
114 offset:swizzle(BROADCAST,{2..32},{0..N}) Specifies a broadcast mode.
116 Broadcasts the value of any particular lane to
117 all lanes in its group.
119 The first numeric parameter is a group
120 size and must be equal to 2, 4, 8, 16 or 32.
122 The second numeric parameter is an index of the
123 lane being broadcasted.
125 The index must not exceed group size.
126 offset:swizzle(SWAP,{1..16}) Specifies a swap mode.
128 Swaps the neighboring groups of
129 1, 2, 4, 8 or 16 lanes.
130 offset:swizzle(REVERSE,{2..32}) Specifies a reverse mode.
132 Reverses the lanes for groups of 2, 4, 8, 16 or 32 lanes.
133 ======================================================= ===========================================================
135 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
136 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
144 offset:swizzle(QUAD_PERM, 0, 1, 2, 3)
145 offset:swizzle(BITMASK_PERM, "01pi0")
146 offset:swizzle(BROADCAST, 2, 0)
147 offset:swizzle(SWAP, 8)
148 offset:swizzle(REVERSE, 30 + 2)
150 .. _amdgpu_synid_gds:
155 Specifies whether to use GDS or LDS memory (LDS is the default).
157 ======================================== ================================================
159 ======================================== ================================================
161 ======================================== ================================================
167 .. _amdgpu_synid_done:
172 Specifies if this is the last export from the shader to the target. By default,
173 *exp* instruction does not finish an export sequence.
175 ======================================== ================================================
177 ======================================== ================================================
178 done Indicates the last export operation.
179 ======================================== ================================================
181 .. _amdgpu_synid_compr:
186 Indicates if the data are compressed (data are not compressed by default).
188 ======================================== ================================================
190 ======================================== ================================================
191 compr Data are compressed.
192 ======================================== ================================================
199 Specifies valid mask flag state (off by default).
201 ======================================== ================================================
203 ======================================== ================================================
204 vm Set valid mask flag.
205 ======================================== ================================================
210 .. _amdgpu_synid_flat_offset12:
215 Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.
217 Cannot be used with *global/scratch* opcodes. GFX9 only.
219 ================= ====================================================================
221 ================= ====================================================================
222 offset:{0..4095} Specifies a 12-bit unsigned offset as a positive
223 :ref:`integer number <amdgpu_synid_integer_number>`
224 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
225 ================= ====================================================================
234 .. _amdgpu_synid_flat_offset13s:
239 Specifies an immediate signed 13-bit offset, in bytes. The default value is 0.
241 Can be used with *global/scratch* opcodes only. GFX9 only.
243 ===================== ====================================================================
245 ===================== ====================================================================
246 offset:{-4096..4095} Specifies a 13-bit signed offset as an
247 :ref:`integer number <amdgpu_synid_integer_number>`
248 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
249 ===================== ====================================================================
259 .. _amdgpu_synid_flat_offset12s:
264 Specifies an immediate signed 12-bit offset, in bytes. The default value is 0.
266 Can be used with *global/scratch* opcodes only.
270 ===================== ====================================================================
272 ===================== ====================================================================
273 offset:{-2048..2047} Specifies a 12-bit signed offset as an
274 :ref:`integer number <amdgpu_synid_integer_number>`
275 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
276 ===================== ====================================================================
286 .. _amdgpu_synid_flat_offset11:
291 Specifies an immediate unsigned 11-bit offset, in bytes. The default value is 0.
293 Cannot be used with *global/scratch* opcodes.
297 ================= ====================================================================
299 ================= ====================================================================
300 offset:{0..2047} Specifies an 11-bit unsigned offset as a positive
301 :ref:`integer number <amdgpu_synid_integer_number>`
302 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
303 ================= ====================================================================
315 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
320 See a description :ref:`here<amdgpu_synid_glc>`.
325 See a description :ref:`here<amdgpu_synid_lds>`. GFX10 only.
330 See a description :ref:`here<amdgpu_synid_slc>`.
335 See a description :ref:`here<amdgpu_synid_tfe>`.
340 See a description :ref:`here<amdgpu_synid_nv>`.
345 .. _amdgpu_synid_dmask:
350 Specifies which channels (image components) are used by the operation. By default, no channels
353 =============== ====================================================================
355 =============== ====================================================================
356 dmask:{0..15} Specifies image channels as a positive
357 :ref:`integer number <amdgpu_synid_integer_number>`
358 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
360 Each bit corresponds to one of 4 image components (RGBA).
362 If the specified bit value is 0, the component is not used,
363 value 1 means that the component is used.
364 =============== ====================================================================
366 This modifier has some limitations depending on instruction kind:
368 =================================================== ========================
369 Instruction Kind Valid dmask Values
370 =================================================== ========================
371 32-bit atomic *cmpswap* 0x3
372 32-bit atomic instructions except for *cmpswap* 0x1
373 64-bit atomic *cmpswap* 0xF
374 64-bit atomic instructions except for *cmpswap* 0x3
375 *gather4* 0x1, 0x2, 0x4, 0x8
376 Other instructions any value
377 =================================================== ========================
387 .. _amdgpu_synid_unorm:
392 Specifies whether the address is normalized or not (the address is normalized by default).
394 ======================== ========================================
396 ======================== ========================================
397 unorm Force the address to be unnormalized.
398 ======================== ========================================
403 See a description :ref:`here<amdgpu_synid_glc>`.
408 See a description :ref:`here<amdgpu_synid_slc>`.
410 .. _amdgpu_synid_r128:
415 Specifies texture resource size. The default size is 256 bits.
417 GFX7, GFX8 and GFX10 only.
419 =================== ================================================
421 =================== ================================================
422 r128 Specifies 128 bits texture resource size.
423 =================== ================================================
425 .. WARNING:: Using this modifier should decrease *rsrc* operand size from 8 to 4 dwords, but assembler does not currently support this feature.
430 See a description :ref:`here<amdgpu_synid_tfe>`.
432 .. _amdgpu_synid_lwe:
437 Specifies LOD warning status (LOD warning is disabled by default).
439 ======================================== ================================================
441 ======================================== ================================================
442 lwe Enables LOD warning.
443 ======================================== ================================================
450 Specifies if an array index must be sent to TA. By default, array index is not sent.
452 ======================================== ================================================
454 ======================================== ================================================
455 da Send an array-index to TA.
456 ======================================== ================================================
458 .. _amdgpu_synid_d16:
463 Specifies data size: 16 or 32 bits (32 bits by default). Not supported by GFX7.
465 ======================================== ================================================
467 ======================================== ================================================
468 d16 Enables 16-bits data mode.
470 On loads, convert data in memory to 16-bit
471 format before storing it in VGPRs.
473 For stores, convert 16-bit data in VGPRs to
474 32 bits before going to memory.
476 Note that GFX8.0 does not support data packing.
477 Each 16-bit data element occupies 1 VGPR.
479 GFX8.1, GFX9 and GFX10 support data packing.
480 Each pair of 16-bit data elements
482 ======================================== ================================================
484 .. _amdgpu_synid_a16:
489 Specifies size of image address components: 16 or 32 bits (32 bits by default).
492 ======================================== ================================================
494 ======================================== ================================================
495 a16 Enables 16-bits image address components.
496 ======================================== ================================================
498 .. _amdgpu_synid_dim:
503 Specifies surface dimension. This is a mandatory modifier. There is no default value.
507 =============================== =========================================================
509 =============================== =========================================================
510 dim:1D One-dimensional image.
511 dim:2D Two-dimensional image.
512 dim:3D Three-dimensional image.
513 dim:CUBE Cubemap array.
514 dim:1D_ARRAY One-dimensional image array.
515 dim:2D_ARRAY Two-dimensional image array.
516 dim:2D_MSAA Two-dimensional multi-sample auto-aliasing image.
517 dim:2D_MSAA_ARRAY Two-dimensional multi-sample auto-aliasing image array.
518 =============================== =========================================================
520 The following table defines an alternative syntax which is supported
521 for compatibility with SP3 assembler:
523 =============================== =========================================================
525 =============================== =========================================================
526 dim:SQ_RSRC_IMG_1D One-dimensional image.
527 dim:SQ_RSRC_IMG_2D Two-dimensional image.
528 dim:SQ_RSRC_IMG_3D Three-dimensional image.
529 dim:SQ_RSRC_IMG_CUBE Cubemap array.
530 dim:SQ_RSRC_IMG_1D_ARRAY One-dimensional image array.
531 dim:SQ_RSRC_IMG_2D_ARRAY Two-dimensional image array.
532 dim:SQ_RSRC_IMG_2D_MSAA Two-dimensional multi-sample auto-aliasing image.
533 dim:SQ_RSRC_IMG_2D_MSAA_ARRAY Two-dimensional multi-sample auto-aliasing image array.
534 =============================== =========================================================
539 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
541 Miscellaneous Modifiers
542 -----------------------
544 .. _amdgpu_synid_dlc:
549 Controls device level cache policy for memory operations. Used for synchronization.
550 When specified, forces operation to bypass device level cache making the operation device
551 level coherent. By default, instructions use device level cache.
555 ======================================== ================================================
557 ======================================== ================================================
558 dlc Bypass device level cache.
559 ======================================== ================================================
561 .. _amdgpu_synid_glc:
566 This modifier has different meaning for loads, stores, and atomic operations.
567 The default value is off (0).
569 See AMD documentation for details.
571 ======================================== ================================================
573 ======================================== ================================================
574 glc Set glc bit to 1.
575 ======================================== ================================================
577 .. _amdgpu_synid_lds:
582 Specifies where to store the result: VGPRs or LDS (VGPRs by default).
584 ======================================== ===========================
586 ======================================== ===========================
587 lds Store result in LDS.
588 ======================================== ===========================
595 Specifies if instruction is operating on non-volatile memory. By default, memory is volatile.
599 ======================================== ================================================
601 ======================================== ================================================
602 nv Indicates that instruction operates on
604 ======================================== ================================================
606 .. _amdgpu_synid_slc:
611 Specifies cache policy. The default value is off (0).
613 See AMD documentation for details.
615 ======================================== ================================================
617 ======================================== ================================================
618 slc Set slc bit to 1.
619 ======================================== ================================================
621 .. _amdgpu_synid_tfe:
626 Controls access to partially resident textures. The default value is off (0).
628 See AMD documentation for details.
630 ======================================== ================================================
632 ======================================== ================================================
633 tfe Set tfe bit to 1.
634 ======================================== ================================================
636 MUBUF/MTBUF Modifiers
637 ---------------------
639 .. _amdgpu_synid_idxen:
644 Specifies whether address components include an index. By default, no components are used.
646 Can be used together with :ref:`offen<amdgpu_synid_offen>`.
648 Cannot be used with :ref:`addr64<amdgpu_synid_addr64>`.
650 ======================================== ================================================
652 ======================================== ================================================
653 idxen Address components include an index.
654 ======================================== ================================================
656 .. _amdgpu_synid_offen:
661 Specifies whether address components include an offset. By default, no components are used.
663 Can be used together with :ref:`idxen<amdgpu_synid_idxen>`.
665 Cannot be used with :ref:`addr64<amdgpu_synid_addr64>`.
667 ======================================== ================================================
669 ======================================== ================================================
670 offen Address components include an offset.
671 ======================================== ================================================
673 .. _amdgpu_synid_addr64:
678 Specifies whether a 64-bit address is used. By default, no address is used.
680 GFX7 only. Cannot be used with :ref:`offen<amdgpu_synid_offen>` and
681 :ref:`idxen<amdgpu_synid_idxen>` modifiers.
683 ======================================== ================================================
685 ======================================== ================================================
686 addr64 A 64-bit address is used.
687 ======================================== ================================================
689 .. _amdgpu_synid_buf_offset12:
694 Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.
696 ================== ====================================================================
698 ================== ====================================================================
699 offset:{0..0xFFF} Specifies a 12-bit unsigned offset as a positive
700 :ref:`integer number <amdgpu_synid_integer_number>`
701 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
702 ================== ====================================================================
714 See a description :ref:`here<amdgpu_synid_glc>`.
719 See a description :ref:`here<amdgpu_synid_slc>`.
724 See a description :ref:`here<amdgpu_synid_lds>`.
729 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
734 See a description :ref:`here<amdgpu_synid_tfe>`.
736 .. _amdgpu_synid_fmt:
741 Specifies data and numeric formats used by the operation.
742 The default numeric format is BUF_NUM_FORMAT_UNORM.
743 The default data format is BUF_DATA_FORMAT_8.
745 ========================================= ===============================================================
747 ========================================= ===============================================================
748 format:{0..127} Use format specified as either an
749 :ref:`integer number<amdgpu_synid_integer_number>` or an
750 :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
751 format:[<data format>] Use the specified data format and
752 default numeric format.
753 format:[<numeric format>] Use the specified numeric format and
755 format:[<data format>, <numeric format>] Use the specified data and numeric formats.
756 format:[<numeric format>, <data format>] Use the specified data and numeric formats.
757 ========================================= ===============================================================
759 .. _amdgpu_synid_format_data:
761 Supported data formats are defined in the following table:
763 ========================================= ===============================
765 ========================================= ===============================
766 BUF_DATA_FORMAT_INVALID
767 BUF_DATA_FORMAT_8 Default value.
771 BUF_DATA_FORMAT_16_16
772 BUF_DATA_FORMAT_10_11_11
773 BUF_DATA_FORMAT_11_11_10
774 BUF_DATA_FORMAT_10_10_10_2
775 BUF_DATA_FORMAT_2_10_10_10
776 BUF_DATA_FORMAT_8_8_8_8
777 BUF_DATA_FORMAT_32_32
778 BUF_DATA_FORMAT_16_16_16_16
779 BUF_DATA_FORMAT_32_32_32
780 BUF_DATA_FORMAT_32_32_32_32
781 BUF_DATA_FORMAT_RESERVED_15
782 ========================================= ===============================
784 .. _amdgpu_synid_format_num:
786 Supported numeric formats are defined below:
788 ========================================= ===============================
790 ========================================= ===============================
791 BUF_NUM_FORMAT_UNORM Default value.
793 BUF_NUM_FORMAT_USCALED
794 BUF_NUM_FORMAT_SSCALED
797 BUF_NUM_FORMAT_SNORM_OGL GFX7 only.
798 BUF_NUM_FORMAT_RESERVED_6 GFX8 and GFX9 only.
800 ========================================= ===============================
808 format:[BUF_DATA_FORMAT_16]
809 format:[BUF_DATA_FORMAT_16,BUF_NUM_FORMAT_SSCALED]
810 format:[BUF_NUM_FORMAT_FLOAT]
812 .. _amdgpu_synid_ufmt:
817 Specifies a unified format used by the operation.
818 The default format is BUF_FMT_8_UNORM.
821 ========================================= ===============================================================
823 ========================================= ===============================================================
824 format:{0..127} Use unified format specified as either an
825 :ref:`integer number<amdgpu_synid_integer_number>` or an
826 :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
827 Note that unified format numbers are not compatible with
828 format numbers used for pre-GFX10 ISA.
829 format:[<unified format>] Use the specified unified format.
830 ========================================= ===============================================================
832 Unified format is a replacement for :ref:`data<amdgpu_synid_format_data>`
833 and :ref:`numeric<amdgpu_synid_format_num>` formats. For compatibility with older ISA,
834 :ref:`syntax with data and numeric formats<amdgpu_synid_fmt>` is still accepted
835 provided that the combination of formats can be mapped to a unified format.
837 Supported unified formats and equivalent combinations of data and numeric formats
840 ============================== ============================== =============================
841 Syntax Equivalent Data Format Equivalent Numeric Format
842 ============================== ============================== =============================
843 BUF_FMT_INVALID BUF_DATA_FORMAT_INVALID BUF_NUM_FORMAT_UNORM
845 BUF_FMT_8_UNORM BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_UNORM
846 BUF_FMT_8_SNORM BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_SNORM
847 BUF_FMT_8_USCALED BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_USCALED
848 BUF_FMT_8_SSCALED BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_SSCALED
849 BUF_FMT_8_UINT BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_UINT
850 BUF_FMT_8_SINT BUF_DATA_FORMAT_8 BUF_NUM_FORMAT_SINT
852 BUF_FMT_16_UNORM BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_UNORM
853 BUF_FMT_16_SNORM BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_SNORM
854 BUF_FMT_16_USCALED BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_USCALED
855 BUF_FMT_16_SSCALED BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_SSCALED
856 BUF_FMT_16_UINT BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_UINT
857 BUF_FMT_16_SINT BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_SINT
858 BUF_FMT_16_FLOAT BUF_DATA_FORMAT_16 BUF_NUM_FORMAT_FLOAT
860 BUF_FMT_8_8_UNORM BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_UNORM
861 BUF_FMT_8_8_SNORM BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_SNORM
862 BUF_FMT_8_8_USCALED BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_USCALED
863 BUF_FMT_8_8_SSCALED BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_SSCALED
864 BUF_FMT_8_8_UINT BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_UINT
865 BUF_FMT_8_8_SINT BUF_DATA_FORMAT_8_8 BUF_NUM_FORMAT_SINT
867 BUF_FMT_32_UINT BUF_DATA_FORMAT_32 BUF_NUM_FORMAT_UINT
868 BUF_FMT_32_SINT BUF_DATA_FORMAT_32 BUF_NUM_FORMAT_SINT
869 BUF_FMT_32_FLOAT BUF_DATA_FORMAT_32 BUF_NUM_FORMAT_FLOAT
871 BUF_FMT_16_16_UNORM BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_UNORM
872 BUF_FMT_16_16_SNORM BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_SNORM
873 BUF_FMT_16_16_USCALED BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_USCALED
874 BUF_FMT_16_16_SSCALED BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_SSCALED
875 BUF_FMT_16_16_UINT BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_UINT
876 BUF_FMT_16_16_SINT BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_SINT
877 BUF_FMT_16_16_FLOAT BUF_DATA_FORMAT_16_16 BUF_NUM_FORMAT_FLOAT
879 BUF_FMT_10_11_11_UNORM BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_UNORM
880 BUF_FMT_10_11_11_SNORM BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_SNORM
881 BUF_FMT_10_11_11_USCALED BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_USCALED
882 BUF_FMT_10_11_11_SSCALED BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_SSCALED
883 BUF_FMT_10_11_11_UINT BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_UINT
884 BUF_FMT_10_11_11_SINT BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_SINT
885 BUF_FMT_10_11_11_FLOAT BUF_DATA_FORMAT_10_11_11 BUF_NUM_FORMAT_FLOAT
887 BUF_FMT_11_11_10_UNORM BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_UNORM
888 BUF_FMT_11_11_10_SNORM BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_SNORM
889 BUF_FMT_11_11_10_USCALED BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_USCALED
890 BUF_FMT_11_11_10_SSCALED BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_SSCALED
891 BUF_FMT_11_11_10_UINT BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_UINT
892 BUF_FMT_11_11_10_SINT BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_SINT
893 BUF_FMT_11_11_10_FLOAT BUF_DATA_FORMAT_11_11_10 BUF_NUM_FORMAT_FLOAT
895 BUF_FMT_10_10_10_2_UNORM BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_UNORM
896 BUF_FMT_10_10_10_2_SNORM BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_SNORM
897 BUF_FMT_10_10_10_2_USCALED BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_USCALED
898 BUF_FMT_10_10_10_2_SSCALED BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_SSCALED
899 BUF_FMT_10_10_10_2_UINT BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_UINT
900 BUF_FMT_10_10_10_2_SINT BUF_DATA_FORMAT_10_10_10_2 BUF_NUM_FORMAT_SINT
902 BUF_FMT_2_10_10_10_UNORM BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_UNORM
903 BUF_FMT_2_10_10_10_SNORM BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_SNORM
904 BUF_FMT_2_10_10_10_USCALED BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_USCALED
905 BUF_FMT_2_10_10_10_SSCALED BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_SSCALED
906 BUF_FMT_2_10_10_10_UINT BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_UINT
907 BUF_FMT_2_10_10_10_SINT BUF_DATA_FORMAT_2_10_10_10 BUF_NUM_FORMAT_SINT
909 BUF_FMT_8_8_8_8_UNORM BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_UNORM
910 BUF_FMT_8_8_8_8_SNORM BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_SNORM
911 BUF_FMT_8_8_8_8_USCALED BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_USCALED
912 BUF_FMT_8_8_8_8_SSCALED BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_SSCALED
913 BUF_FMT_8_8_8_8_UINT BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_UINT
914 BUF_FMT_8_8_8_8_SINT BUF_DATA_FORMAT_8_8_8_8 BUF_NUM_FORMAT_SINT
916 BUF_FMT_32_32_UINT BUF_DATA_FORMAT_32_32 BUF_NUM_FORMAT_UINT
917 BUF_FMT_32_32_SINT BUF_DATA_FORMAT_32_32 BUF_NUM_FORMAT_SINT
918 BUF_FMT_32_32_FLOAT BUF_DATA_FORMAT_32_32 BUF_NUM_FORMAT_FLOAT
920 BUF_FMT_16_16_16_16_UNORM BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_UNORM
921 BUF_FMT_16_16_16_16_SNORM BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_SNORM
922 BUF_FMT_16_16_16_16_USCALED BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_USCALED
923 BUF_FMT_16_16_16_16_SSCALED BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_SSCALED
924 BUF_FMT_16_16_16_16_UINT BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_UINT
925 BUF_FMT_16_16_16_16_SINT BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_SINT
926 BUF_FMT_16_16_16_16_FLOAT BUF_DATA_FORMAT_16_16_16_16 BUF_NUM_FORMAT_FLOAT
928 BUF_FMT_32_32_32_UINT BUF_DATA_FORMAT_32_32_32 BUF_NUM_FORMAT_UINT
929 BUF_FMT_32_32_32_SINT BUF_DATA_FORMAT_32_32_32 BUF_NUM_FORMAT_SINT
930 BUF_FMT_32_32_32_FLOAT BUF_DATA_FORMAT_32_32_32 BUF_NUM_FORMAT_FLOAT
931 BUF_FMT_32_32_32_32_UINT BUF_DATA_FORMAT_32_32_32_32 BUF_NUM_FORMAT_UINT
932 BUF_FMT_32_32_32_32_SINT BUF_DATA_FORMAT_32_32_32_32 BUF_NUM_FORMAT_SINT
933 BUF_FMT_32_32_32_32_FLOAT BUF_DATA_FORMAT_32_32_32_32 BUF_NUM_FORMAT_FLOAT
934 ============================== ============================== =============================
941 format:[BUF_FMT_32_UINT]
949 See a description :ref:`here<amdgpu_synid_glc>`.
954 See a description :ref:`here<amdgpu_synid_nv>`. GFX9 only.
959 See a description :ref:`here<amdgpu_synid_dlc>`. GFX10 only.
964 .. _amdgpu_synid_high:
969 Specifies which half of the LDS word to use. Low half of LDS word is used by default.
972 ======================================== ================================
974 ======================================== ================================
975 high Use high half of LDS word.
976 ======================================== ================================
983 .. _amdgpu_synid_dpp8_sel:
988 Selects which lanes to pull data from, within a group of 8 lanes. This is a mandatory modifier.
989 There is no default value.
993 The *dpp8_sel* modifier must specify exactly 8 values.
994 First value selects which lane to read from to supply data into lane 0.
995 Second value controls lane 1 and so on.
997 Each value may be specified as either
998 an :ref:`integer number<amdgpu_synid_integer_number>` or
999 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1001 =============================================================== ===========================
1003 =============================================================== ===========================
1004 dpp8:[{0..7},{0..7},{0..7},{0..7},{0..7},{0..7},{0..7},{0..7}] Select lanes to read from.
1005 =============================================================== ===========================
1011 dpp8:[7,6,5,4,3,2,1,0]
1012 dpp8:[0,1,0,1,0,1,0,1]
1014 .. _amdgpu_synid_fi8:
1019 Controls interaction with inactive lanes for *dpp8* instructions. The default value is zero.
1021 Note: *inactive* lanes are those whose :ref:`exec<amdgpu_synid_exec>` mask bit is zero.
1025 ==================================== =====================================================
1027 ==================================== =====================================================
1028 fi:0 Fetch zero when accessing data from inactive lanes.
1029 fi:1 Fetch pre-exist values from inactive lanes.
1030 ==================================== =====================================================
1032 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
1033 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1038 GFX8, GFX9 and GFX10 only.
1040 .. _amdgpu_synid_dpp_ctrl:
1045 Specifies how data are shared between threads. This is a mandatory modifier.
1046 There is no default value.
1048 GFX8 and GFX9 only. Use :ref:`dpp16_ctrl<amdgpu_synid_dpp16_ctrl>` for GFX10.
1050 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1052 ======================================== ================================================
1054 ======================================== ================================================
1055 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
1056 row_mirror Mirror threads within row.
1057 row_half_mirror Mirror threads within 1/2 row (8 threads).
1058 row_bcast:15 Broadcast 15th thread of each row to next row.
1059 row_bcast:31 Broadcast thread 31 to rows 2 and 3.
1060 wave_shl:1 Wavefront left shift by 1 thread.
1061 wave_rol:1 Wavefront left rotate by 1 thread.
1062 wave_shr:1 Wavefront right shift by 1 thread.
1063 wave_ror:1 Wavefront right rotate by 1 thread.
1064 row_shl:{1..15} Row shift left by 1-15 threads.
1065 row_shr:{1..15} Row shift right by 1-15 threads.
1066 row_ror:{1..15} Row rotate right by 1-15 threads.
1067 ======================================== ================================================
1069 Note: numeric values may be specified as either
1070 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1071 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1077 quad_perm:[0, 1, 2, 3]
1080 .. _amdgpu_synid_dpp16_ctrl:
1085 Specifies how data are shared between threads. This is a mandatory modifier.
1086 There is no default value.
1088 GFX10 only. Use :ref:`dpp_ctrl<amdgpu_synid_dpp_ctrl>` for GFX8 and GFX9.
1090 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1091 (There are only two rows in *wave32* mode.)
1093 ======================================== ====================================================
1095 ======================================== ====================================================
1096 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
1097 row_mirror Mirror threads within row.
1098 row_half_mirror Mirror threads within 1/2 row (8 threads).
1099 row_share:{0..15} Share the value from the specified lane with other
1101 row_xmask:{0..15} Fetch from XOR(current lane id, specified lane id).
1102 row_shl:{1..15} Row shift left by 1-15 threads.
1103 row_shr:{1..15} Row shift right by 1-15 threads.
1104 row_ror:{1..15} Row rotate right by 1-15 threads.
1105 ======================================== ====================================================
1107 Note: numeric values may be specified as either
1108 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1109 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1115 quad_perm:[0, 1, 2, 3]
1118 .. _amdgpu_synid_dpp32_ctrl:
1123 Specifies how data are shared between threads. This is a mandatory modifier.
1124 There is no default value.
1126 May be used only with GFX90A 32-bit instructions.
1128 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1130 ======================================== ==================================================
1132 ======================================== ==================================================
1133 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
1134 row_mirror Mirror threads within row.
1135 row_half_mirror Mirror threads within 1/2 row (8 threads).
1136 row_bcast:15 Broadcast 15th thread of each row to next row.
1137 row_bcast:31 Broadcast thread 31 to rows 2 and 3.
1138 wave_shl:1 Wavefront left shift by 1 thread.
1139 wave_rol:1 Wavefront left rotate by 1 thread.
1140 wave_shr:1 Wavefront right shift by 1 thread.
1141 wave_ror:1 Wavefront right rotate by 1 thread.
1142 row_shl:{1..15} Row shift left by 1-15 threads.
1143 row_shr:{1..15} Row shift right by 1-15 threads.
1144 row_ror:{1..15} Row rotate right by 1-15 threads.
1145 row_newbcast:{1..15} Broadcast a thread within a row to the whole row.
1146 ======================================== ==================================================
1148 Note: numeric values may be specified as either
1149 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1150 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1156 quad_perm:[0, 1, 2, 3]
1160 .. _amdgpu_synid_dpp64_ctrl:
1165 Specifies how data are shared between threads. This is a mandatory modifier.
1166 There is no default value.
1168 May be used only with GFX90A 64-bit instructions.
1170 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1172 ======================================== ==================================================
1174 ======================================== ==================================================
1175 row_newbcast:{1..15} Broadcast a thread within a row to the whole row.
1176 ======================================== ==================================================
1178 Note: numeric values may be specified as either
1179 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1180 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1189 .. _amdgpu_synid_row_mask:
1194 Controls which rows are enabled for data sharing. By default, all rows are enabled.
1196 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1197 (There are only two rows in *wave32* mode.)
1199 ================= ====================================================================
1201 ================= ====================================================================
1202 row_mask:{0..15} Specifies a *row mask* as a positive
1203 :ref:`integer number <amdgpu_synid_integer_number>`
1204 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1206 Each of 4 bits in the mask controls one row
1207 (0 - disabled, 1 - enabled).
1209 In *wave32* mode the values should be limited to 0..7.
1210 ================= ====================================================================
1220 .. _amdgpu_synid_bank_mask:
1225 Controls which banks are enabled for data sharing. By default, all banks are enabled.
1227 Note: the lanes of a wavefront are organized in four *rows* and four *banks*.
1228 (There are only two rows in *wave32* mode.)
1230 ================== ====================================================================
1232 ================== ====================================================================
1233 bank_mask:{0..15} Specifies a *bank mask* as a positive
1234 :ref:`integer number <amdgpu_synid_integer_number>`
1235 or an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1237 Each of 4 bits in the mask controls one bank
1238 (0 - disabled, 1 - enabled).
1239 ================== ====================================================================
1249 .. _amdgpu_synid_bound_ctrl:
1254 Controls data sharing when accessing an invalid lane. By default, data sharing with
1255 invalid lanes is disabled.
1257 ======================================== ================================================
1259 ======================================== ================================================
1260 bound_ctrl:1 Enables data sharing with invalid lanes.
1262 Accessing data from an invalid lane will
1264 ======================================== ================================================
1266 .. _amdgpu_synid_fi16:
1271 Controls interaction with *inactive* lanes for *dpp16* instructions. The default value is zero.
1273 Note: *inactive* lanes are those whose :ref:`exec<amdgpu_synid_exec>` mask bit is zero.
1277 ======================================== ==================================================
1279 ======================================== ==================================================
1280 fi:0 Interaction with inactive lanes is controlled by
1281 :ref:`bound_ctrl<amdgpu_synid_bound_ctrl>`.
1283 fi:1 Fetch pre-exist values from inactive lanes.
1284 ======================================== ==================================================
1286 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
1287 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1292 GFX8, GFX9 and GFX10 only.
1297 See a description :ref:`here<amdgpu_synid_clamp>`.
1302 See a description :ref:`here<amdgpu_synid_omod>`.
1304 GFX9 and GFX10 only.
1306 .. _amdgpu_synid_dst_sel:
1311 Selects which bits in the destination are affected. By default, all bits are affected.
1313 ======================================== ================================================
1315 ======================================== ================================================
1316 dst_sel:DWORD Use bits 31:0.
1317 dst_sel:BYTE_0 Use bits 7:0.
1318 dst_sel:BYTE_1 Use bits 15:8.
1319 dst_sel:BYTE_2 Use bits 23:16.
1320 dst_sel:BYTE_3 Use bits 31:24.
1321 dst_sel:WORD_0 Use bits 15:0.
1322 dst_sel:WORD_1 Use bits 31:16.
1323 ======================================== ================================================
1325 .. _amdgpu_synid_dst_unused:
1330 Controls what to do with the bits in the destination which are not selected
1331 by :ref:`dst_sel<amdgpu_synid_dst_sel>`.
1332 By default, unused bits are preserved.
1334 ======================================== ================================================
1336 ======================================== ================================================
1337 dst_unused:UNUSED_PAD Pad with zeros.
1338 dst_unused:UNUSED_SEXT Sign-extend upper bits, zero lower bits.
1339 dst_unused:UNUSED_PRESERVE Preserve bits.
1340 ======================================== ================================================
1342 .. _amdgpu_synid_src0_sel:
1347 Controls which bits in the src0 are used. By default, all bits are used.
1349 ======================================== ================================================
1351 ======================================== ================================================
1352 src0_sel:DWORD Use bits 31:0.
1353 src0_sel:BYTE_0 Use bits 7:0.
1354 src0_sel:BYTE_1 Use bits 15:8.
1355 src0_sel:BYTE_2 Use bits 23:16.
1356 src0_sel:BYTE_3 Use bits 31:24.
1357 src0_sel:WORD_0 Use bits 15:0.
1358 src0_sel:WORD_1 Use bits 31:16.
1359 ======================================== ================================================
1361 .. _amdgpu_synid_src1_sel:
1366 Controls which bits in the src1 are used. By default, all bits are used.
1368 ======================================== ================================================
1370 ======================================== ================================================
1371 src1_sel:DWORD Use bits 31:0.
1372 src1_sel:BYTE_0 Use bits 7:0.
1373 src1_sel:BYTE_1 Use bits 15:8.
1374 src1_sel:BYTE_2 Use bits 23:16.
1375 src1_sel:BYTE_3 Use bits 31:24.
1376 src1_sel:WORD_0 Use bits 15:0.
1377 src1_sel:WORD_1 Use bits 31:16.
1378 ======================================== ================================================
1380 .. _amdgpu_synid_sdwa_operand_modifiers:
1382 SDWA Operand Modifiers
1383 ----------------------
1385 Operand modifiers are not used separately. They are applied to source operands.
1387 GFX8, GFX9 and GFX10 only.
1392 See a description :ref:`here<amdgpu_synid_abs>`.
1397 See a description :ref:`here<amdgpu_synid_neg>`.
1399 .. _amdgpu_synid_sext:
1404 Sign-extends value of a (sub-dword) operand to fill all 32 bits.
1405 Has no effect for 32-bit operands.
1407 Valid for integer operands only.
1409 ======================================== ================================================
1411 ======================================== ================================================
1412 sext(<operand>) Sign-extend operand value.
1413 ======================================== ================================================
1425 .. _amdgpu_synid_vop3_op_sel:
1430 Selects the low [15:0] or high [31:16] operand bits for source and destination operands.
1431 By default, low bits are used for all operands.
1433 The number of values specified with the op_sel modifier must match the number of instruction
1434 operands (both source and destination). First value controls src0, second value controls src1
1435 and so on, except that the last value controls destination.
1436 The value 0 selects the low bits, while 1 selects the high bits.
1438 Note: op_sel modifier affects 16-bit operands only. For 32-bit operands the value specified
1439 by op_sel must be 0.
1441 GFX9 and GFX10 only.
1443 ======================================== ============================================================
1445 ======================================== ============================================================
1446 op_sel:[{0..1},{0..1}] Select operand bits for instructions with 1 source operand.
1447 op_sel:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1448 op_sel:[{0..1},{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1449 ======================================== ============================================================
1451 Note: numeric values may be specified as either
1452 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1453 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1462 .. _amdgpu_synid_clamp:
1467 Clamp meaning depends on instruction.
1469 For *v_cmp* instructions, clamp modifier indicates that the compare signals
1470 if a floating point exception occurs. By default, signaling is disabled.
1471 Not supported by GFX7.
1473 For integer operations, clamp modifier indicates that the result must be clamped
1474 to the largest and smallest representable value. By default, there is no clamping.
1475 Integer clamping is not supported by GFX7.
1477 For floating point operations, clamp modifier indicates that the result must be clamped
1478 to the range [0.0, 1.0]. By default, there is no clamping.
1480 Note: clamp modifier is applied after :ref:`output modifiers<amdgpu_synid_omod>` (if any).
1482 ======================================== ================================================
1484 ======================================== ================================================
1485 clamp Enables clamping (or signaling).
1486 ======================================== ================================================
1488 .. _amdgpu_synid_omod:
1493 Specifies if an output modifier must be applied to the result.
1494 By default, no output modifiers are applied.
1496 Note: output modifiers are applied before :ref:`clamping<amdgpu_synid_clamp>` (if any).
1498 Output modifiers are valid for f32 and f64 floating point results only.
1499 They must not be used with f16.
1501 Note: *v_cvt_f16_f32* is an exception. This instruction produces f16 result
1502 but accepts output modifiers.
1504 ======================================== ================================================
1506 ======================================== ================================================
1507 mul:2 Multiply the result by 2.
1508 mul:4 Multiply the result by 4.
1509 div:2 Multiply the result by 0.5.
1510 ======================================== ================================================
1512 Note: numeric values may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
1513 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1520 mul:x // x must be equal to 2 or 4
1522 .. _amdgpu_synid_vop3_operand_modifiers:
1524 VOP3 Operand Modifiers
1525 ----------------------
1527 Operand modifiers are not used separately. They are applied to source operands.
1529 .. _amdgpu_synid_abs:
1534 Computes the absolute value of its operand. Must be applied before :ref:`neg<amdgpu_synid_neg>`
1535 (if any). Valid for floating point operands only.
1537 ======================================== ====================================================
1539 ======================================== ====================================================
1540 abs(<operand>) Get the absolute value of a floating-point operand.
1541 \|<operand>| The same as above (an SP3 syntax).
1542 ======================================== ====================================================
1544 Note: avoid using SP3 syntax with operands specified as expressions because the trailing '|'
1545 may be misinterpreted. Such operands should be enclosed into additional parentheses as shown
1555 \|(x|y)| // additional parentheses are required
1557 .. _amdgpu_synid_neg:
1562 Computes the negative value of its operand. Must be applied after :ref:`abs<amdgpu_synid_abs>`
1563 (if any). Valid for floating point operands only.
1565 ================== ====================================================
1567 ================== ====================================================
1568 neg(<operand>) Get the negative value of a floating-point operand.
1569 The operand may include an optional
1570 :ref:`abs<amdgpu_synid_abs>` modifier.
1571 -<operand> The same as above (an SP3 syntax).
1572 ================== ====================================================
1574 Note: SP3 syntax is supported with limitations because of a potential ambiguity.
1575 Currently it is allowed in the following cases:
1577 * Before a register.
1578 * Before an :ref:`abs<amdgpu_synid_abs>` modifier.
1579 * Before an SP3 :ref:`abs<amdgpu_synid_abs>` modifier.
1581 In all other cases "-" is handled as a part of an expression that follows the sign.
1587 // Operands with negate modifiers
1595 // Operands without negate modifiers
1602 This section describes modifiers of *regular* VOP3P instructions.
1604 *v_mad_mix\** and *v_fma_mix\**
1605 instructions use these modifiers :ref:`in a special manner<amdgpu_synid_mad_mix>`.
1607 GFX9 and GFX10 only.
1609 .. _amdgpu_synid_op_sel:
1614 Selects the low [15:0] or high [31:16] operand bits as input to the operation
1615 which results in the lower-half of the destination.
1616 By default, low bits are used for all operands.
1618 The number of values specified by the *op_sel* modifier must match the number of source
1619 operands. First value controls src0, second value controls src1 and so on.
1621 The value 0 selects the low bits, while 1 selects the high bits.
1623 ================================= =============================================================
1625 ================================= =============================================================
1626 op_sel:[{0..1}] Select operand bits for instructions with 1 source operand.
1627 op_sel:[{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1628 op_sel:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1629 ================================= =============================================================
1631 Note: numeric values may be specified as either
1632 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1633 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1642 .. _amdgpu_synid_op_sel_hi:
1647 Selects the low [15:0] or high [31:16] operand bits as input to the operation
1648 which results in the upper-half of the destination.
1649 By default, high bits are used for all operands.
1651 The number of values specified by the *op_sel_hi* modifier must match the number of source
1652 operands. First value controls src0, second value controls src1 and so on.
1654 The value 0 selects the low bits, while 1 selects the high bits.
1656 =================================== =============================================================
1658 =================================== =============================================================
1659 op_sel_hi:[{0..1}] Select operand bits for instructions with 1 source operand.
1660 op_sel_hi:[{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1661 op_sel_hi:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1662 =================================== =============================================================
1664 Note: numeric values may be specified as either
1665 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1666 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1675 .. _amdgpu_synid_neg_lo:
1680 Specifies whether to change sign of operand values selected by
1681 :ref:`op_sel<amdgpu_synid_op_sel>`. These values are then used
1682 as input to the operation which results in the upper-half of the destination.
1684 The number of values specified by this modifier must match the number of source
1685 operands. First value controls src0, second value controls src1 and so on.
1687 The value 0 indicates that the corresponding operand value is used unmodified,
1688 the value 1 indicates that negative value of the operand must be used.
1690 By default, operand values are used unmodified.
1692 This modifier is valid for floating point operands only.
1694 ================================ ==================================================================
1696 ================================ ==================================================================
1697 neg_lo:[{0..1}] Select affected operands for instructions with 1 source operand.
1698 neg_lo:[{0..1},{0..1}] Select affected operands for instructions with 2 source operands.
1699 neg_lo:[{0..1},{0..1},{0..1}] Select affected operands for instructions with 3 source operands.
1700 ================================ ==================================================================
1702 Note: numeric values may be specified as either
1703 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1704 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1713 .. _amdgpu_synid_neg_hi:
1718 Specifies whether to change sign of operand values selected by
1719 :ref:`op_sel_hi<amdgpu_synid_op_sel_hi>`. These values are then used
1720 as input to the operation which results in the upper-half of the destination.
1722 The number of values specified by this modifier must match the number of source
1723 operands. First value controls src0, second value controls src1 and so on.
1725 The value 0 indicates that the corresponding operand value is used unmodified,
1726 the value 1 indicates that negative value of the operand must be used.
1728 By default, operand values are used unmodified.
1730 This modifier is valid for floating point operands only.
1732 =============================== ==================================================================
1734 =============================== ==================================================================
1735 neg_hi:[{0..1}] Select affected operands for instructions with 1 source operand.
1736 neg_hi:[{0..1},{0..1}] Select affected operands for instructions with 2 source operands.
1737 neg_hi:[{0..1},{0..1},{0..1}] Select affected operands for instructions with 3 source operands.
1738 =============================== ==================================================================
1740 Note: numeric values may be specified as either
1741 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1742 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1754 See a description :ref:`here<amdgpu_synid_clamp>`.
1756 .. _amdgpu_synid_mad_mix:
1758 VOP3P MAD_MIX/FMA_MIX Modifiers
1759 -------------------------------
1761 *v_mad_mix\** and *v_fma_mix\**
1762 instructions use *op_sel* and *op_sel_hi* modifiers
1763 in a manner different from *regular* VOP3P instructions.
1765 See a description below.
1767 GFX9 and GFX10 only.
1769 .. _amdgpu_synid_mad_mix_op_sel:
1774 This operand has meaning only for 16-bit source operands as indicated by
1775 :ref:`m_op_sel_hi<amdgpu_synid_mad_mix_op_sel_hi>`.
1776 It specifies to select either the low [15:0] or high [31:16] operand bits
1777 as input to the operation.
1779 The number of values specified by the *op_sel* modifier must match the number of source
1780 operands. First value controls src0, second value controls src1 and so on.
1782 The value 0 indicates the low bits, the value 1 indicates the high 16 bits.
1784 By default, low bits are used for all operands.
1786 =============================== ================================================
1788 =============================== ================================================
1789 op_sel:[{0..1},{0..1},{0..1}] Select location of each 16-bit source operand.
1790 =============================== ================================================
1792 Note: numeric values may be specified as either
1793 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1794 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1802 .. _amdgpu_synid_mad_mix_op_sel_hi:
1807 Selects the size of source operands: either 32 bits or 16 bits.
1808 By default, 32 bits are used for all source operands.
1810 The number of values specified by the *op_sel_hi* modifier must match the number of source
1811 operands. First value controls src0, second value controls src1 and so on.
1813 The value 0 indicates 32 bits, the value 1 indicates 16 bits.
1815 The location of 16 bits in the operand may be specified by
1816 :ref:`m_op_sel<amdgpu_synid_mad_mix_op_sel>`.
1818 ======================================== ====================================
1820 ======================================== ====================================
1821 op_sel_hi:[{0..1},{0..1},{0..1}] Select size of each source operand.
1822 ======================================== ====================================
1824 Note: numeric values may be specified as either
1825 :ref:`integer numbers<amdgpu_synid_integer_number>` or
1826 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
1837 See a description :ref:`here<amdgpu_synid_abs>`.
1842 See a description :ref:`here<amdgpu_synid_neg>`.
1847 See a description :ref:`here<amdgpu_synid_clamp>`.
1849 VOP3P MFMA Modifiers
1850 --------------------
1852 These modifiers may only be used with GFX908 and GFX90A.
1854 .. _amdgpu_synid_cbsz:
1859 Specifies a broadcast mode.
1861 =============================== ==================================================================
1863 =============================== ==================================================================
1864 cbsz:[{0..7}] A broadcast mode.
1865 =============================== ==================================================================
1867 Note: numeric value may be specified as either
1868 an :ref:`integer number<amdgpu_synid_integer_number>` or
1869 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1871 .. _amdgpu_synid_abid:
1876 Specifies matrix A group select.
1878 =============================== ==================================================================
1880 =============================== ==================================================================
1881 abid:[{0..15}] Matrix A group select id.
1882 =============================== ==================================================================
1884 Note: numeric value may be specified as either
1885 an :ref:`integer number<amdgpu_synid_integer_number>` or
1886 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.
1888 .. _amdgpu_synid_blgp:
1893 Specifies matrix B lane group pattern.
1895 =============================== ==================================================================
1897 =============================== ==================================================================
1898 blgp:[{0..7}] Matrix B lane group pattern.
1899 =============================== ==================================================================
1901 Note: numeric value may be specified as either
1902 an :ref:`integer number<amdgpu_synid_integer_number>` or
1903 an :ref:`absolute expression<amdgpu_synid_absolute_expression>`.