Why does FSQRT.H have no rs2 operand?
FSQRT is a unary FP operation. The machine encoding still has an rs2 field, but it is fixed to 00000; the page animation shows it as an encoded field rather than a syntax input.
Half-precision floating-point square root: rd = sqrt(rs1).
FSQRT.H computes the half-precision floating-point square root, rounds according to rm or the dynamic rounding mode, writes rd, and accrues applicable floating-point exception conditions in fflags.
Shows the Zfh-extension half-precision OP-FP flow: decode fields, read FP operands, perform FSQRT semantics, then write rd.
Leave rm empty to use the assembly default dyn encoding and fcsr.frm below.
The word is split as an R-type OP-FP instruction; half-precision OP-FP instructions use opcode 1010011.
The default example sqrt(2.25)=1.5 is exactly representable, so example fflags remains 0.
The default example sqrt(2.25)=1.5 is exactly representable, so example fflags remains 0.
Assumes the extension and FS are enabled, correctly NaN-boxed input, and initial fflags=0. Only 1, 2.25, and 9 are accepted, producing exact 1, 1.5, and 3 under every legal rounding mode with no flags set. Other inputs stop execution. rd may overlap the source and f0 accepts writes. Steps are teaching views.
This animation shows only Zfh-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.H is Zfh half-precision floating-point square root. It uses OP-FP encoding with funct5=01011, fmt=H(10), and rs2 fixed to 00000; it reads only the rs1 half-precision value, rounds according to rm or dynamic frm, and writes rd.
Understand this scenario with real code like «fsqrt.h f0, f1, rne # f0 = sqrt(f1)».
Understand this scenario with real code like «fsqrt.h f0, f1, rne # f0 = sqrt(f1)».
FSQRT is a unary FP operation. The machine encoding still has an rs2 field, but it is fixed to 00000; the page animation shows it as an encoded field rather than a syntax input.
FSQRT.H's applicable exception flags are NV and NX, accrued in fflags.