Check vl first
The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.
VFMAX.VV is an RVV single-width floating-point maximum selection instruction with syntax vfmax.vv vd, vs2, vs1, vm; each active element compares vs2[i] with vs1[i] and writes the maximum to vd[i].
VFMAX.VV performs lane-wise floating-point maximum selection on active elements within vl. The second source is same-lane vs1[i]; with vm=0, v0.t controls which elements execute, and vm=1 is unmasked. NaN handling, signaling-NaN invalid flag, signed zero, and result selection follow the official RISC-V FMIN/FMAX rules; this is not integer min/max, saturation, or fused multiply-add.
Decode the OP-V encoding and execute lane-wise FP maximum selection with the second source from same-lane vs1.
V-extension FP instructions use the OP-V major opcode, with funct6, source registers, vm, funct3, vd, and opcode fields.
VFMAX.VV is best understood through OP-V encoding, same-lane vs1[i], v0.t masking, and per-active-element vd[i] = max(vs2[i], vs1[i]).
When reading VFMAX.VV, do not stop at the mnemonic. Official V-extension semantics also depend on the current vl, vtype, and mask state. .vv: two vector sources participate element by element.
The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.
The current vtype supplies SEW, LMUL, tail policy, and mask policy; these affect element width, register-group size, and inactive/tail destination elements.
For ordinary vector instructions with vm, vm=0 uses v0 as the execution mask and vm=1 is unmasked. A few forms such as VMERGE use v0 as data-selection input.
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfmax.vv v1, v2, v3 # v1[i] = max(v2[i], v3[i])».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfmax.vv v1, v2, v3 # v1[i] = max(v2[i], v3[i])».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfmax.vv v1, v2, v3 # v1[i] = max(v2[i], v3[i])».
With vm=0, only active elements selected by v0.t execute; vm=1 is unmasked. The page formula is vd[i] = max(vs2[i], vs1[i]).
No. It produces one destination vector element per lane; cross-element min/max reductions use the corresponding vector reduction instructions.
These cases follow the official RISC-V FMIN/FMAX rules, including the invalid-flag rule for signaling NaNs; this page does not simplify them into integer-style comparison.