Check vl first
The current vl determines the number of body elements. Typical code executes vsetvli, vsetivli, or vsetvl before this instruction.
VFSQRT.V is an RVV single-width unary floating-point square-root instruction with syntax vfsqrt.v vd, vs2, vm; each active element computes vd[i] = sqrt(vs2[i]).
VFSQRT.V uses the OP-V VFUNARY1 form and has only vs2 and vm as source syntax operands; the encoded vs1 field selects the square-root operation and is not a user-written source register. Results, rounding, negative inputs, NaNs, infinities, and exception flags follow the official RVV floating-point rules; fixed-point vxrm does not control this instruction.
Decode the OP-V encoding and execute the VFUNARY1 square-root operation lane by lane: each active lane computes sqrt(vs2[i]).
V-extension FP instructions use the OP-V major opcode, with funct6, source registers, vm, funct3, vd, and opcode fields.
VFSQRT.V is unary vector FP square root: it reads only vs2 elements and writes sqrt(vs2[i]) to vd[i]; the encoded vs1 field is an operation selector, not a syntax source operand.
When reading VFSQRT.V, do not stop at the mnemonic. Official V-extension semantics also depend on the current vl, vtype, and mask state. The suffix and operand form determine whether sources are vector, scalar, or immediate values.
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 vfsqrt.v v1, v2 # v1[i] = sqrt(v2[i])».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfsqrt.v v1, v2 # v1[i] = sqrt(v2[i])».
Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfsqrt.v v1, v2 # v1[i] = sqrt(v2[i])».
With vm=0, only active elements selected by v0.t execute; vm=1 is unmasked. The page formula is vd[i] = sqrt(vs2[i]).
No. Ordinary RVV floating-point operations use the floating-point rounding mode frm and set FP exception flags; vxrm is for fixed-point rounding instructions.
Negative inputs, NaN operands, and infinity inputs are handled by the FP rules. Results, rounding, and fflags follow the official RVV floating-point rules; this page does not simplify them into integer-style fixed results.