drdpq

Decimal Round To DFP Quad-Precision

drdpq FRT, vB

Rounds DFP Quad (128-bit) to DFP Long (64-bit).

Details

Round a DFP quad (128-bit) value from VSR vB to DFP long (64-bit) precision using the rounding mode in FPSCR[RN], and store the result in FPR FRT. This is a Decimal Floating-Point (DFP) instruction. FPSCR status fields are updated to reflect rounding or conversion results.

Pseudocode Operation

long_value ← round_dfp_quad_to_long(vB, FPSCR[RN])
FRT ← long_value
FPSCR[...] ← updated as per rounding

Programming Note

The drdpq instruction is used for rounding decimal floating-point numbers to quad-precision. Ensure that the input number in FRA[p] is within the valid range for quad-precision format to avoid overflow or underflow exceptions. The rounding mode is controlled by the FPSCR register, so make sure it's set according to your application's requirements before executing drdpq.

Example

drdpq f1, vb

Encoding

Binary Layout
63
0
FRT
6
/
11
vB
16
770
21
/
31
 
Format X-form
Opcode 0xFC000604
Extension Decimal Floating-Point
Registers Altered FPSCR

Operands

  • FRT
    Target Long
  • vB
    Source Quad