dquai.
DFP Quantize Immediate
Quantizes a DFP value to an immediate number of decimal digits.
Details
DFP Quantize Immediate converts the DFP value in FRB to have a quantum specified by the immediate field UI, rounding as necessary, and places the result in FRT. The operation adjusts the exponent of the source operand to match the target quantum specified by UI while preserving the numeric value as closely as possible according to the selected rounding mode. This is a Z23-form instruction introduced in PowerISA v2.05 as part of the Decimal Floating-Point (DFP) facility.
Programming Note
The dquai. instruction is used for quantizing DFP values with an immediate quantum, rounding as necessary. Ensure that the immediate field UI specifies a valid quantum and that the source operand FRB is correctly formatted. This instruction operates at the problem state privilege level.
Example
Encoding
Operands
-
FRT
Target Floating-Point Register -
FRB
Source Floating-Point Register -
UI
Immediate Value