Is rs2 a source register in fcvt.q.s?
No. rs2=00000 selects source format S; the assembly operands are rd, rs1, and optional rm.
Exactly widen single-precision to quad-precision FP; rm is still decoded normally.
rd is FP f0–f31, including writable f0; rs1 is FP f0–f31. rs2 selects the source type; no immediate.
32-bit OP-FP: funct5=01000, fmt=11 (destination Q), rs2=00000, opcode=1010011.
RV32/RV64 Q; Q depends on D, which depends on F. Enable required extensions and FP state. Finite conversion is exact and legal rm leaves the value unchanged.
Optional assembly rm defaults to dyn, using frm; software should select rne (000). Static rm=101/110 and dynamic frm=101–111 have reserved behavior even for exact conversions.
The upper 96 bits of the S source must all be 1; invalid NaN-boxing is treated as a canonical S NaN. rd may overlap rs1: read the original source before writing the Q result.
The Q result fills FLEN=128. Exceptions accrue in fflags; exact finite examples set no new flags and do not clear existing flags. Steps are teaching views.
fcvt.q.s converts the single-precision value in FP register rs1 to a quad-precision result in FP register rd. Finite widening is exact, but rm still exists; software should select RNE (000), with normal decoding of legal and reserved encodings.
Shows the Q-extension FCVT flow: decode OP-FP fields, fmt/rs2 conversion selection, the rm rounding field, read the floating-point source, then write the floating-point destination.
Leave rm empty for the assembly default dyn (111); this DYN example fixes frm=RNE. Use lowercase rne/rtz/rdn/rup/rmm/dyn only.
Assume required extensions and FP state are enabled, applicable source NaN-boxing is valid, and initial fflags=0. Results preview the current input; Writeback represents commit.
The word is split as an R-type OP-FP instruction; FCVT uses opcode 1010011.
S-to-Q is a floating-point widening conversion; the current finite example is exact, does not need rm rounding, and leaves example fflags at 0.
S-to-Q is a floating-point widening conversion; the current finite example is exact, does not need rm rounding, and leaves example fflags at 0.
This animation shows only Q-extension FCVT ISA-visible encoding, source/destination register direction, rounding field, and example fflags; it does not model FPU pipelines, exception handling, NaN payloads, or microarchitecture.
fcvt.q.s converts the single-precision value in FP register rs1 to a quad-precision result in FP register rd. Finite widening is exact, but rm still exists; software should select RNE (000), with normal decoding of legal and reserved encodings.
Understand this scenario with real code like «# f1 contains a correctly NaN-boxed S value 1.5; initial fflags = 0 fcvt.q.s f0, f1, rne # f0 = Q value 1.5 exactly; fflags = 0».
No. rs2=00000 selects source format S; the assembly operands are rd, rs1, and optional rm.
Finite widening is exact, so legal rounding modes leave the value unchanged. rm still exists: software should select rne; omission defaults to dyn, using frm. Reserved encodings retain reserved behavior.
In this form, both rd and rs1 are FP registers; W/WU/L/LU forms convert between integer and FP registers.