FMVH.X.D

RISC-V FMVH.X.D Instruction Details

Instruction ManualR-type

On RV32, copy the high 32 bits of a double floating-point register to an integer register.

Instruction Syntax

fmvh.x.d rd, rs1
Operand Breakdown
rd: integer register x0–x31; x0 discards writes.
rs1: the only FP source f0–f31. No immediate or rm operand.
Encoded rs2=00001 is a fixed selector, not a second source; equally numbered x/f registers belong to different register files.
ZfaDData Movement

Extension condition: RV32 only; requires Zfa 1.0 and D 2.2. In the standard privileged architecture, accessing FP state with FS=Off raises an illegal-instruction exception.

Instruction Behavior

FMVH.X.D is a Zfa bit-move instruction for RV32+D that copies bits 63:32 of f[rs1] into x[rd]. Together with FMV.X.W it can split a double-precision encoding into two integer registers; this is a bit copy, not a numeric conversion.

FMVH.X.D Decode And Execute Animation

Shows the Zfa + D (RV32 only)-extension FMVH.X.D bit-pattern move: decode OP-FP fields, read the source bit pattern, then write the destination without numeric conversion.

rd
rs1
fmvh.x.d
,
Execution Context
fmt=D (01)
FLEN>=64

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.

31..27
26..25
24..20
19..15
14..12
11..7
6..0
11100
funct5=to-x
01
fmt=D
00001
rs2=00001
01011
rs1
000
funct3=000
01010
rd
1010011
OP-FP
Execution Data Path
instruction
0xE2158553
opcode
1010011 -> OP-FP
funct5/fmt
11100 + 01 -> funct7 1110001
rs2
00001 fixed for FMVH.X.D
rd/rs1
a0(x10) / fa1(f11)
read bits
fa1(f11) = 0xC00921FB54442D18
bit move
copy FP bits63:32 -> 0xC00921FB
write
Not written yet
Current Step

Fetch: show the 32-bit OP-FP encoding

The word is split as an R-type OP-FP instruction; FMV bit moves use opcode 1010011.

encoding: 0xE2158553
syntax : fmvh.x.d a0(x10), fa1(f11)
result : Not written yet
Bit-Pattern Move View
FP source bits
0xC00921FB54442D18
unchanged payload
0xC00921FB
writeback
Not written yet

FMVH.X.D is defined only for RV32+D+Zfa and copies f[rs1] bits 63:32 to x[rd]; paired with FMV.X.W, it transfers a double-precision bit pattern.

This animation shows only Zfa + D (RV32 only)-extension FMV ISA-visible encoding and bit-pattern movement; it does not model FPU pipelines, numeric FP interpretation, exception handling, or microarchitecture.

Quick Understanding & Search Notes

FMVH.X.D fills the RV32 path for moving a 64-bit double encoding through 32-bit integer registers. The key points are bit order and that it is not numeric conversion.

32-bit OP-FP encoding: funct7=1110001, rs2=00001, funct3=000, opcode=1010011; rs2 is a fixed selector, not an assembly operand.
FMVH.X.D takes the high 32 bits; FMVP.D.X uses rs1 for the low 32 bits and rs2 for the high 32 bits.
These instructions do not use rm and do not alter NaN payloads.

Common Usage Scenarios

Floating-Point Bit Move

Understand this scenario with real code like «fmvh.x.d x10, f11 # RV32+D+Zfa: f11=0xC00921FB54442D18 -> x10=0xC00921FB».

RV32 Double Data Movement

Understand this scenario with real code like «fmvh.x.d x10, f11 # RV32+D+Zfa: f11=0xC00921FB54442D18 -> x10=0xC00921FB».

Pre-Use Checklist

Syntax Check
  • rd: integer register x0–x31; x0 discards writes.
  • rs1: the only FP source f0–f31. No immediate or rm operand.
  • Encoded rs2=00001 is a fixed selector, not a second source; equally numbered x/f registers belong to different register files.
Semantic Check
  • Confirm this is bit copying, not floating/integer numeric conversion.
  • Confirm destination direction, sign-extension, or NaN-boxing rules for this FMV variant.

Pitfalls / Common Confusions

Defined only for RV32 with Zfa and D; it does not apply to RV64.
This is a bit copy, not an FCVT numeric conversion.
It sets no floating-point exception flags.

FAQ

Is FMVH.X.D an FCVT conversion?

No. It only copies the bit pattern and does not interpret and convert the numeric value.

Why does FMVH.X.D emphasize RV32?

It is defined only for RV32 with Zfa and D. It extracts the high 32 bits; FMV.X.W can separately extract the low 32 bits.