FMV.D.X

RISC-V FMV.D.X Instruction Details

Instruction ManualR-type

RV64 double-precision bit-pattern move from integer to FP register, with no numeric conversion.

Instruction Syntax

fmv.d.x rd, rs1
Operand Breakdown
rd/rs fields denote integer or floating-point registers depending on the direction of this instruction.
FMV forms copy bit patterns; they are not FCVT numeric conversions and do not use rm.
DFloating-Point Convert

Instruction Behavior

FMV.D.X moves the IEEE 754 double-precision 64-bit encoding between integer and floating-point registers. It does not modify transferred bits and preserves non-canonical NaN payloads; this form is defined only when XLEN>=64. When FLEN>64, the double-precision value written to the FP register is represented as a valid NaN-boxed narrower value.

Quick Understanding & Search Notes

FMV.D.X is for preserving or reinterpreting double-precision encoding bits; it is not an FCVT conversion.

Transferred bits are unchanged, including non-canonical NaN payloads.
The official D extension provides this 64-bit move form only when XLEN>=64.

Common Usage Scenarios

Immediates & Constants

Understand this scenario with real code like «fmv.d.x f0, x10 # f0 gets bits from x10 (NaN-boxed if FLEN>64)».

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

This is a bit-pattern move, not an integer/FP numeric conversion; use FCVT for conversion.
Defined only for XLEN>=64; RV32 has no FMV.D.X/FMV.X.D.
It sets no FP exception flags and does not canonicalize NaN payloads.

FAQ

Does FMV.D.X round?

No. It is only a bit move.

How is FMV.D.X different from FCVT?

FMV preserves encoding bits; FCVT performs numeric conversion and may round or set exception flags.