ddedpd

Decode DPD To BCD (Single Precision)

ddedpd SP,FRT,FRB

Converts a portion of the significand of a DFP operand to a signed or unsigned BCD number.

Encoding

Binary Layout
59
0:5
FRT
6:10
SP
11:12
/
13:15
FRB
16:20
322
21:30
Rc
31
 
Format X-form
Opcode 0xEC000284

Operands

  • FRT
    Target
  • FRB
    Source
  • SP
    Sign Control

Example

ddedpd 0, f1, f3

Registers Altered

FPSCR, (FPRF, FX, VXCVI), FPSCR, (FR, set, to, 0), CR1, (if, Rc=1), CR0

Related

More in Decimal Floating-Point

Reference

Description

The rightmost 16 digits of the significand (32 digits for ddedpdq) is converted to an unsigned BCD number and the result is placed into FRT[p].

Operation

if 'ddedpd' then
    if SP = 0 then
        FRT <- unsigned BCD conversion of rightmost 16 digits of FRB[p]
    else if SP = 1 then
        FRT <- signed BCD conversion of rightmost 15 digits of FRB[p] with the same sign as FRB[p]
    end if

Programming Note

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