diexq

Decimal Insert Exponent Quad-Precision

diexq vD, vA, vB

Inserts exponent into 128-bit DFP.

Encoding

Binary Layout
63
0:5
vD
6:10
vA
11:15
vB
16:20
866
21:30
/
31
 
Format X-form
Opcode 0xFC0006C4

Operands

  • vD
    Target
  • vA
    Coeff
  • vB
    Exp

Example

diexq vd, va, vb

Registers Altered

FPSCR

Related

More in Decimal Floating-Point

Reference

Description

Inserts a 64-bit signed exponent from vB into a 128-bit DFP coefficient from vA, producing a complete 128-bit DFP number in vD. The coefficient in vA is interpreted as having an exponent of zero, and the exponent from vB replaces it. The resulting value may be a normal number, zero, or special value depending on the inputs. The instruction is part of the Decimal Floating-Point extension.

Operation

vD ← InsertExponentDFP128(vA, vB)

Programming Note

The `diexq` instruction is used to insert the biased exponent from one decimal floating-point (DFP) operand into another. Ensure both operands are properly aligned and that the FPSCR register is correctly configured for desired rounding modes and exception handling. This instruction operates at the problem state privilege level, so ensure your program has the appropriate privileges. Be cautious of potential exceptions such as invalid operations or overflow, which may require additional error handling code.