xxspltiw
VSX Vector Splat Immediate Word
xxspltiw XT, IMM
Spatially duplicates a 32-bit immediate into all 4 words of the target.
Encoding
Binary Layout
000001
0:5
01000
6:10
imm[7:0]
11:20
VT[4:0]
21:63
Operands
-
XT
Target -
IMM
32-bit Value -
VT
Target Vector Register -
imm
Immediate Word Value
Example
xxspltiw vs1, 1
Related
More in VSX
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
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.
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.