dquaq

Decimal Quantize Quad-Precision

dquaq vD, vA, vB

Adjusts exponent of 128-bit DFP number.

Encoding

Binary Layout
63
0:5
vD
6:10
vA
11:15
vB
16:20
66
21:30
/
31
 
Format X-form
Opcode 0xFC000006

Operands

  • vD
    Target
  • vA
    Source
  • vB
    Reference

Example

dquaq vd, va, vb

Registers Altered

FPSCR

Related

More in Decimal Floating-Point

Reference

Description

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.

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.