How does the encoding identify quad-precision square root?
opcode=1010011 enters OP-FP, funct5=01011 selects FSQRT, fmt=11 selects the Q quad-precision format, and rs2 is fixed to 00000.
Quad-precision floating-point square root: rd = sqrt(rs1).
FSQRT.Q computes the quad-precision floating-point square root, rounds according to rm or the dynamic rounding mode, and writes rd. A negative nonzero finite operand or -infinity produces canonical NaN and sets NV; sqrt(-0) remains -0.
Shows the Q-extension quad-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; quad-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 Q-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.Q is Q-extension quad-precision floating-point square root. It uses OP-FP encoding with funct5=01011, fmt=Q(11), and rs2 fixed to 00000; it reads the rs1 quad-precision value, rounds according to rm or dynamic frm, and writes rd.
Understand this scenario with real code like «fsqrt.q f0, f1, rne # f0 = sqrt(f1)».
Understand this scenario with real code like «fsqrt.q f0, f1, rne # f0 = sqrt(f1)».
opcode=1010011 enters OP-FP, funct5=01011 selects FSQRT, fmt=11 selects the Q quad-precision format, and rs2 is fixed to 00000.
No. The official FP rules preserve sqrt(-0)=-0; negative nonzero finite numbers and -infinity take the invalid-operation/NaN path.