VSX Instructions
290 PowerISA instructions in this extension - showing 90 per page, page 3 of 3 - click any row for encoding, pseudocode, and full documentation.
| Mnemonic | Syntax | Format | Summary |
|---|---|---|---|
| xvcvuxddp | xvcvuxddp VRT, VRA, VRB | XX2-form | Converts an unsigned doubleword vector element to a double-precision floating-point value. |
| xvcvuxdsp | xvcvuxdsp VS32,VS64 | XX2-form | Converts an unsigned doubleword to a single-precision floating-point value with rounding. |
| xvcvuxwsp | xvcvuxwsp XT, XB | XX2-form | Converts four 32-bit unsigned integers to four floats. |
| xvdivdp | xvdivdp XT, XA, XB | XX3-form | Divides the contents of two vector registers and places the result in another vector register. |
| xvdivsp | xvdivsp XT, XA, XB | XX3-form | Divides the contents of two vector registers and places the result in another vector register. |
| xvi8ger4spp | xvi8ger4spp AT,XA,XB | XX3-form | Performs a vector-scalar operation on 8-bit signed and unsigned integers with saturation. |
| xviexpdp | xviexpdp XT,XA,XB | XX3-form | Inserts the exponent from one vector register into another for double-precision floating-point numbers. |
| xvmaddadp | xvmaddadp XT, XA, XB | XX3-form | Performs a double-precision floating-point multiply-add operation on vector elements. |
| xvmaddasp | xvmaddasp XT,XA,XB | XX3-form | Performs a single-precision floating-point multiply-add operation on vector elements. |
| xvmaxdp | xvmaxdp XT, XA, XB | XX3-form | Compares two double-precision floating-point values and selects the maximum value for each element. |
| xvmaxsp | xvmaxsp XT, XA, XB | XX3-form | Computes the maximum of corresponding single-precision floating-point elements in two vector registers and stores the result in a third vector register. |
| xvmindp | xvmindp XT, XA, XB | XX3-form | Compares two double-precision floating-point values and selects the minimum value for each element. |
| xvminsp | xvminsp XT, XA, XB | XX3-form | Performs a minimum operation on single-precision floating-point values from two vector scalar registers and stores the result in another vector scalar register. |
| xvmsubadp | xvmsubadp XT,XA,XB | XX3-form | Performs a double-precision floating-point multiply-subtract operation on vector elements. |
| xvmsubasp | xvmsubasp XT,XA,XB | XX3-form | Performs a vector multiply-subtract operation on single-precision floating-point values. |
| xvmsubmdp | xvmsubmdp VRT, VRA, VRB, VRC | XX3-form | Multiplies corresponding double-precision floating-point elements of two VSX registers, subtracts the corresponding element of a third register, and stores the results, using the Type-M (multiplicand) form. |
| xvmuldp | xvmuldp XT, XA, XB | XX3-form | Multiplies two double-precision floating-point numbers in vector registers and stores the result. |
| xvmulsp | xvmulsp XT, XA, XB | XX3-form | Multiplies the contents of two single-precision floating-point values and places the result into a vector register. |
| xvnabsdp | xvnabsdp XT,XB | XX2-form | Computes the negative absolute value of each double-precision floating-point element in a vector. |
| xvnegdp | xvnegdp XT, XB | XX2-form | Negates the contents of a double-precision floating-point vector register and stores the result in another vector register. |
| xvnegsp | xvnegsp XT, XB | XX2-form | Negates the contents of a single-precision floating-point register. |
| xvnmaddadp | xvnmaddadp XT,XA,XB | XX3-form | Performs a negative multiply-add operation on double-precision floating-point elements. |
| xvnmaddasp | xvnmaddasp XT,XA,XB | XX3-form | Performs a negative multiply-add operation on single-precision floating-point elements. |
| xvnmaddmsp | xvnmaddmsp XT,XA,XB | XX3-form | Performs a vector single-precision floating-point negative multiply-add operation (Type-M), computing the negation of (XB * XT + XA) for each single-precision element. |
| xvnmsubadp | xvnmsubadp XT,XA,XB | XX3-form | Performs a negative multiply-subtract operation on double-precision floating-point elements. |
| xvnmsubasp | xvnmsubasp XT,XA,XB | XX3-form | Performs a negative multiply-subtract operation on single-precision floating-point elements. |
| xvnmsubmdp | xvnmsubmdp VRT, VRA, VRB, VRC | XX3-form | Performs a negative multiply-subtract operation on double-precision floating-point values. |
| xvrdpi | xvrdpi XT,XB | XX2-form | Rounds each element of a double-precision floating-point vector to the nearest integer away from zero. |
| xvrdpic | xvrdpic XT,XB | XX2-form | Rounds each double-precision floating-point element of a vector to an integer using the current rounding mode. |
| xvrdpim | xvrdpim XT,XB | XX2-form | Rounds the contents of a vector register towards negative infinity and stores the result in another vector register. |
| xvrdpiz | xvrdpiz XT,XB | XX2-form | Rounds each double-precision floating-point element in a vector towards zero and stores the result as an integer. |
| xvredp | xvredp XT,XB | XX2-form | A double-precision floating-point estimate of the reciprocal of src is placed into doubleword element i of VSR[XT] in double-precision format. |
| xvresp | xvresp XT,XB | XX2-form | Estimates the reciprocal of single-precision floating-point values in a vector. |
| xvrspi | xvrspi XT,XB | XX2-form | Rounds each element of a vector from single-precision floating-point format to an integer using round to Nearest Away. |
| xvrspic | xvrspic XT,XB | XX2-form | Rounds each single-precision floating-point element of a vector to an integer using the current rounding mode. |
| xvrspim | xvrspim XT,XB | XX2-form | Rounds each element of a vector from single-precision floating-point format to integer format, rounding towards negative infinity. |
| xvrspiz | xvrspiz XT,XB | XX2-form | Rounds each single-precision floating-point element of a vector towards zero and stores the result in another vector. |
| xvrsqrtedp | xvrsqrtedp XT,XB | XX2-form | Estimates the reciprocal square root of double-precision floating-point values in vector registers. |
| xvrsqrtesp | xvrsqrtesp XT,XB | XX2-form | Estimates the reciprocal square root of single-precision floating-point values in a vector. |
| xvsqrtdp | xvsqrtdp XT, XB | XX2-form | Computes the square root of each double-precision floating-point element in a vector. |
| xvsqrtsp | xvsqrtsp XT, XB | XX2-form | Computes the square root of each single-precision floating-point element in a vector. |
| xvsubdp | xvsubdp XT, XA, XB | XX3-form | Subtracts the contents of two vector registers and places the result in a target vector register. |
| xvsubsp | xvsubsp XT, XA, XB | XX3-form | Subtracts the contents of two vector registers and places the result in another vector register. |
| xvtdivdp | xvtdivdp BF,XA,XB | XX3-form | Performs a double-precision floating-point division on vector elements and sets condition flags based on the results. |
| xvtdivsp | xvtdivsp BF,XA,XB | XX3-form | Performs a vectorized single-precision floating-point division test. |
| xvtlsbb | xvtlsbb BF,XB | XX2-form | Tests the least-significant bit of each byte in a VSX vector register and sets a condition register field based on the results. |
| xvtsqrtdp | xvtsqrtdp BF,XB | XX2-form | Tests the double-precision floating-point operands in VSR[XB] and sets condition register field BF based on certain conditions. |
| xvtsqrtsp | xvtsqrtsp BF,XB | XX2-form | Tests each element of a vector for conditions related to square root operations. |
| xvtstdcdp | xvtstdcdp XT,XB,DCMX | XX2-form | Tests each double-precision floating-point element in a vector against specified data classes and sets the corresponding elements in another vector to either all ones or all zeros based on the match. |
| xvtstdcsp | xvtstdcsp XT,XB,DCMX | XX2-form | Tests each single-precision floating-point element in a vector against specified data classes and sets the corresponding elements in another vector based on the match. |
| xvxexpdp | xvxexpdp XT,XB | XX2-form | Extracts the exponent from each double-precision floating-point value in a vector and places it into another vector. |
| xvxsigdp | xvxsigdp XT,XB | XX2-form | Extracts the significand of double-precision floating-point values from a vector register and places them into another vector register. |
| xxblendvb | xxblendvb XT, XA, XB, XC | XX4-form | Selects bytes from XA or XB based on the MSB of bytes in XC. |
| xxblendvd | xxblendvd XT, XA, XB, XC | XX4-form | Selects doublewords from XA or XB based on the MSB of doublewords in XC. |
| xxblendvh | xxblendvh XT, XA, XB, XC | XX4-form | Selects halfwords from XA or XB based on the MSB of halfwords in XC. |
| xxblendvw | xxblendvw XT, XA, XB, XC | XX4-form | Selects words from XA or XB based on the MSB of words in XC. |
| xxbrd | xxbrd XT,XB | XX-form | Reverses the bytes of each doubleword element in a vector register. |
| xxbrh | xxbrh XT,XB | XX2-form | Reverses the bytes of each halfword in a vector register. |
| xxbrw | xxbrw XT,XB | XX2-form | Reverses the bytes of each word in a vector register. |
| xxeval | xxeval XT, XA, XB, XC, IMM | 8RR:XX4-form | Performs an arbitrary 3-input boolean logic function (LUT3) on vectors. The 8-bit immediate 'IMM' defines the truth table. |
| xxextractuw | xxextractuw RT, XS, UIM | XX2-form | Extracts an unsigned word from a vector register and places it into another vector register. |
| xxgenpcvbm | xxgenpcvbm XT, XB, IMM | XX2-form | Generates a permute control vector based on the byte mask in VSR[VRB+32]. |
| xxgenpcvdm | xxgenpcvdm XT, XB, IMM | XX2-form | Generates a permute control vector (PCV) based on the doubleword mask in VSR[VRB+32] and stores it in VSR[XT]. |
| xxgenpcvhm | xxgenpcvhm XT, XB, IMM | XX2-form | Generates a permute control vector (PCV) based on the halfword mask in VSR[VRB+32]. |
| xxgenpcvwm | xxgenpcvwm XT, XB, IMM | XX2-form | Generates a permute control vector (PCV) based on the word mask in VSR[VRB+32] and stores it in VSR[XT]. |
| xxinsertw | xxinsertw XT, RB, UIM | XX2-form | Inserts a 32-bit word from a GPR into a specific element of a VSR. |
| xxland | xxland XT, XA, XB | XX3-form | Performs a bitwise AND operation on the contents of two vector registers and stores the result in another vector register. |
| xxlandc | xxlandc XT, XA, XB | XX3-form | vD = vA & ~vB |
| xxleqv | xxleqv XT, XA, XB | XX3-form | vD = ~(vA ^ vB) (XNOR) |
| xxlnand | xxlnand XT, XA, XB | XX3-form | vD = ~(vA & vB) |
| xxlnor | xxlnor XT, XA, XB | XX3-form | Performs a logical NOR operation on the contents of two VSX registers and stores the result in another VSX register. |
| xxlor | xxlor XT, XA, XB | XX3-form | Bitwise OR. |
| xxlorc | xxlorc XT, XA, XB | XX3-form | vD = vA | ~vB |
| xxlxor | xxlxor XT, XA, XB | XX3-form | Bitwise XOR. |
| xxmrghd | xxmrghd XT, XA, XB | XX3-form | Merges high doublewords from XA and XB. |
| xxmrghw | xxmrghw XT, XA, XB | XX3-form | Merges the high words of two VSX registers into a target VSX register. |
| xxmrgld | xxmrgld XT, XA, XB | XX3-form | Merges low doublewords from XA and XB. |
| xxmrglw | xxmrglw XT, XA, XB | XX3-form | Merges low words from two VSRs. |
| xxperm | xxperm XT, XA, XB, XC | XX4-form | Performs a vector permute operation on the contents of three VSX registers. |
| xxpermdi | xxpermdi XT, XA, XB, DM | XX3-form | Selects two doublewords from the four available in source registers XA and XB based on a 2-bit selector. |
| xxpermr | xxpermr XT, XA, XB, XC | XX4-form | Little-endian optimized permute. |
| xxpermx | xxpermx XT, XA, XB, XC, UIM | XX4-form | Permutes bytes from two source vectors using a control vector and a 3-bit selector. |
| xxsel | xxsel XT, XA, XB, XC | XX4-form | Selects elements from two source vectors based on a mask vector. |
| xxsldwi | xxsldwi XT,XA,XB,SHW | XX3-form | Shifts the contents of two vector registers left by a specified number of words and places the result into another vector register. |
| xxsplti32dx | xxsplti32dx XT, IX, IMM | 8RR:D-form | Splats a 32-bit immediate into a doubleword index. |
| xxspltib | xxspltib XT, IMM | X-form | Copies an immediate byte value into each byte element of a vector register. |
| xxspltidp | xxspltidp XT, IMM | 8RR:D-form | Spatially duplicates a 32-bit immediate (converted to double) into both double elements. |
| xxspltiw | xxspltiw XT, IMM | 8RR:D-form | Spatially duplicates a 32-bit immediate into all 4 words of the target. |
| xxspltw | xxspltw XT, XS, UIM | XX2-form | Replicates a word element from one vector register into all elements of another vector register. |
| xxswapd | xxswapd XT, XB | XX2-form | Swaps the two doublewords in the register. |