Why does FSQRT.S 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 single-precision floating-point square root: f[rd] = sqrt(f[rs1]).
FSQRT.S uses OP-FP encoding with fmt=S to compute the square root of one single-precision floating-point operand, rounds according to rm or dynamic frm, and writes FP register rd. The encoded rs2 field is fixed to 00000; negative nonzero inputs, NaNs, infinities, and inexact results produce results and fflags according to the RISC-V F-extension FP rules.
Shows the F-extension single-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; single-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 F-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.S is the F-extension single-precision square root. It has one source FP register; the encoding still contains rs2 but fixes it to 00000. rm/frm controls rounding and fflags records applicable FP exceptions.
Understand this scenario with real code like «fsqrt.s f0, f1 # f0 = sqrt(f1) (RNE)».
Understand this scenario with real code like «fsqrt.s 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.