FCVT.WU.H

Convert Half to Unsigned Word

FCVT.WU.H rd, rs1

Converts a 16-bit floating-point number to a 32-bit unsigned integer.

Encoding

Binary Layout
110001000001
31:20
rs1
19:15
rm
14:12
rd
11:7
1010011
6:0
 
Format I-Type (Float)
Opcode 0xC4100053
Extension Zfh

Operands

  • rd
    Destination integer register
  • rs1
    Floating-point register

Example

FCVT.WU.H t0, fa0

Related

More in Zfh

Description

Converts the half-precision value in rs1 to an unsigned 32-bit integer in rd. RV64 sign-extends the 32-bit result. If the rounded value is out of range it is clipped to the nearest representable value and the invalid-operation flag is set; NaN and +infinity give the largest value (2^32-1), -infinity the smallest (0). Rounding follows the rm field; inexact is set if the result differs and invalid is not set.

Operation

R[rd] = sext(f16_to_u32(F[rs1]));