vstribr
Vector String Isolate Byte Right
vstribr VRT,VRB
Isolates the rightmost non-zero byte in a vector string and shifts it to the left.
Formerly listed on this site as vstrir; the old address leads here.
Retired: vstrir is a name no manual or assembler uses, for either vstribr or vstrihr, both of which have pages; it leads to vstribr.
Encoding
Binary Layout
4
0:5
VRT
6:10
1
11:15
VRB
16:20
Rc
21
13
22:31
Operands
-
vD
Target -
vB
Source -
VRT
Target Vector Register -
VRB
Source Vector Register
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.