diexq
Decimal Insert Exponent Quad-Precision
Inserts exponent into 128-bit DFP.
Details
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.
Pseudocode 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.
Example
Encoding
Operands
-
vD
Target -
vA
Coeff -
vB
Exp