drintx

Decimal Floating-Point Round To FP Integer With Inexact

drintx R,FRT,FRB,RMC

drintx. R,FRT,FRB,RMC

Rounds a decimal floating-point number to the nearest integer and places it into a floating-point register.

Details

The DFP operand in FRB is rounded to a floating-point integer and placed into FRT. The sign of the result is the same as the sign of the operand in FRB. The ideal exponent is the larger value of zero and the exponent of the operand in FRB. The rounding mode used is specified by RMC.

Pseudocode Operation

if 'drintx' then
    FRT <- round(FRB, RMC)
    if result differs from FRB then
        raise inexact exception

Programming Note

When Rc=1, CR1 is set from the FPSCR[FX, FEX, VX, OX] bits immediately after the operation completes.

Extended Mnemonics

Extended Mnemonic Equivalent Instruction

Example

drintx 0, f1, f3, 0

Encoding

Binary Layout
0
0
R
6
FRT
11
FRB
15
RMC
16
Rc
21
 
Format Z23-form
Opcode 0xEC0000C6
Extension Decimal Floating-Point
Registers Altered FPSCR, (FPRF, FR, FI, FX, XX), VXSNAN, CR1, (if, Rc=1), CR0

Operands

  • R
    Rounding mode control bit
  • FRT
    Target Floating-Point Register
  • FRB
    Source Floating-Point Register
  • RMC
    Rounding mode control field