vstril
Vector String Isolate Left
vstril vD, vB
Isolates the leftmost element that matches the condition.
Encoding
Binary Layout
4
0:5
vD
6:10
0
11:15
vB
16:20
1607
21:31
Operands
-
vD
Target -
vB
Source
Example
vstril vd, vb
Related
More in VMX (AltiVec)
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Searches the source vector vB from left to right for the first null byte (0x00) and isolates it, placing the result in vD with all bytes after the found null set to zero. Updates CR6 to indicate whether a null byte was found. This VMX instruction operates on byte elements.
Operation
vD ← isolate_left_null_byte(vB); CR6 ← null_byte_found_flag