mtvsrws
Move To VSR Word and Splat
Moves a 32-bit word from a GPR and replicates it across the vector.
Details
Moves the low 32 bits from GPR RA into a VSX register, then replicates that 32-bit word across all four 32-bit word positions in XT. This VSX instruction does not affect condition registers or status fields.
Pseudocode Operation
word ← RA[32:63]
for i in 0 to 3:
XT[32*i:32*i+31] ← word
Programming Note
The mtvsrws instruction is used to move the upper 32 bits of a general-purpose register into the first word element of a vector-scalar register and splat it across the remaining elements. Ensure that the VSX or Vector facility is enabled in the MSR before using this instruction, otherwise, an exception will be raised. This instruction treats the operation as a Vector instruction, so developers should consider resource availability accordingly.
Example
Encoding
Operands
-
XT
Target -
RA
Source GPR