dquai.

DFP Quantize Immediate

dquai. FRT,FRB,UI

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.

Pseudocode Operation

Not available in specification

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

dquai. f1, f3, 4

Encoding

Binary Layout
111011
0
FRT
6
FRB
11
UI
16
..010
21
00011
31
 
Format Z23-form
Opcode 0x7E000000
Extension Decimal Floating-Point

Operands

  • FRT
    Target Floating-Point Register
  • FRB
    Source Floating-Point Register
  • UI
    Immediate Value