diex

Decimal Insert Exponent

diex FRT, FRA, FRB

Combines a sign/coefficient from FRA and exponent from FRB.

Details

The Decimal Insert Exponent (diex) instruction adjusts the exponent of a decimal floating-point number. It takes two operands, FRA and FRB, and inserts the exponent from FRA into FRB, producing the result in FRT.

Pseudocode Operation

FRT ← AdjustExponent(FRB, ExtractExponent(FRA))

Programming Note

The diex instruction is used to adjust the exponent of a decimal floating-point number by inserting the exponent from one operand (FRA) into another (FRB). Ensure that both operands are properly aligned and in the correct format to avoid exceptions. This operation requires FPSCR to manage rounding modes and exception flags.

Example

diex f1, f2, f3

Encoding

Binary Layout
59
0
FRT
6
FRA
11
FRB
16
866
21
/
31
 
Format X-form
Opcode 0xEC0006C4
Extension Decimal Floating-Point
Registers Altered FPSCR

Operands

  • FRT
    Target
  • FRA
    Coeff Source
  • FRB
    Exp Source