Why does FSQRT.D have no rs2 operand?
Square root is a unary FP operation. The machine encoding still has an rs2 field, but it is fixed to 00000 and does not correspond to a second source register in assembly syntax.
Computes double-precision floating-point square root: f[rd] = sqrt(f[rs1]).
FSQRT.D uses OP-FP encoding with fmt=D to compute the square root of one double-precision floating-point operand, rounds according to rm or dynamic frm, and writes FP register rd. The encoded rs2 field is fixed to 00000; NaN-boxing, negative nonzero inputs, NaNs, infinities, and inexact results produce results and fflags according to the RISC-V D/F-extension FP rules.
Shows the D-extension double-precision OP-FP flow: decode fields, read FP operands, perform FSQRT semantics, then write rd.
The word is split as an R-type OP-FP instruction; double-precision OP-FP instructions use opcode 1010011.
The default example sqrt(9.0)=3.0 is exactly representable, so example fflags remains 0.
The default example sqrt(9.0)=3.0 is exactly representable, so example fflags remains 0.
This animation shows only D-extension ISA-visible OP-FP encoding, example numeric results, and fflags relationship; it does not model FPU pipelines, latency, every IEEE 754 corner case, or microarchitecture.
FSQRT.D is the D-extension double-precision square root. It has one source FP register; the encoding still contains rs2 but fixes it to 00000. rm/frm controls rounding, while NaN-boxing and fflags follow the official D/F FP rules.
Understand this scenario with real code like «fsqrt.d f0, f1 # f0 = sqrt(f1) (RNE)».
Understand this scenario with real code like «fsqrt.d f0, f1 # f0 = sqrt(f1) (RNE)».
Understand this scenario with real code like «fsqrt.d f0, f1 # f0 = sqrt(f1) (RNE)».
Square root is a unary FP operation. The machine encoding still has an rs2 field, but it is fixed to 00000 and does not correspond to a second source register in assembly syntax.
Negative nonzero inputs follow floating-point invalid-operation rules, producing the specified result and fflags; this is not an integer exception or branch condition.