xxspltib
VSX Vector Splat Immediate Byte
xxspltib XT, IMM
Copies an immediate byte value into each byte element of a vector register.
Encoding
Binary Layout
60
0:5
XT
6:10
0
11:15
IMM
16:20
360
21:31
Operands
-
XT
Target -
IMM
Value -
IMM8
Immediate Byte Value
Reference
View in PowerISA v3.1C Specification ↗
OPF Power ISA v3.1C
Description
Splats an 8-bit immediate byte value across all 16 byte elements of VSR XT. Each byte of XT is set to the same immediate value, providing an efficient way to initialize a vector with a constant. This is a VSX instruction that does not update condition flags.
Operation
byte_val ← IMM[0:7]
for i ← 0 to 15
XT[i * 8 : i * 8 + 7] ← byte_val
Programming Note
The xxspltib instruction is used to fill a VSX vector register with an immediate byte value. Ensure that the appropriate privilege level (VSX or Vector) is enabled in the MSR register, otherwise, it will raise an exception. This instruction is useful for initializing vectors with a constant value.