vstribr
Vector String Isolate Byte Right
vstribr VRT,VRB
vstribr. VRT,VRB
vstribr. VRT,VRB
Isolates the rightmost non-zero byte in a vector string and shifts it to the left.
Details
Isolates the rightmost non-zero byte in each 16-byte element of the source vector and shifts it to the leftmost position of the corresponding result element; all other bytes in the result are zeroed. When Rc=1, the instruction updates CR6 based on whether a zero vector was produced.
Pseudocode Operation
for i in 0 to 15:
byte_value ← VRB[i*8:(i+1)*8]
if byte_value ≠ 0 then
VRT[i*8:(i+1)*8] ← byte_value
else
VRT[i*8:(i+1)*8] ← 0
if Rc = 1 then CR6 ← record_zero_vector(VRT)
Programming Note
When Rc=1, CR1 is set from the FPSCR[FX, FEX, VX, OX] bits immediately after the operation completes.
Example
vstribr v1, v3
Encoding
Binary Layout
0
0
VRT
6
VRB
11
Rc
16
13
21
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register