xxspltiw

VSX Vector Splat Immediate Word

xxspltiw XT, IMM

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

Details

Duplicates a 32-bit immediate value into all four 32-bit word elements of VSR[XT]. This is a VSX vector splat immediate instruction that fills the entire 128-bit register with copies of the 32-bit immediate. No floating-point status updates occur.

Pseudocode Operation

imm32 ← sign_extend(IMM)
VSR[XT].element[0] ← imm32
VSR[XT].element[1] ← imm32
VSR[XT].element[2] ← imm32
VSR[XT].element[3] ← imm32

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 0x0500000080060000
Extension VSX

Operands

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