Does it use integer or floating-point registers?
rd, rs1, and rs2 all select FP registers; f0 is writable and does not follow the integer x0 discard rule.
Performs single-precision floating-point subtraction: rd = rs1 - rs2; rm=111 selects dynamic frm, while reserved rm encodings have reserved behavior.
FSUB.S is an F-extension OP-FP R-type instruction: it subtracts the single-precision value in rs2 from rs1 and writes FP register rd. fmt=00 selects single precision; rm selects static rounding and rm=111 uses frm. Static rm=101--110 and reserved dynamic-frm encodings have reserved behavior.
Shows the F-extension single-precision OP-FP flow: decode fields, read FP operands, perform FSUB semantics, then write rd.
The word is split as an R-type OP-FP instruction; single-precision OP-FP instructions use opcode 1010011.
This animation accepts only finite whitelisted examples whose inputs and result are exactly checkable; this example needs no rounding and sets no FP exception flags. NaN, infinity, overflow, underflow, and inexact paths are covered in static text.
This animation accepts only finite whitelisted examples whose inputs and result are exactly checkable; this example needs no rounding and sets no FP exception flags. NaN, infinity, overflow, underflow, and inexact paths are covered in static text.
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 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.
FSUB.S is an OP-FP arithmetic instruction from the RISC-V F extension. It reads two single-precision FP registers, rounds rs1-rs2 by rm/frm, and writes the result to FP register rd.
Understand this scenario with real code like «fsub.s f0, f1, f2, rne # f0 = round_RNE(f1 - f2)».
Understand this scenario with real code like «fsub.s f0, f1, f2, rne # f0 = round_RNE(f1 - f2)».
rd, rs1, and rs2 all select FP registers; f0 is writable and does not follow the integer x0 discard rule.
rm selects the rounding mode, or uses frm for the dyn encoding. For inexact results, the rounding mode affects the written value and may set fflags.
The F extension accrues floating-point exceptions in fflags; setting these flags does not itself generate a trap. An unavailable extension or disabled FP state is a separate issue.