v_mad_i64_i32 GPU Native ISA AMD Vector
Vector Arithmetic
Multiply two signed integer inputs, add a third signed integer input, store the result into a 64-bit vector register and store the overflow/carryout…
Also written as
v_mad_co_i64_i32.
AMD's machine-readable ISA specification lists this name for the same instruction.
Encoding
The VOP3_SDST_ENC layout from AMD's machine-readable ISA specification (AMD CDNA 4). Opcode 489 in OP rebuilds 0x00000000D1E90000, an identifier AMD lists for this encoding. Not the same in every generation: AMD RDNA 3.5 (layout not verifiable), AMD RDNA 3 (layout not verifiable), AMD RDNA 2 (layout not verifiable), AMD RDNA 1 (layout not verifiable). The same in AMD CDNA 3, AMD CDNA 2, AMD CDNA 1.
Operands
-
VDST
Written. N/A Data format: N/A (OPR_VGPR, FMT_NUM_I64) -
SDST
Written. N/A Data format: N/A (OPR_SREG, FMT_NUM_M64) -
SRC0
Read. N/A Data format: N/A (OPR_SRC_NOLIT, FMT_NUM_I32) -
SRC1
Read. N/A Data format: N/A (OPR_SRC_SIMPLE, FMT_NUM_I32) -
SRC2
Read. N/A Data format: N/A (OPR_SRC_SIMPLE, FMT_NUM_I64)
In AMD's order, as its machine-readable ISA specification lists them for the VOP3_SDST_ENC encoding (AMD CDNA 4).
GFX Target Compatibility
Per-target GFX compatibility has not yet been verified for this instruction.
In VOP3 the VCC destination may be an arbitrary SGPR-pair.
Related
More in Vector Arithmetic
Reference
Description
Semantics
Example
v_mad_i64_i32 v[5:6], s6, s105, s105, s[6:7]A real instruction accepted by the LLVM assembler, taken verbatim from LLVM's own AMDGPU MC test suite. Not from an AMD document, and not authored here.
Sources
- User Guide for AMDGPU Backend ↗ - LLVM Project
-
"AMD Instinct MI300" Instruction Set Architecture: Reference Guide ↗
- Advanced Micro Devices, Inc.
Reference Guide, page 349. - LLVM MC assembler tests for AMDGPU ↗ - LLVM Project
- AMD Machine-Readable GPU ISA Specification ↗ - Advanced Micro Devices, Inc.