What does rm do for FSUB.H?
rm selects the floating-point rounding mode; rm=111 uses dynamic frm. If the result is exactly representable, rounding does not change the example value, but the encoded field still matters.
Half-precision floating-point subtraction, OP-FP fmt=H(10).
FSUB.H performs half-precision floating-point subtraction on two FP source operands, rounds according to the rm field or dynamic frm, writes the result to FP register rd, and records fflags according to RISC-V floating-point rules.
Shows the Zfh-extension half-precision OP-FP flow: decode fields, read FP operands, perform FSUB 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 whitelisted inputs and nonzero result are exactly representable. With initial fflags=0, no flags are added under any legal rounding mode. Zero, special values, and rounding boundaries are outside this animation.
The whitelisted inputs and nonzero result are exactly representable. With initial fflags=0, no flags are added under any legal rounding mode. Zero, special values, and rounding boundaries are outside this animation.
Assumes the extension is available, FS enabled, correctly NaN-boxed inputs, and initial fflags=0. Only nonzero finite exact whitelisted inputs and nonzero whitelisted results are accepted; zero and rounding/exception boundaries are outside this animation. One source register must have one initial value; rd may overlap a source, and f0 accepts writeback. 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.
FSUB.H is a Zfh-extension half-precision OP-FP arithmetic instruction. It decodes funct5=00001 with fmt=H(10), reads f[rs1] and f[rs2], performs subtraction, rounds by rm/frm, and writes f[rd].
Understand this scenario with real code like «fsub.h f0, f1, f2, rne # f0 = f1 - f2».
rm selects the floating-point rounding mode; rm=111 uses dynamic frm. If the result is exactly representable, rounding does not change the example value, but the encoded field still matters.
FSUB.H writes FP register f[rd]. RISC-V floating-point exceptions are accrued in fflags, not reported through integer condition codes.