vstrir

Vector String Isolate Right

vstrir vD, vB

Isolates the rightmost element that matches the condition.

Details

Searches the source vector vB from right to left for the first null byte (0x00) and isolates it, placing the result in vD with all bytes before the found null set to zero. Updates CR6 to indicate whether a null byte was found. This VMX instruction operates on byte elements.

Pseudocode Operation

vD ← isolate_right_null_byte(vB); CR6 ← null_byte_found_flag

Example

vstrir vd, vb

Encoding

Binary Layout
4
0
vD
6
0
11
vB
16
1671
21
 
Format VX-form
Opcode 0x10000687
Extension VMX (AltiVec)

Operands

  • vD
    Target
  • vB
    Source