xxspltib

VSX Vector Splat Immediate Byte

xxspltib XT, IMM

Copies an immediate byte value into each byte element of a vector register.

Details

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.

Pseudocode 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.

Example

xxspltib vs1, 1

Encoding

Binary Layout
60
0
XT
6
0
11
IMM
14
360
 
Format X-form
Opcode 0xF00002D0
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • IMM
    Value
  • IMM8
    Immediate Byte Value