dctfixq

Decimal Convert To Fixed Quad-Precision

dctfixq vD, vB

Converts 128-bit DFP to 64-bit integer.

Details

The dctfixq instruction converts a DFP Extended value from FRB to a 64-bit signed binary integer and places it into FRTp. The result is rounded, and the sign of the result matches the source operand's sign.

Pseudocode Operation

FRTp ← RoundToNearest(FRB)
SetSign(FRTp, GetSign(FRB))
If FRB is zero, then FRTp ← +0
SetFPSCRFields()

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

dctfixq vd, vb

Encoding

Binary Layout
63
0
vD
6
0
11
vB
16
290
21
/
31
 
Format X-form
Opcode 0xFC000242
Extension Decimal Floating-Point
Registers Altered FPSCR

Operands

  • vD
    Target
  • vB
    Source