xxspltiw

VSX Vector Splat Immediate Word

xxspltiw XT, IMM

Spatially duplicates a 32-bit immediate into all 4 words of the target.

Details

The xxspltiw instruction splats the immediate word value specified by the 'imm' field into all elements of the destination vector register VT.

Pseudocode Operation

for i from 0 to 3 do
    VT[i] <- imm

Programming Note

The xxspltiw instruction is commonly used to initialize a VSX vector with a repeated immediate word value. Ensure that the 'imm' field is within the valid range of a 32-bit signed integer to avoid unexpected behavior. This instruction operates at user privilege level and does not generate exceptions under normal circumstances.

Example

xxspltiw vs1, 1

Encoding

Binary Layout
000001
0
01000
6
imm[7:0]
11
VT[4:0]
21
 
Format 8RR:D-form
Opcode 0xF0000000
Extension VSX

Operands

  • XT
    Target
  • IMM
    32-bit Value
  • VT
    Target Vector Register
  • imm
    Immediate Word Value