denbcdq
Decimal Encode BCD Quad-Precision
denbcdq vD, vB, S
Encodes 128-bit DFP to BCD.
Details
The denbcdq instruction encodes a BCD (Binary-Coded Decimal) value into a DPD (Densely Packed Decimal) format for quad-precision decimal floating-point numbers.
Pseudocode Operation
FRTp ← EncodeBCDtoDPD(FRBp)
Programming Note
The denbcdq instruction is used to convert BCD values into DPD format, which is essential for handling high-precision decimal arithmetic. Ensure that the input data is correctly aligned and formatted as BCD before encoding. This instruction operates at user privilege level and may raise exceptions if the input data contains invalid BCD values.
Example
denbcdq vd, vb, 0
Encoding
Binary Layout
63
0
vD
6
S
11
vB
16
834
21
/
31
Operands
-
vD
Target -
vB
Source -
S
Sign