drrnd.

DFP Reround

drrnd. RA, RB

Rerounds a decimal floating-point number to the specified precision.

Details

The drrnd instruction rerounds a decimal floating-point number in register RA to the precision specified by the rounding mode in the FPSCR (Floating-Point Status and Control Register). The result is placed back into register RA.

Pseudocode Operation

if 'drrnd.' then
    RA <- Reround(RA, FPSCR.RM)

Programming Note

The drrnd instruction is used to reround a decimal floating-point number in register RA according to the rounding mode specified in the FPSCR. Ensure that the FPSCR's rounding mode is set appropriately before executing this instruction to achieve the desired precision. This instruction operates at user privilege level and does not raise exceptions under normal circumstances, but it may alter the contents of CR0 if an exception occurs during execution.

Example

drrnd. r4, r5

Encoding

Binary Layout
59
0
FRT
6
FRA
11
FRB
16
RMC
21
35
23
Rc
31
 
Format Z23-form
Opcode 0xEC000047
Extension Decimal Floating-Point
Registers Altered FPSCR, CR0

Operands

  • RA
    Target Decimal Floating-Point Register
  • RB
    Source Decimal Floating-Point Register