FMUL.D
RISC-V FMUL.D Instruction Details
Instruction ManualR-typeDouble-precision floating-point multiplication: rd = rs1*rs2.
Instruction Syntax
fmul.d rd, rs1, rs2, rm
Operand Breakdown
rd: destination floating-point register receiving the formatted result.
rs1/rs2: source floating-point registers; arithmetic/rounding forms with rm use rm or dynamic frm for rounding mode.
DFloating-Point Arithmetic
Instruction Behavior
FMUL.D performs double-precision floating-point multiplication: rd = rs1 × rs2. R-type, fmt=D(01). Rounding mode by rm. Inputs must be properly NaN-boxed. Double precision provides approximately 15-17 decimal digits.
Common Usage Scenarios
Numerical Computing
Understand this scenario with real code like «fmul.d f0, f1, f2, rne # f0 = f1*f2 (round nearest even)».
Scientific Computing
Understand this scenario with real code like «fmul.d f0, f1, f2, rne # f0 = f1*f2 (round nearest even)».
Floating-Point Basic
Understand this scenario with real code like «fmul.d f0, f1, f2, rne # f0 = f1*f2 (round nearest even)».
Pre-Use Checklist
Syntax Check
- Confirm the current instruction format is R-type.
- Confirm the operand order matches the example.
Semantic Check
- Ensure the destination register usage is compatible with the calling convention.
- Confirm this is not the lower-level form of a pseudo-instruction expansion.
Pitfalls / Common Confusions
be aware of NaN-boxing constraints