xxsldwi
VSX Vector Shift Left Double by Word Immediate
Shifts the contents of two vector registers left by a specified number of words and places the result into another vector register.
Details
The xxsldwi instruction shifts the contents of VSR[XA] and VSR[XB] left by SHW words and places the result into VSR[XT].
Pseudocode Operation
Programming Note
The xxsldwi instruction is commonly used for shifting vector elements by a specified number of words. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register to avoid exceptions. The shift amount must be within the range of 0 to 3, as it specifies the word position to align the result. This instruction operates at the user privilege level and does not generate exceptions for valid shifts; however, misalignment or exceeding the shift limit can lead to undefined behavior.
Example
Encoding
Operands
-
XT
Target Vector Register -
XA
Source Vector Register -
XB
Source Vector Register -
SHW
Shift Amount in Words -
VRT
Target Vector Register -
VRA
Source Vector Register -
VRB
Source Vector Register -
SH
Shift Amount (Immediate)