dctfixq
Decimal Convert To Fixed Quad-Precision
Converts 128-bit DFP to 64-bit integer.
Details
Converts a 128-bit decimal floating-point number from vB into a 64-bit signed integer, storing the result in vD. The conversion rounds toward zero (truncates). If the DFP value is out of range for a 64-bit integer or is NaN, the result is undefined and FPSCR status flags may be set. The instruction is part of the Decimal Floating-Point extension.
Pseudocode Operation
vD ← ConvertToFixedDFP128(vB, FPSCR[RN])
Programming Note
The dctfixq instruction is used to convert a DFP Extended value to a 64-bit signed integer. It rounds the result and preserves the sign of the source operand. If the source is zero, the result is explicitly set to +0. This instruction operates at the FPSCR privilege level and may raise exceptions based on rounding modes or overflow conditions.
Example
Encoding
Operands
-
vD
Target -
vB
Source