vsro
Vector Shift Right by Octet
Shifts vector right by byte count.
Details
The Vector Shift Right by Octet (vsro) instruction shifts the contents of VSR[VRA+32] to the right by the number of bytes specified in bits 121:124 of VSR[VRB+32]. Bits shifted out of byte 15 are lost, and zeros are supplied to the vacated bytes on the left. The result is placed into VSR[VRT+32], unless any byte element in VSR[VRB+32] does not meet the shift criteria, in which case VSR[VRT+32] is undefined.
Pseudocode Operation
Programming Note
The vsro instruction shifts the contents of a vector register right by a specified number of bytes. Ensure that the shift amount is within the valid range (0-15) to avoid undefined behavior. This instruction requires the VEC bit in the MSR to be set; otherwise, it will raise an exception. Be cautious with alignment as shifting by byte boundaries can lead to unexpected results if not handled properly.
Example
Encoding
Operands
-
vD
Target -
vA
Data -
vB
Shift Count