dctfixq
Decimal Convert To Fixed Quad-Precision
dctfixq vD, vB
Converts 128-bit DFP to 64-bit integer.
Encoding
Binary Layout
63
0:5
vD
6:10
0
11:15
vB
16:20
290
21:30
/
31
Operands
-
vD
Target -
vB
Source
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.