dquai.
DFP Quantize Immediate
dquai. TE,FRT,FRB,RMC
Quantizes a DFP value to an immediate number of decimal digits.
Encoding
Binary Layout
0
0:5
FRT
6:10
TE
11:15
FRB
16:20
RMC
21:30
Rc
31
Operands
-
TE
Target Exponent -
FRT
Target Floating-Point Register -
FRB
Source Floating-Point Register -
RMC
Rounding Mode Control
Example
dquai. f1, f3, 4
Related
More in Decimal Floating-Point
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Quantizes a decimal floating-point (DFP) value in FRB to the number of decimal digits specified by immediate UI, storing the result in FRT. This instruction is part of the Decimal Floating-Point category and updates FPSCR and CR1 when Rc=1.
Operation
FRT ← Quantize(FRB, UI)
FPSCR ← updated with DFP status
CR1 ← (FRT is NaN, FRT is Infinity, FRT is Zero, FRT is Negative) if Rc=1
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.