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 =================== =====================================================
51 .. _amdgpu_synid_ds_offset16:
56 Specifies an immediate unsigned 16-bit offset, in bytes. The default value is 0.
58 Used with DS instructions which have 1 address.
60 ==================== ======================================================
62 ==================== ======================================================
63 offset:{0..0xFFFF} Specifies an unsigned 16-bit offset as a positive
64 :ref:`integer number <amdgpu_synid_integer_number>`.
65 ==================== ======================================================
74 .. _amdgpu_synid_sw_offset16:
79 This is a special modifier which may be used with *ds_swizzle_b32* instruction only.
80 It specifies a swizzle pattern in numeric or symbolic form. The default value is 0.
82 See AMD documentation for more information.
84 ======================================================= ===========================================================
86 ======================================================= ===========================================================
87 offset:{0..0xFFFF} Specifies a 16-bit swizzle pattern.
88 offset:swizzle(QUAD_PERM,{0..3},{0..3},{0..3},{0..3}) Specifies a quad permute mode pattern
90 Each number is a lane *id*.
91 offset:swizzle(BITMASK_PERM, "<mask>") Specifies a bitmask permute mode pattern.
93 The pattern converts a 5-bit lane *id* to another
94 lane *id* with which the lane interacts.
96 *mask* is a 5 character sequence which
97 specifies how to transform the bits of the
100 The following characters are allowed:
102 * "0" - set bit to 0.
104 * "1" - set bit to 1.
106 * "p" - preserve bit.
110 offset:swizzle(BROADCAST,{2..32},{0..N}) Specifies a broadcast mode.
112 Broadcasts the value of any particular lane to
113 all lanes in its group.
115 The first numeric parameter is a group
116 size and must be equal to 2, 4, 8, 16 or 32.
118 The second numeric parameter is an index of the
119 lane being broadcasted.
121 The index must not exceed group size.
122 offset:swizzle(SWAP,{1..16}) Specifies a swap mode.
124 Swaps the neighboring groups of
125 1, 2, 4, 8 or 16 lanes.
126 offset:swizzle(REVERSE,{2..32}) Specifies a reverse mode.
128 Reverses the lanes for groups of 2, 4, 8, 16 or 32 lanes.
129 ======================================================= ===========================================================
131 Numeric parameters may be specified as either :ref:`integer numbers<amdgpu_synid_integer_number>` or
132 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
140 offset:swizzle(QUAD_PERM, 0, 1, 2 ,3)
141 offset:swizzle(BITMASK_PERM, "01pi0")
142 offset:swizzle(BROADCAST, 2, 0)
143 offset:swizzle(SWAP, 8)
144 offset:swizzle(REVERSE, 30 + 2)
146 .. _amdgpu_synid_gds:
151 Specifies whether to use GDS or LDS memory (LDS is the default).
153 ======================================== ================================================
155 ======================================== ================================================
157 ======================================== ================================================
163 .. _amdgpu_synid_done:
168 Specifies if this is the last export from the shader to the target. By default, current
169 instruction does not finish an export sequence.
171 ======================================== ================================================
173 ======================================== ================================================
174 done Indicates the last export operation.
175 ======================================== ================================================
177 .. _amdgpu_synid_compr:
182 Indicates if the data are compressed (data are not compressed by default).
184 ======================================== ================================================
186 ======================================== ================================================
187 compr Data are compressed.
188 ======================================== ================================================
195 Specifies valid mask flag state (off by default).
197 ======================================== ================================================
199 ======================================== ================================================
200 vm Set valid mask flag.
201 ======================================== ================================================
206 .. _amdgpu_synid_flat_offset12:
211 Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.
213 Cannot be used with *global/scratch* opcodes. GFX9 only.
215 ================= ======================================================
217 ================= ======================================================
218 offset:{0..4095} Specifies a 12-bit unsigned offset as a positive
219 :ref:`integer number <amdgpu_synid_integer_number>`.
220 ================= ======================================================
229 .. _amdgpu_synid_flat_offset13s:
234 Specifies an immediate signed 13-bit offset, in bytes. The default value is 0.
236 Can be used with *global/scratch* opcodes only. GFX9 only.
238 ============================ =======================================================
240 ============================ =======================================================
241 offset:{-4096..4095} Specifies a 13-bit signed offset as an
242 :ref:`integer number <amdgpu_synid_integer_number>`.
243 ============================ =======================================================
255 See a description :ref:`here<amdgpu_synid_glc>`.
260 See a description :ref:`here<amdgpu_synid_slc>`.
265 See a description :ref:`here<amdgpu_synid_tfe>`.
270 See a description :ref:`here<amdgpu_synid_nv>`.
275 .. _amdgpu_synid_dmask:
280 Specifies which channels (image components) are used by the operation. By default, no channels
283 =============== =====================================================
285 =============== =====================================================
286 dmask:{0..15} Specifies image channels as a positive
287 :ref:`integer number <amdgpu_synid_integer_number>`.
289 Each bit corresponds to one of 4 image
292 If the specified bit value
293 is 0, the component is not used, value 1 means
294 that the component is used.
295 =============== =====================================================
297 This modifier has some limitations depending on instruction kind:
299 =================================================== ========================
300 Instruction Kind Valid dmask Values
301 =================================================== ========================
302 32-bit atomic *cmpswap* 0x3
303 32-bit atomic instructions except for *cmpswap* 0x1
304 64-bit atomic *cmpswap* 0xF
305 64-bit atomic instructions except for *cmpswap* 0x3
306 *gather4* 0x1, 0x2, 0x4, 0x8
307 Other instructions any value
308 =================================================== ========================
318 .. _amdgpu_synid_unorm:
323 Specifies whether the address is normalized or not (the address is normalized by default).
325 ======================== ========================================
327 ======================== ========================================
328 unorm Force the address to be unnormalized.
329 ======================== ========================================
334 See a description :ref:`here<amdgpu_synid_glc>`.
339 See a description :ref:`here<amdgpu_synid_slc>`.
341 .. _amdgpu_synid_r128:
346 Specifies texture resource size. The default size is 256 bits.
350 =================== ================================================
352 =================== ================================================
353 r128 Specifies 128 bits texture resource size.
354 =================== ================================================
356 .. WARNING:: Using this modifier should descrease *rsrc* operand size from 8 to 4 dwords, but assembler does not currently support this feature.
361 See a description :ref:`here<amdgpu_synid_tfe>`.
363 .. _amdgpu_synid_lwe:
368 Specifies LOD warning status (LOD warning is disabled by default).
370 ======================================== ================================================
372 ======================================== ================================================
373 lwe Enables LOD warning.
374 ======================================== ================================================
381 Specifies if an array index must be sent to TA. By default, array index is not sent.
383 ======================================== ================================================
385 ======================================== ================================================
386 da Send an array-index to TA.
387 ======================================== ================================================
389 .. _amdgpu_synid_d16:
394 Specifies data size: 16 or 32 bits (32 bits by default). Not supported by GFX7.
396 ======================================== ================================================
398 ======================================== ================================================
399 d16 Enables 16-bits data mode.
401 On loads, convert data in memory to 16-bit
402 format before storing it in VGPRs.
404 For stores, convert 16-bit data in VGPRs to
405 32 bits before going to memory.
407 Note that GFX8.0 does not support data packing.
408 Each 16-bit data element occupies 1 VGPR.
410 GFX8.1 and GFX9 support data packing.
411 Each pair of 16-bit data elements
413 ======================================== ================================================
415 .. _amdgpu_synid_a16:
420 Specifies size of image address components: 16 or 32 bits (32 bits by default). GFX9 only.
422 ======================================== ================================================
424 ======================================== ================================================
425 a16 Enables 16-bits image address components.
426 ======================================== ================================================
428 Miscellaneous Modifiers
429 -----------------------
431 .. _amdgpu_synid_glc:
436 This modifier has different meaning for loads, stores, and atomic operations.
437 The default value is off (0).
439 See AMD documentation for details.
441 ======================================== ================================================
443 ======================================== ================================================
444 glc Set glc bit to 1.
445 ======================================== ================================================
447 .. _amdgpu_synid_slc:
452 Specifies cache policy. The default value is off (0).
454 See AMD documentation for details.
456 ======================================== ================================================
458 ======================================== ================================================
459 slc Set slc bit to 1.
460 ======================================== ================================================
462 .. _amdgpu_synid_tfe:
467 Controls access to partially resident textures. The default value is off (0).
469 See AMD documentation for details.
471 ======================================== ================================================
473 ======================================== ================================================
474 tfe Set tfe bit to 1.
475 ======================================== ================================================
482 Specifies if instruction is operating on non-volatile memory. By default, memory is volatile.
486 ======================================== ================================================
488 ======================================== ================================================
489 nv Indicates that instruction operates on
491 ======================================== ================================================
493 MUBUF/MTBUF Modifiers
494 ---------------------
496 .. _amdgpu_synid_idxen:
501 Specifies whether address components include an index. By default, no components are used.
503 Can be used together with :ref:`offen<amdgpu_synid_offen>`.
505 Cannot be used with :ref:`addr64<amdgpu_synid_addr64>`.
507 ======================================== ================================================
509 ======================================== ================================================
510 idxen Address components include an index.
511 ======================================== ================================================
513 .. _amdgpu_synid_offen:
518 Specifies whether address components include an offset. By default, no components are used.
520 Can be used together with :ref:`idxen<amdgpu_synid_idxen>`.
522 Cannot be used with :ref:`addr64<amdgpu_synid_addr64>`.
524 ======================================== ================================================
526 ======================================== ================================================
527 offen Address components include an offset.
528 ======================================== ================================================
530 .. _amdgpu_synid_addr64:
535 Specifies whether a 64-bit address is used. By default, no address is used.
537 GFX7 only. Cannot be used with :ref:`offen<amdgpu_synid_offen>` and
538 :ref:`idxen<amdgpu_synid_idxen>` modifiers.
540 ======================================== ================================================
542 ======================================== ================================================
543 addr64 A 64-bit address is used.
544 ======================================== ================================================
546 .. _amdgpu_synid_buf_offset12:
551 Specifies an immediate unsigned 12-bit offset, in bytes. The default value is 0.
553 =============================== ======================================================
555 =============================== ======================================================
556 offset:{0..0xFFF} Specifies a 12-bit unsigned offset as a positive
557 :ref:`integer number <amdgpu_synid_integer_number>`.
558 =============================== ======================================================
570 See a description :ref:`here<amdgpu_synid_glc>`.
575 See a description :ref:`here<amdgpu_synid_slc>`.
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 ======================================== ===========================
593 See a description :ref:`here<amdgpu_synid_tfe>`.
595 .. _amdgpu_synid_dfmt:
602 .. _amdgpu_synid_nfmt:
615 See a description :ref:`here<amdgpu_synid_glc>`.
620 See a description :ref:`here<amdgpu_synid_nv>`.
625 .. _amdgpu_synid_high:
630 Specifies which half of the LDS word to use. Low half of LDS word is used by default.
633 ======================================== ================================
635 ======================================== ================================
636 high Use high half of LDS word.
637 ======================================== ================================
639 VOP1/VOP2 DPP Modifiers
640 -----------------------
644 .. _amdgpu_synid_dpp_ctrl:
649 Specifies how data are shared between threads. This is a mandatory modifier.
650 There is no default value.
652 Note. The lanes of a wavefront are organized in four banks and four rows.
654 ======================================== ================================================
656 ======================================== ================================================
657 quad_perm:[{0..3},{0..3},{0..3},{0..3}] Full permute of 4 threads.
658 row_mirror Mirror threads within row.
659 row_half_mirror Mirror threads within 1/2 row (8 threads).
660 row_bcast:15 Broadcast 15th thread of each row to next row.
661 row_bcast:31 Broadcast thread 31 to rows 2 and 3.
662 wave_shl:1 Wavefront left shift by 1 thread.
663 wave_rol:1 Wavefront left rotate by 1 thread.
664 wave_shr:1 Wavefront right shift by 1 thread.
665 wave_ror:1 Wavefront right rotate by 1 thread.
666 row_shl:{1..15} Row shift left by 1-15 threads.
667 row_shr:{1..15} Row shift right by 1-15 threads.
668 row_ror:{1..15} Row rotate right by 1-15 threads.
669 ======================================== ================================================
671 Note: Numeric parameters may be specified as either
672 :ref:`integer numbers<amdgpu_synid_integer_number>` or
673 :ref:`absolute expressions<amdgpu_synid_absolute_expression>`.
679 quad_perm:[0, 1, 2, 3]
682 .. _amdgpu_synid_row_mask:
687 Controls which rows are enabled for data sharing. By default, all rows are enabled.
689 Note. The lanes of a wavefront are organized in four banks and four rows.
691 ======================================== =====================================================
693 ======================================== =====================================================
694 row_mask:{0..15} Specifies a *row mask* as a positive
695 :ref:`integer number <amdgpu_synid_integer_number>`.
697 Each of 4 bits in the mask controls one
698 row (0 - disabled, 1 - enabled).
699 ======================================== =====================================================
709 .. _amdgpu_synid_bank_mask:
714 Controls which banks are enabled for data sharing. By default, all banks are enabled.
716 Note. The lanes of a wavefront are organized in four banks and four rows.
718 ======================================== =======================================================
720 ======================================== =======================================================
721 bank_mask:{0..15} Specifies a *bank mask* as a positive
722 :ref:`integer number <amdgpu_synid_integer_number>`.
724 Each of 4 bits in the mask controls one
725 bank (0 - disabled, 1 - enabled).
726 ======================================== =======================================================
736 .. _amdgpu_synid_bound_ctrl:
741 Controls data sharing when accessing an invalid lane. By default, data sharing with
742 invalid lanes is disabled.
744 ======================================== ================================================
746 ======================================== ================================================
747 bound_ctrl:0 Enables data sharing with invalid lanes.
749 Accessing data from an invalid lane will
751 ======================================== ================================================
753 VOP1/VOP2/VOPC SDWA Modifiers
754 -----------------------------
761 See a description :ref:`here<amdgpu_synid_clamp>`.
766 See a description :ref:`here<amdgpu_synid_omod>`.
770 .. _amdgpu_synid_dst_sel:
775 Selects which bits in the destination are affected. By default, all bits are affected.
777 ======================================== ================================================
779 ======================================== ================================================
780 dst_sel:DWORD Use bits 31:0.
781 dst_sel:BYTE_0 Use bits 7:0.
782 dst_sel:BYTE_1 Use bits 15:8.
783 dst_sel:BYTE_2 Use bits 23:16.
784 dst_sel:BYTE_3 Use bits 31:24.
785 dst_sel:WORD_0 Use bits 15:0.
786 dst_sel:WORD_1 Use bits 31:16.
787 ======================================== ================================================
790 .. _amdgpu_synid_dst_unused:
795 Controls what to do with the bits in the destination which are not selected
796 by :ref:`dst_sel<amdgpu_synid_dst_sel>`.
797 By default, unused bits are preserved.
799 ======================================== ================================================
801 ======================================== ================================================
802 dst_unused:UNUSED_PAD Pad with zeros.
803 dst_unused:UNUSED_SEXT Sign-extend upper bits, zero lower bits.
804 dst_unused:UNUSED_PRESERVE Preserve bits.
805 ======================================== ================================================
807 .. _amdgpu_synid_src0_sel:
812 Controls which bits in the src0 are used. By default, all bits are used.
814 ======================================== ================================================
816 ======================================== ================================================
817 src0_sel:DWORD Use bits 31:0.
818 src0_sel:BYTE_0 Use bits 7:0.
819 src0_sel:BYTE_1 Use bits 15:8.
820 src0_sel:BYTE_2 Use bits 23:16.
821 src0_sel:BYTE_3 Use bits 31:24.
822 src0_sel:WORD_0 Use bits 15:0.
823 src0_sel:WORD_1 Use bits 31:16.
824 ======================================== ================================================
826 .. _amdgpu_synid_src1_sel:
831 Controls which bits in the src1 are used. By default, all bits are used.
833 ======================================== ================================================
835 ======================================== ================================================
836 src1_sel:DWORD Use bits 31:0.
837 src1_sel:BYTE_0 Use bits 7:0.
838 src1_sel:BYTE_1 Use bits 15:8.
839 src1_sel:BYTE_2 Use bits 23:16.
840 src1_sel:BYTE_3 Use bits 31:24.
841 src1_sel:WORD_0 Use bits 15:0.
842 src1_sel:WORD_1 Use bits 31:16.
843 ======================================== ================================================
845 .. _amdgpu_synid_sdwa_operand_modifiers:
847 VOP1/VOP2/VOPC SDWA Operand Modifiers
848 -------------------------------------
850 Operand modifiers are not used separately. They are applied to source operands.
857 See a description :ref:`here<amdgpu_synid_abs>`.
862 See a description :ref:`here<amdgpu_synid_neg>`.
864 .. _amdgpu_synid_sext:
869 Sign-extends value of a (sub-dword) operand to fill all 32 bits.
870 Has no effect for 32-bit operands.
872 Valid for integer operands only.
874 ======================================== ================================================
876 ======================================== ================================================
877 sext(<operand>) Sign-extend operand value.
878 ======================================== ================================================
890 .. _amdgpu_synid_vop3_op_sel:
895 Selects the low [15:0] or high [31:16] operand bits for source and destination operands.
896 By default, low bits are used for all operands.
898 The number of values specified with the op_sel modifier must match the number of instruction
899 operands (both source and destination). First value controls src0, second value controls src1
900 and so on, except that the last value controls destination.
901 The value 0 selects the low bits, while 1 selects the high bits.
903 Note. op_sel modifier affects 16-bit operands only. For 32-bit operands the value specified
908 ======================================== ============================================================
910 ======================================== ============================================================
911 op_sel:[{0..1},{0..1}] Select operand bits for instructions with 1 source operand.
912 op_sel:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
913 op_sel:[{0..1},{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
914 ======================================== ============================================================
923 .. _amdgpu_synid_clamp:
928 Clamp meaning depends on instruction.
930 For *v_cmp* instructions, clamp modifier indicates that the compare signals
931 if a floating point exception occurs. By default, signaling is disabled.
932 Not supported by GFX7.
934 For integer operations, clamp modifier indicates that the result must be clamped
935 to the largest and smallest representable value. By default, there is no clamping.
936 Integer clamping is not supported by GFX7.
938 For floating point operations, clamp modifier indicates that the result must be clamped
939 to the range [0.0, 1.0]. By default, there is no clamping.
941 Note. Clamp modifier is applied after :ref:`output modifiers<amdgpu_synid_omod>` (if any).
943 ======================================== ================================================
945 ======================================== ================================================
946 clamp Enables clamping (or signaling).
947 ======================================== ================================================
949 .. _amdgpu_synid_omod:
954 Specifies if an output modifier must be applied to the result.
955 By default, no output modifiers are applied.
957 Note. Output modifiers are applied before :ref:`clamping<amdgpu_synid_clamp>` (if any).
959 Output modifiers are valid for f32 and f64 floating point results only.
960 They must not be used with f16.
962 Note. *v_cvt_f16_f32* is an exception. This instruction produces f16 result
963 but accepts output modifiers.
965 ======================================== ================================================
967 ======================================== ================================================
968 mul:2 Multiply the result by 2.
969 mul:4 Multiply the result by 4.
970 div:2 Multiply the result by 0.5.
971 ======================================== ================================================
973 .. _amdgpu_synid_vop3_operand_modifiers:
975 VOP3 Operand Modifiers
976 ----------------------
978 Operand modifiers are not used separately. They are applied to source operands.
980 .. _amdgpu_synid_abs:
985 Computes absolute value of its operand. Applied before :ref:`neg<amdgpu_synid_neg>` (if any).
986 Valid for floating point operands only.
988 ======================================== ================================================
990 ======================================== ================================================
991 abs(<operand>) Get absolute value of operand.
992 \|<operand>| The same as above.
993 ======================================== ================================================
1002 .. _amdgpu_synid_neg:
1007 Computes negative value of its operand. Applied after :ref:`abs<amdgpu_synid_abs>` (if any).
1008 Valid for floating point operands only.
1010 ======================================== ================================================
1012 ======================================== ================================================
1013 neg(<operand>) Get negative value of operand.
1014 -<operand> The same as above.
1015 ======================================== ================================================
1027 This section describes modifiers of *regular* VOP3P instructions.
1029 *v_mad_mix_f32*, *v_mad_mixhi_f16* and *v_mad_mixlo_f16*
1030 instructions use these modifiers :ref:`in a special manner<amdgpu_synid_mad_mix>`.
1034 .. _amdgpu_synid_op_sel:
1039 Selects the low [15:0] or high [31:16] operand bits as input to the operation
1040 which results in the lower-half of the destination.
1041 By default, low bits are used for all operands.
1043 The number of values specified by the *op_sel* modifier must match the number of source
1044 operands. First value controls src0, second value controls src1 and so on.
1046 The value 0 selects the low bits, while 1 selects the high bits.
1048 ================================= =============================================================
1050 ================================= =============================================================
1051 op_sel:[{0..1}] Select operand bits for instructions with 1 source operand.
1052 op_sel:[{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1053 op_sel:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1054 ================================= =============================================================
1063 .. _amdgpu_synid_op_sel_hi:
1068 Selects the low [15:0] or high [31:16] operand bits as input to the operation
1069 which results in the upper-half of the destination.
1070 By default, high bits are used for all operands.
1072 The number of values specified by the *op_sel_hi* modifier must match the number of source
1073 operands. First value controls src0, second value controls src1 and so on.
1075 The value 0 selects the low bits, while 1 selects the high bits.
1077 =================================== =============================================================
1079 =================================== =============================================================
1080 op_sel_hi:[{0..1}] Select operand bits for instructions with 1 source operand.
1081 op_sel_hi:[{0..1},{0..1}] Select operand bits for instructions with 2 source operands.
1082 op_sel_hi:[{0..1},{0..1},{0..1}] Select operand bits for instructions with 3 source operands.
1083 =================================== =============================================================
1092 .. _amdgpu_synid_neg_lo:
1097 Specifies whether to change sign of operand values selected by
1098 :ref:`op_sel<amdgpu_synid_op_sel>`. These values are then used
1099 as input to the operation which results in the upper-half of the destination.
1101 The number of values specified by this modifier must match the number of source
1102 operands. First value controls src0, second value controls src1 and so on.
1104 The value 0 indicates that the corresponding operand value is used unmodified,
1105 the value 1 indicates that negative value of the operand must be used.
1107 By default, operand values are used unmodified.
1109 This modifier is valid for floating point operands only.
1111 ================================ ==================================================================
1113 ================================ ==================================================================
1114 neg_lo:[{0..1}] Select affected operands for instructions with 1 source operand.
1115 neg_lo:[{0..1},{0..1}] Select affected operands for instructions with 2 source operands.
1116 neg_lo:[{0..1},{0..1},{0..1}] Select affected operands for instructions with 3 source operands.
1117 ================================ ==================================================================
1126 .. _amdgpu_synid_neg_hi:
1131 Specifies whether to change sign of operand values selected by
1132 :ref:`op_sel_hi<amdgpu_synid_op_sel_hi>`. These values are then used
1133 as input to the operation which results in the upper-half of the destination.
1135 The number of values specified by this modifier must match the number of source
1136 operands. First value controls src0, second value controls src1 and so on.
1138 The value 0 indicates that the corresponding operand value is used unmodified,
1139 the value 1 indicates that negative value of the operand must be used.
1141 By default, operand values are used unmodified.
1143 This modifier is valid for floating point operands only.
1145 =============================== ==================================================================
1147 =============================== ==================================================================
1148 neg_hi:[{0..1}] Select affected operands for instructions with 1 source operand.
1149 neg_hi:[{0..1},{0..1}] Select affected operands for instructions with 2 source operands.
1150 neg_hi:[{0..1},{0..1},{0..1}] Select affected operands for instructions with 3 source operands.
1151 =============================== ==================================================================
1163 See a description :ref:`here<amdgpu_synid_clamp>`.
1165 .. _amdgpu_synid_mad_mix:
1167 VOP3P V_MAD_MIX Modifiers
1168 -------------------------
1170 *v_mad_mix_f32*, *v_mad_mixhi_f16* and *v_mad_mixlo_f16* instructions
1171 use *op_sel* and *op_sel_hi* modifiers
1172 in a manner different from *regular* VOP3P instructions.
1174 See a description below.
1178 .. _amdgpu_synid_mad_mix_op_sel:
1183 This operand has meaning only for 16-bit source operands as indicated by
1184 :ref:`m_op_sel_hi<amdgpu_synid_mad_mix_op_sel_hi>`.
1185 It specifies to select either the low [15:0] or high [31:16] operand bits
1186 as input to the operation.
1188 The number of values specified by the *op_sel* modifier must match the number of source
1189 operands. First value controls src0, second value controls src1 and so on.
1191 The value 0 indicates the low bits, the value 1 indicates the high 16 bits.
1193 By default, low bits are used for all operands.
1195 =============================== ================================================
1197 =============================== ================================================
1198 op_sel:[{0..1},{0..1},{0..1}] Select location of each 16-bit source operand.
1199 =============================== ================================================
1207 .. _amdgpu_synid_mad_mix_op_sel_hi:
1212 Selects the size of source operands: either 32 bits or 16 bits.
1213 By default, 32 bits are used for all source operands.
1215 The number of values specified by the *op_sel_hi* modifier must match the number of source
1216 operands. First value controls src0, second value controls src1 and so on.
1218 The value 0 indicates 32 bits, the value 1 indicates 16 bits.
1220 The location of 16 bits in the operand may be specified by
1221 :ref:`m_op_sel<amdgpu_synid_mad_mix_op_sel>`.
1223 ======================================== ====================================
1225 ======================================== ====================================
1226 op_sel_hi:[{0..1},{0..1},{0..1}] Select size of each source operand.
1227 ======================================== ====================================
1238 See a description :ref:`here<amdgpu_synid_abs>`.
1243 See a description :ref:`here<amdgpu_synid_neg>`.
1248 See a description :ref:`here<amdgpu_synid_clamp>`.