xxspltw

VSX Vector Splat Word

xxspltw XT, XS, UIM

Replicates a word element from one vector register into all elements of another vector register.

Details

The contents of the specified word element UIM in VSR[XB] are replicated into each word element of VSR[XT].

Pseudocode Operation

if MSR.VSX=0 then VSX_Unavailable()

XT <- XB.word[UIM]
VSR[32×TX+T].word[0] ← XT
VSR[32×TX+T].word[1] ← XT
VSR[32×TX+T].word[2] ← XT
VSR[32×TX+T].word[3] ← XT

Programming Note

The xxspltw instruction is commonly used to replicate a word element from one vector register into all elements of another vector register. Ensure that the VSX (Vector Scalar Extensions) are enabled in the MSR register; otherwise, an exception will be raised. This instruction does not have specific alignment requirements and operates at user privilege level.

Example

xxspltw vs1, vs1, uim

Encoding

Binary Layout
60
6
XT
11
UIM
14
XS
16
164
21
 
Format XX2-form
Opcode 0xF00000A4
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • XS
    Source
  • UIM
    Index
  • XB
    Source Vector Register