How is FMV.X.H different from FCVT?
FMV copies the bit pattern; FCVT performs numeric conversion, can round, and can set exception flags.
Bit-copy a half-precision floating-point encoding to an integer register.
Extension condition: RV32/RV64; requires Zfh 1.0 or Zfhmin 1.0 (both depend on F). In the standard privileged architecture, accessing FP state with FS=Off raises an illegal-instruction exception.
Provided by Zfh or Zfhmin (each depends on F), FMV.X.H bit-copies the half-precision floating-point encoding in f[rs1] into x[rd], filling the upper XLEN-16 integer-register bits with copies of bit 15. This is a bit move, not a floating-point-to-integer numeric conversion; it does not round and sets no floating-point exception flags.
Shows the Zfh/Zfhmin-extension FMV.X.H bit-pattern move: decode OP-FP fields, read the source bit pattern, then write the destination without numeric conversion.
Assumes required extensions and enabled FP state. Integer input covers XLEN bits; FP input supplies only the selected format's bit slice, ignoring upper NaN-box bits.
The word is split as an R-type OP-FP instruction; FMV bit moves use opcode 1010011.
FMV.X.H copies half-precision bit 15 into the upper 16 bits of the XLEN=32 integer result; it does not perform numeric conversion.
This animation shows only Zfh/Zfhmin-extension FMV ISA-visible encoding and bit-pattern movement; it does not model FPU pipelines, numeric FP interpretation, exception handling, or microarchitecture.
FMV.X.H's core idea is bit-pattern movement. Use FCVT for numeric conversion and rounding; use FMV forms when preserving NaN payloads or inspecting raw encodings.
Understand this scenario with real code like «fmv.x.h x10, f0 # f0[15:0]=0xC100 -> RV32: 0xFFFFC100; RV64: 0xFFFFFFFFFFFFC100».
Understand this scenario with real code like «fmv.x.h x10, f0 # f0[15:0]=0xC100 -> RV32: 0xFFFFC100; RV64: 0xFFFFFFFFFFFFC100».
FMV copies the bit pattern; FCVT performs numeric conversion, can round, and can set exception flags.
No. It is neither arithmetic nor numeric conversion.