fmv.x.w
Floating-Point Move Single-Precision Word to Integer Register
- Extension
- F
- XLEN
- RV32 and RV64
- Assembly (riscv-unified-db)
fmv.x.w xd, fs1- Length
- 32-bit
Encoding
| 3127 | 2625 | 2420 | 1915 | 1412 | 117 | 62 | 10 | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 11100 | 00 | 00000 | rs1 | 000 | rd | 10100 | 11 | ||||||||||||||||||||||||
Match 0xe0000053, mask 0xfff0707f. Source: fmv.x.w rd rs1 24..20=0 31..27=0x1C 14..12=0 26..25=0 6..2=0x14 1..0=3 in riscv-opcodes/extensions/rv_f.
| Field | Bits | riscv-opcodes name |
|---|---|---|
| rs1 | 19:15 | rs1 |
| rd | 11:7 | rd |
Description
The fmv.x.w instruction moves the single-precision value in floating-point register fs1` represented in IEEE 754-2008
encoding to the lower 32 bits of integer register xd. The bits are not modified in the transfer, and in particular, the
payloads of non-canonical NaNs are preserved. For RV64, the higher 32 bits of the destination register are filled with copies
of the floating-point number's sign bit.
Description from riscv-unified-db, reformatted.
Operation
check_f_ok($encoding); X[xd] = sext(F[fs1][31:0], 32);
Pseudocode in riscv-unified-db’s IDL, quoted unchanged.