xxswapd
VSX Vector Swap Doubleword
Swaps the two doublewords in the register.
Details
The xxswapd instruction swaps the doubleword elements of two VSX registers. If DM.bit[0]=0, it places the contents of doubleword element 0 of VSR[XA] into doubleword element 1 of VSR[XT]. Otherwise, it places the contents of doubleword element 1 of VSR[XA] into doubleword element 1 of VSR[XT].
Pseudocode Operation
Programming Note
The xxswapd instruction swaps doubleword elements between two VSX registers based on the DM bit setting. Ensure that the VSX facility is enabled in the MSR register to avoid a VSX_Unavailable exception. This instruction operates at user privilege level and does not require specific alignment of data.
Example
Encoding
Operands
-
XT
Target -
XB
Source