fmv.x.h
Move half-precision value from floating-point to integer register
This instruction is defined by:
-
anyOf:
-
Zfh, version >= 0
-
Zfhmin, version >= 0
-
This instruction is included in the following profiles:
-
RVA22S64 (Mandatory)
-
RVA22U64 (Mandatory)
Synopsis
Moves the half-precision value in floating-point register rs1 represented in IEEE 754-2008 encoding to the lower 16 bits of integer register rd.
The bits are not modified in the transfer, and in particular, the payloads of non-canonical NaNs are preserved.
The highest XLEN-16 bits of the destination register are filled with copies of the floating-point number’s sign bit.
Execution
-
IDL
-
Sail
check_f_ok($encoding);
X[rd] = sext(f[fs1][15:0], 16);
{
let rs1_val_X = X(rs1);
let rd_val_H = rs1_val_X [15..0];
F(rd) = nan_box (rd_val_H);
RETIRE_SUCCESS
}