vctzlsbb

Vector Count Trailing Zero Least Significant Bits Byte

vctzlsbb RA, vB

Counts the number of trailing zero bits in each byte element of a vector.

Details

The vctzlsbb instruction counts the number of contiguous trailing byte elements in VSR[VRB+32] that have a zero least-significant bit. The result is placed into GPR[RT].

Pseudocode Operation

for each byte element in VRA:
    count trailing zeros
    store result in corresponding element of VRT

Programming Note

Use vctzlsbb to efficiently count the number of contiguous trailing zero bytes with a zero least-significant bit. Ensure that the input vector is properly aligned and that you have the necessary privileges to execute this instruction. The result is stored in a general-purpose register, so be mindful of register usage and dependencies.

Example

vctzlsbb r4, vb

Encoding

Binary Layout
4
0
RA
6
0
11
vB
16
1543
21
 
Format VX-form
Opcode 0x10000607
Extension VMX (AltiVec)

Operands

  • RA
    Target GPR
  • vB
    Source
  • VRT
    Target Vector Register
  • VRA
    Source Vector Register