xxmrglw
VSX Vector Merge Low Word
Merges low words from two VSRs.
Details
The VSX Vector Merge Low Word instruction (xxmrglw) merges the low words from two source vectors and places them into a destination vector. Specifically, it takes the second word (word element 2) from the first source vector and the third word (word element 3) from the second source vector and combines them into the destination vector.
Pseudocode Operation
Programming Note
The xxmrglw instruction is commonly used for merging specific word elements from two VSX vectors into a new vector. Ensure that the VSX facility is enabled by checking and setting the appropriate bit in the MSR register. This instruction operates on 128-bit vectors, so source and destination registers must be properly aligned. Be cautious of potential exceptions if the VSX facility is not available or if there are alignment issues with the vector registers.
Example
Encoding
Operands
-
XT
Target -
XA
Src A -
XB
Src B