Home/Instructions/VFRSQRT7-V
VFRSQRT7.V

RISC-V VFRSQRT7.V Instruction Details

Instruction ManualR-type

Compute approximate 1/√x (7-bit accuracy) for each float element of vs2, writing to vd.

Instruction Syntax

vfrsqrt7.v vd, vs2, vm
Operand Breakdown
Destination rd: register receiving the operation result.
Source rs1: register holding the first operand.
Source rs2: register holding the second operand.
VZvfhVector OperationsFloating-Point

Instruction Behavior

VFRSQRT7.V produces the 7-bit floating-point estimate defined by the V extension. Special inputs such as zeros, infinities, NaNs, and negatives follow the spec tables; do not describe it as ordinary division/square-root rounded by frm. Vector FP32/FP64 operation requires the corresponding scalar F/D support; FP16 is controlled by the relevant vector half-precision extensions, and the base V extension does not automatically include half-precision arithmetic.

Quick Understanding & Search Notes

VFRSQRT7.V is a table-defined 7-bit estimate instruction, not ordinary FP divide or square-root.

The operation applies only to active elements within vl; inactive and tail elements follow the current vma/vta policy.
vm=0 uses v0 as the execution mask and vm=1 is unmasked.
Special-case results and exception flags should be handled using the official estimate-instruction tables.
Vector FP32/FP64 operation requires the corresponding scalar F/D support; FP16 is controlled by the relevant vector half-precision extensions, and the base V extension does not automatically include half-precision arithmetic.

Common Usage Scenarios

Vector Normalization

Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfrsqrt7.v v1, v2 # v1[i] ≈ 1/√v2[i] (7-bit)».

Newton-Raphson

Understand this scenario with real code like «vsetvli t0, a0, e32, m1, ta, ma vfrsqrt7.v v1, v2 # v1[i] ≈ 1/√v2[i] (7-bit)».

Pre-Use Checklist

Syntax Check
  • Confirm the current instruction format is R-type.
  • Confirm the operand order matches the example.
Semantic Check
  • Ensure the destination register usage is compatible with the calling convention.
  • Confirm this is not the lower-level form of a pseudo-instruction expansion.

Pitfalls / Common Confusions

Check the official special-case tables for zeros, infinities, NaNs, and negative inputs; do not label the zero-input result implementation-defined.
The estimate has limited precision and usually needs later refinement for high precision.
Vector FP32/FP64 operation requires the corresponding scalar F/D support; FP16 is controlled by the relevant vector half-precision extensions, and the base V extension does not automatically include half-precision arithmetic.

FAQ

Is the estimate result implementation-defined?

No. The V extension defines the 7-bit estimate and special-input handling rules.