vstrihr
Vector String Isolate Halfword Right-justified
vstrihr VRT,VRB
vstrihr. VRT,VRB
vstrihr. VRT,VRB
Isolates the rightmost non-zero halfword in a vector string.
Details
From right to left, the contents of each halfword element of VSR[VRB+32] are placed into the corresponding halfword element in VSR[VRT+32]. If a halfword element in VSR[VRB+32] is found to contain 0, the corresponding halfword element and all halfword elements to the left of that halfword element in VSR[VRT+32] are set to 0.
Pseudocode Operation
Programming Note
When Rc=1, CR1 is set from the FPSCR[FX, FEX, VX, OX] bits immediately after the operation completes.
Example
vstrihr v1, v3
Encoding
Binary Layout
0
0
VRT
6
VRB
11
Rc
16
13
21
Operands
-
VRT
Target Vector Register -
VRB
Source Vector Register