Floating-Point Instructions
79 PowerISA instructions in this extension - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| dcffixqq | dcffixqq RT,RA | X-form | Converts a double-precision floating-point value to a quadword integer. |
| fabs | fabs FRT, FRB | X-form | Computes absolute value of a float. |
| fadd | fadd FRT,FRA,FRB | A-form | Adds the contents of two floating-point registers and places the result into another register. |
| fadd. | fadd. FRT,FRA,FRB | A-form | Adds the contents of two floating-point registers and places the result into another register. |
| fcfid | fcfid FRT,FRB | X-form | Converts a signed doubleword integer to a double-precision floating-point number. |
| fcfid. | fcfid. FRT,FRB | X-form | Converts a signed doubleword integer to a double-precision floating-point number. |
| fcfids | fcfids FRT,FRB | X-form | Converts a 64-bit signed fixed-point operand in register FRB to single-precision floating-point. |
| fcfids. | fcfids. FRT,FRB | X-form | Converts a 64-bit signed fixed-point operand in register FRB to single-precision floating-point. |
| fcfidu | fcfidu FRT, FRB | X-form | Converts 64-bit Unsigned Int to Double. |
| fcfidus | fcfidus FRT, FRB | X-form | Converts 64-bit Unsigned Int to Single. |
| fcfidus. | fcfidus. FRT,FRB | X-form | Converts an unsigned doubleword integer in a floating-point register to a single-precision floating-point number, rounding the result. |
| fcmpu | fcmpu BF, FRA, FRB | X-form | Compares two floating-point registers and sets the Condition Register (CR) field. Does not trap on NaNs. |
| fcpsgn | fcpsgn FRT, FRA, FRB | X-form | Copies sign from FRB to FRA. |
| fcpsgn. | fcpsgn. FRT,FRB,FRA | X-form | Copies the sign of one floating-point number to another. |
| fctid | fctid FRT, FRB | X-form | Converts a double-precision floating-point value to a signed 64-bit integer using rounding. |
| fctidu | fctidu FRT,FRB | X-form | Converts a double-precision floating-point value to an unsigned 64-bit integer using rounding. |
| fctidz | fctidz FRT, FRB | X-form | Converts Double to 64-bit Int (Truncate). |
| fctiw | fctiw FRT,FRB | X-form | Converts a float to a 32-bit signed integer (using the current rounding mode) and stores it in the lower half of the FPR. |
| fctiw. | fctiw. FRT,FRB | X-form | Converts a float to a 32-bit signed integer (using the current rounding mode) and stores it in the lower half of the FPR. |
| fctiwu | fctiwu FRT,FRB | X-form | Converts a double-precision floating-point value to an unsigned integer using rounding. |
| fctiwuz | fctiwuz[.] FRT,FRB | X-form | Converts a double-precision floating-point number to an unsigned integer word. |
| fctiwz | fctiwz FRT, FRB | X-form | Converts Double to 32-bit Int (Truncate). |
| fdiv. | fdiv. FC,FA,FB | XO-form | Divides the contents of two floating-point registers and updates the condition register. |
| fdivs | fdivs FRT,FRA,FRB | XO-form | Divides the contents of two single precision floating point registers. |
| fmadd | fmadd FRT,FRA,FRC,FRB | A-form | Performs (A * C) + B with a single rounding step. (The classic FMA). |
| fmadd. | fmadd. FRT,FRA,FRC,FRB | A-form | Performs (A * C) + B with a single rounding step. (The classic FMA). |
| fmr | fmr FRT,FRB | X-form | Copies a float register (Pseudo: for FRB). |
| fmr. | fmr. FRT,FRB | X-form | Copies a float register (Pseudo: for FRB). |
| fmrgew | fmrgew FRT,FRA,FRB | X-form | Merges the even words from two floating-point registers into a third. |
| fmsub | fmsub FRT, FRA, FRC, FRB | A-form | Multiplies two floating-point values and subtracts a third. |
| fmul | fmul FRT,FRA,FRC | A-form | Multiplies the contents of two floating-point registers and places the result into another register. |
| fmul. | fmul. FRT,FRA,FRC | A-form | Multiplies the contents of two floating-point registers and places the result into another register. |
| fnabs | fnabs FRT, FRB | X-form | Computes negative absolute value of a float. |
| fneg | fneg FRT, FRB | X-form | Negates a float. |
| fnmadd | fnmadd FRT,FRA,FRC,FRB | A-form | Performs a floating-point negative multiply-add operation. |
| fnmadd. | fnmadd. FRT,FRA,FRC,FRB | A-form | Performs a floating-point negative multiply-add operation. |
| fnmsub | fnmsub FRT, FRA, FRC, FRB | A-form | -(A*C - B) |
| fre | fre FRT,FRB | A-form | Estimates the reciprocal of a floating-point operand. |
| fre. | fre. FRT,FRB | A-form | Estimates the reciprocal of a floating-point number. |
| fres | fres FRT, FRB | A-form | Estimates the reciprocal of a single-precision floating-point number. |
| frin | frin FRT,FRB | X-form | Rounds the floating-point operand in register FRB to an integral value using the rounding mode round to nearest. |
| frin. | frin. FRT,FRB | X-form | Rounds the floating-point operand in register FRB to an integral value using the rounding mode round to nearest. |
| frip | frip FRT,FRB | X-form | Rounds a floating-point operand towards +infinity and places the result into a register. |
| frip. | frip. FRT,FRB | X-form | Rounds a floating-point operand towards +infinity and places the result into a register. |
| frsp | frsp FRT,FRB | X-form | Rounds the contents of a floating-point register to single-precision. |
| frsp. | frsp. FRT,FRB | X-form | Rounds the contents of a floating-point register to single-precision. |
| frsqrte | frsqrte FRT,FRB | A-form | Estimates the reciprocal of the square root of a floating-point operand. |
| frsqrte. | frsqrte. FRT,FRB | A-form | Estimates the reciprocal of the square root of a floating-point operand. |
| frsqrtes | frsqrtes FRT, FRB | A-form | Estimates 1/sqrt(x) (Single Precision). |
| fsel | fsel FRT,FRA,FRC,FRB | A-form | Selects FRA if FRC >= 0, else FRB (Optional). |
| fsel. | fsel. FRT,FRA,FRC,FRB | A-form | Selects FRA if FRC >= 0, else FRB (Optional). |
| fsqrt | fsqrt FRT,FRB | X-form | Computes the square root of a floating-point number. |
| fsqrt. | fsqrt. FRT,FRB | X-form | Computes the square root of a floating-point number. |
| fsqrts | fsqrts FRT, FRB | X-form | Computes square root (Single). |
| ftdiv | ftdiv BF, FRA, FRB | X-form | Tests the double-precision floating-point operand in register FRB and sets flags based on certain conditions. |
| ftsqrt | ftsqrt BF, FRB | X-form | Tests for conditions that would cause a sqrt exception. |
| lfd | lfd FRT,D(RA) | D-form | Loads a double-precision floating-point value from memory into a floating-point register. |
| lfdp | lfdp FRTp,disp(RA) | DS-form | Loads a doubleword-pair from storage into an even-odd pair of FPRs. |
| lfdu | lfdu FRT,D(RA) | D-form | Loads a doubleword from memory into a floating-point register and updates the base address register. |
| lfs | lfs FRT,D(RA) | D-form | Loads a single-precision floating-point value from memory into a floating-point register and converts it to double precision. |
| lfsu | lfsu FRT,D(RA) | X-form | Loads a floating-point single-precision operand from memory into a register and updates the base address. |
| lfsx | lfsx FT,RA,RB | X-form | Loads a single-precision floating-point value from memory into a floating-point register. |
| mcrfs | mcrfs BF, BFA | X-form | Moves a field from the Floating-Point Status and Control Register (FPSCR) to the Condition Register. |
| mffs | mffs FRT | X-form | Moves the contents of the Floating-Point Status and Control Register (FPSCR) into a floating-point register. |
| mffs. | mffs. FRT | X-form | Moves the contents of the Floating-Point Status and Control Register (FPSCR) into a floating-point register. |
| mffscdrn | mffscdrn FRT,FRB | X-form | Moves control bits from FPSCR to a register and sets the DRN field. |
| mffsl | mffsl FRT | X-form | Moves the control and non-sticky status bits from the FPSCR to a general-purpose register. |
| mtfsb0 | mtfsb0 BT | X-form | Clears a specific bit in the FPSCR. |
| mtfsb1 | mtfsb1 BT | X-form | Sets a specific bit in the FPSCR. |
| mtfsf | mtfsf FLM,FRB,L,W | XFL-form | Moves the contents of a floating-point register into specified fields of the FPSCR. |
| mtfsf. | mtfsf. FLM,FRB,L,W | XFL-form | Moves the contents of a floating-point register into specified fields of the FPSCR. |
| mtfsfi | mtfsfi BF, U | X-form | Writes a 4-bit immediate to a specific FPSCR field. |
| pstfs | pstfs FRT,RA,RB | MLS:D-form | Stores a single-precision floating-point value from a register to memory. |
| stfd | stfd FRS,D(RA) | D-form | Stores a double-precision floating-point value from a register to memory. |
| stfdp | stfdp FRSp,disp(RA) | DS-form | Stores the contents of two floating-point registers into memory as a doubleword pair. |
| stfdux | stfdux FRS,RA,RB | X-form | Stores the contents of a floating-point register into memory and updates the base address register. |
| stfs | stfs FRS,D(RA) | DS-form | Stores a single-precision floating-point value from an FPR to memory. |
| stfsx | stfsx FRS,RA,RB | X-form | Stores a single-precision floating-point value from a register to memory using an indexed address. |
| xsxsigqp | xsxsigqp VRT, VRA | X-form | Extracts the significand of a quad-precision floating-point number. |