fctidz
Floating Convert to Integer Doubleword with Round to Zero
Converts Double to 64-bit Int (Truncate).
Details
Floating Convert to Integer Doubleword with Round to Zero converts the double-precision floating-point value in FRB to a signed 64-bit integer, truncating toward zero (round-to-zero), and places the result in FRT as a floating-point representation. FPSCR is updated with FPRF, FR, and FI flags; exception flags (XX, ZX) are set if applicable.
Pseudocode Operation
FRT ← (int64_t)truncate(FRB)
Update FPSCR[FPRF, FR, FI, XX, ZX]
Programming Note
The fctidz instruction converts a double-precision floating-point value to a signed 64-bit integer, rounding towards zero. If the source value is NaN, it returns 0x8000_0000_0000_0000 and sets VXCVI to 1. If the rounded value exceeds the range of a 64-bit signed integer, it saturates to either 0x7FFF_FFFF_FFFF_FFFF or 0x8000_0000_0000_0000.
Example
Encoding
Operands
-
FRT
Target -
FRB
Source