xvtlsbb

VSX Vector Test Least-Significant Bit by Byte

xvtlsbb BF,XB

Tests the least-significant bit of each byte in a VSX vector register and sets a condition register field based on the results.

Details

The xvtlsbb instruction tests the least-significant bit (bit 7) of each byte element in the VSX vector register XB. It sets the CR field BF to indicate if all bits are equal to 1 or equal to 0.

Pseudocode Operation

if MSR.VSX=0 then
    VSX_Unavailable()

ALL_TRUE ←1
ALL_FALSE ←1

do i = 0 to 15
   ALL_TRUE  ←ALL_TRUE  & (VSR[XB].byte[i].bit[7]=1)
   ALL_FALSE ←ALL_FALSE & (VSR[XB].byte[i].bit[7]=0)
end

CR.field[BF] ←ALL_TRUE || 0 || ALL_FALSE || 0;

Programming Note

This instruction following any Vector Compare provides the ability to direct the summary status of the Vector Compare to any CR field, not just CR field 6 when Rc=1.

Example

xvtlsbb cr0, vs3

Encoding

Binary Layout
18
0
BF
6
XB
9
 
Format XX2-form
Opcode 0xF002076C
Extension VSX
Registers Altered CR

Operands

  • BF
    Condition Register Field
  • XB
    Source VSX Vector Register