dquaq

Decimal Quantize Quad-Precision

dquaq vD, vA, vB

Adjusts exponent of 128-bit DFP number.

Details

Quantizes a 128-bit decimal floating-point number in vA to match the exponent of the reference value in vB, producing a result in vD. The operation adjusts the exponent and coefficient of the source operand while preserving the value's significance. Rounding is performed if necessary according to the current DFP rounding mode in FPSCR. The instruction is part of the Decimal Floating-Point extension.

Pseudocode Operation

vD ← QuantizeDFP128(vA, vB, FPSCR[RN])

Programming Note

The dquaq instruction is used to convert and round a decimal floating-point number to a specified exponent. Ensure the operand is correctly aligned and check the FPSCR for rounding mode settings. This instruction operates at the problem state privilege level and may raise exceptions if overflow occurs or if invalid operands are provided.

Example

dquaq vd, va, vb

Encoding

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

Operands

  • vD
    Target
  • vA
    Source
  • vB
    Reference