FCVT.W.D

Convert Double to Word

FCVT.W.D rd, rs1

Converts a double-precision float to a 32-bit signed integer.

Details

Converts between floating-point types or between floating-point and integer. Result is rounded according to the dynamic rounding mode. Invalid conversions produce the IEEE default NaN or the appropriate integer saturation value.

Pseudocode Operation

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

Example

FCVT.W.D x10, f0

Encoding

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

Operands

  • rd
    Dest (Int)
  • rs1
    Source (Double)