Decimal Floating-Point Instructions
60 PowerISA instructions in this extension - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| bcdadd. | bcdadd. VRT,RA,RB | XO-form | Adds two packed decimal integers and updates the condition register. |
| bcdcpsgn. | bcdcpsgn. VRT,VRA,VRB | VX-form | Copies the sign of a decimal value from one register to another while preserving the magnitude. |
| bcds. | bcds. VRT,VRA,VRB,PS | VX-form | Shifts a signed packed decimal value by a specified number of digits and rounds the result. |
| bcdsetsgn. | bcdsetsgn. VRT,VRB,PS | VX-form | Sets the sign of a packed decimal value in a vector register based on the specified conditions. |
| bcdtrunc. | bcdtrunc. VRT,VRA,VRB,PS | VX-form | Truncates a decimal value to a specified length and updates the condition register. |
| ctfix | ctfix FRT,FRA | X-form | Converts a decimal floating-point value to a fixed-point integer. |
| dadd | dadd FRT,FRA,FRB | X-form | Adds two 64-bit Decimal Floating Point (DFP) numbers. Used in financial calculations to avoid rounding errors. |
| daddq | daddq vD, vA, vB | X-form | Adds two 128-bit DFP numbers. |
| dcffix | dcffix FRT, FRB | X-form | Converts a 64-bit integer to DFP. |
| dcffixq | dcffixq vD, vB | X-form | Converts 64-bit integer to 128-bit DFP. |
| dcmpo | dcmpo BF, FRA, FRB | X-form | Compares two decimal floating-point operands and updates the condition register. |
| dcmpoq | dcmpoq BF, vA, vB | X-form | Compares two DFP values and sets the condition register based on their order. |
| dcmpu | dcmpu BF, FRA, FRB | X-form | Compares two DFP operands and sets the CR field to indicate the result. |
| dcmpuq | dcmpuq BF, vA, vB | X-form | Compares two 128-bit DFP numbers (Non-signaling). |
| dctdp | dctdp FRT, FRB | X-form | Converts DFP Short (32-bit compressed) to DFP Long (64-bit). |
| dctfix | dctfix FRT,FRB | X-form | Converts a decimal floating-point number to a fixed-point integer. |
| dctfix. | dctfix. FRT,FRB | X-form | Converts a decimal floating-point number to a fixed-point integer. |
| dctfixq | dctfixq vD, vB | X-form | Converts 128-bit DFP to 64-bit integer. |
| dctqpq | dctqpq vD, FRB | X-form | Converts DFP Long (64-bit) to DFP Quad (128-bit). |
| ddedpd | ddedpd SP,FRT,FRB | X-form | Converts a portion of the significand of a DFP operand to a signed or unsigned BCD number. |
| ddedpd. | ddedpd. SP,FRT,FRB | X-form | Converts a portion of the significand of a DFP operand to a signed or unsigned BCD number. |
| ddedpdq | ddedpdq vD, vB, SP | X-form | Decodes BCD to 128-bit DFP. |
| ddiv | ddiv FRT,FRA,FRB | X-form | Divides the contents of two decimal floating-point registers and places the result in a target register. |
| ddiv. | ddiv. FRT,FRA,FRB | X-form | Divides the contents of two decimal floating-point registers and places the result in a target register. |
| ddivq | ddivq vD, vA, vB | X-form | Divides two 128-bit DFP numbers. |
| denbcd | denbcd FRT, FRB, S | X-form | Encodes a DFP number into BCD format. |
| denbcdq | denbcdq vD, vB, S | X-form | Encodes 128-bit DFP to BCD. |
| diex | diex FRT, FRA, FRB | X-form | Combines a sign/coefficient from FRA and exponent from FRB. |
| diexq | diexq vD, vA, vB | X-form | Inserts exponent into 128-bit DFP. |
| diexq. | diexq. RT,RA,RB | X-form | Inserts the biased exponent from a source register into a destination register in quad format. |
| dmul | dmul FRT,FRA,FRB | X-form | Multiplies the contents of two DFP registers and places the result in another DFP register. |
| dmul. | dmul. FRT,FRA,FRB | X-form | Multiplies the contents of two DFP registers and places the result in another DFP register. |
| dmulq | dmulq vD, vA, vB | X-form | Multiplies two 128-bit DFP numbers. |
| dqua | dqua FRT,FRA,FRB,RMC | X-form | Adjusts the exponent of a DFP number to match a reference. Critical for aligning decimal points before addition. |
| dqua. | dqua. FRT,FRA,FRB,RMC | X-form | Adjusts the exponent of a DFP number to match a reference. Critical for aligning decimal points before addition. |
| dquai | dquai TE,FRT,FRB,RMC | Z23-form | Adjusts the value to a form having the specified exponent in the range -16 to 15. |
| dquai. | dquai. TE,FRT,FRB,RMC | Z23-form | Quantizes a DFP value to an immediate number of decimal digits. |
| dquaq | dquaq vD, vA, vB | X-form | Adjusts exponent of 128-bit DFP number. |
| drdpq | drdpq FRT, vB | X-form | Rounds DFP Quad (128-bit) to DFP Long (64-bit). |
| drintn | drintn R,FRT,FRB,RMC | Z23-form | Rounds a decimal floating-point number to an integer without recognizing an inexact exception. |
| drintn. | drintn. R,FRT,FRB,RMC | Z23-form | Rounds a decimal floating-point number to an integer without recognizing an inexact exception. |
| drintx | drintx R,FRT,FRB,RMC | Z23-form | Rounds a decimal floating-point number to the nearest integer and places it into a floating-point register. |
| drintx. | drintx. R,FRT,FRB,RMC | Z23-form | Rounds a decimal floating-point number to the nearest integer and places it into a floating-point register. |
| drrnd | drrnd FRT,FRA,FRB,RMC | Z23-form | Rounds a decimal floating-point value to the specified number of significant digits. |
| drrnd. | drrnd. FRT,FRA,FRB,RMC | Z23-form | Rerounds a decimal floating-point number to the specified precision. |
| drrndq | drrndq vD, vA, vB | X-form | Rerounds a 128-bit DFP number to fewer digits. |
| drsp | drsp FRT,FRB | X-form | Rounds DFP Long (64-bit) to DFP Short (32-bit compressed). |
| drsp. | drsp. FRT,FRB | X-form | Rounds DFP Long (64-bit) to DFP Short (32-bit compressed). |
| dscli | dscli FRT,FRA,SH | Z23-form | Shifts the significand of a DFP operand left by a specified number of digits. |
| dsri | dsri FRT, FRA, SH | Z23-form | Shifts the coefficient of a DFP number right. |
| dsub | dsub FRT,FRA,FRB | X-form | Subtracts the contents of two DFP registers and places the result in another DFP register. |
| dsubq | dsubq vD, vA, vB | X-form | Subtracts two 128-bit DFP numbers. |
| dtstdc | dtstdc BF,FRA,DCM | Z22-form | Tests the data class of a DFP operand and sets the CR field. |
| dtstex | dtstex BF,FRA,FRB | X-form | Compares the exponent values of two DFP operands and updates CR field BF and FPCC. |
| dtstsf | dtstsf BF,FRA,FRB | X-form | Tests the significance of a DFP value in FPR[FRB] against a reference significance. |
| dtstsfi | dtstsfi BF, U, FRB | X-form | Tests the significance of a decimal floating-point value in FPR[FRB] against an immediate value UIM. |
| dtstsfiq | dtstsfiq BF, U, FRB | X-form | Tests DFP Quad significance. |
| dxex | dxex FRT,FRB | X-form | Extracts the biased exponent of a DFP operand in FRB and places it into FRT. |
| dxex. | dxex. FRT,FRB | X-form | Extracts the biased exponent of a DFP operand in FRB and places it into FRT. |
| dxexq | dxexq vD, vB | X-form | Extracts exponent from 128-bit DFP. |