vstrir

Vector String Isolate Right

vstrir vD, vB

Isolates the rightmost element that matches the condition.

Encoding

Binary Layout
4
0:5
vD
6:10
0
11:15
vB
16:20
1671
21:31
 
Format VX-form
Opcode 0x10000687
Extension VMX (AltiVec)

Operands

  • vD
    Target
  • vB
    Source

Example

vstrir vd, vb

Related

More in VMX (AltiVec)

Reference

Description

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.

Operation

vD ← isolate_right_null_byte(vB); CR6 ← null_byte_found_flag