fmv.x.w
riscv_unified_db)RV32 / RV64 (Ratified & Standard Extensions)
main
userFSummary
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.
Syntax / Encoding
fmv.x.w xd, fs1 | 111000000000xxxxx000xxxxx1010011 (mask=0xfff0707f match=0xe0000053)
Cross-Chip Latency & Throughput (11 cores)
| Microarchitecture | Latency (cycles) | Recip. TP | uops | Ports | Source |
|---|---|---|---|---|---|
| Andes 45-Series | 1 | 1 | 1 | Andes45FMV | llvm_sched_models |
| Tenstorrent Ascalon-X | 1 | 1 | 1 | AscalonFXA | llvm_sched_models |
| SiFive P670 / P600 | 2 | 1 | 1 | SiFiveP600F2I | llvm_sched_models |
| SiFive P870 / P800 | 2 | 1 | 1 | SiFiveP800F2I | llvm_sched_models |
| SiFive 7-Series (U74) | 3 | 1 | 1 | PipeA | llvm_sched_models |
| SpacemiT X100 | 3 | 0.25 | 1 | SMTX100_FQ | llvm_sched_models |
| XiangShan KunMingHu | 3 | 1 | 1 | XSPipeFEX0 | llvm_sched_models |
| XiangShan NanHu | 3 | 0.25 | 1 | XS2FMAC | llvm_sched_models |
| Syntacore SCR7 | 4 | 1 | 2 | FPU_IS+FALU | llvm_sched_models |
| SpacemiT X60 (K1) | 6 | 0.5 | 1 | SMX60_IEU | llvm_sched_models |
| MIPS P8700 (RISC-V) | 7 | 1 | 1 | p8700IssueLSU | llvm_sched_models |
Binary Encodings (1)
| Width | Format | Bit Pattern | Mask / Match |
|---|---|---|---|
| 32 | RV | 111000000000xxxxx000xxxxx1010011 | 0xfff0707f / 0xe0000053 |
Operands
| Name | Description |
|---|---|
fs1 | bits [19:15] |
xd | bits [11:7] |
Reference Notes
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.