vspltb

Vector Splat Byte

vspltb vD, vB, UIM

Splat a byte from one vector element into all elements of another vector.

Details

The vspltb instruction copies the contents of the byte element specified by UIM in VSR[VRB+32] to each byte element of VSR[VRT+32].

Pseudocode Operation

if MSR.VEC=0 then
    Vector_Unavailable()
b ←UIM || 0b000
do i = 0 to 15
    VSR[VRT+32].byte[i] ←VSR[VRB+32].bit[b:b+7]
end

Programming Note

The Vector Splat instructions can be used in preparation for performing arithmetic for which one source vector is to consist of elements that all have the same value (e.g., multiplying all elements of a VSR by a constant).

Example

vspltb vd, vb, uim

Encoding

Binary Layout
1001010
0
VRT
6
UIM
11
VRB
16
 
Format VX-form
Opcode 0x1000020C
Extension VMX (AltiVec)
Registers Altered MSR

Operands

  • vD
    Target
  • vB
    Source
  • UIM
    Index
  • VRT
    Target Vector Register
  • VRB
    Source Vector Register