Skip to content

Modifier field

Word0 bits [7:4] hold a 4-bit modifier. Its meaning depends on the opcode. Values range from 0 through 15.

Opcode 0x1B uses these modifiers:

ModifierOperation
0frsqrt
1frcp
2ffloor
3fceil
4fround
5ftrunc
6ffract
7fsat
8fsin
9fcos
10fexp2
11flog2

fsqrt, fabs, and fneg have separate opcodes.

Atomic modifiers select addition, subtraction, minimum, maximum, bitwise AND, OR, XOR, exchange, and compare-and-swap. Compare-and-swap uses value 8.

Wave reductions use modifiers 8 through 13 for addition, minimum, maximum, bitwise AND, OR, and XOR. Control-flow operations use opcode 0x3F with modifiers 0 through 7. Synchronization operations share that opcode with modifiers 8 through 15.

The modifier does not overlap register or predicate fields. Memory scope belongs to word1 for scoped instructions. See Binary encoding for the complete layout.