FCVT.H.WU
Convert Unsigned Word to Half
FCVT.H.WU rd, rs1
Converts a 32-bit unsigned integer to a 16-bit floating-point number.
Encoding
Binary Layout
110101000001
31:20
rs1
19:15
rm
14:12
rd
11:7
1010011
6:0
Operands
-
rd
Destination floating-point register -
rs1
Source integer register
Example
FCVT.H.WU ft0, a0
Related
More in Zfh
Reference
View in RISC-V Unprivileged ISA Specification ↗
RISC-V ISA Manual
Description
Converts the unsigned 32-bit integer in rs1 to a half-precision value in rd. The result is rounded according to the rm field and inexact is set if it differs from the integer (values above 65504 overflow to infinity or the largest finite value depending on rm).
Operation
F[rd] = u32_to_f16(R[rs1]);