vsplth
Vector Splat Halfword
Duplicates a halfword element across the vector.
Details
The Vector Splat Halfword instruction (vsplth) replicates a specified halfword from the source vector register into all elements of the destination vector register. This is useful for preparing vectors where one operand needs to be consistent across all elements, such as in arithmetic operations with a constant.
Pseudocode Operation
Programming Note
The vsplth instruction is commonly used when you need to replicate a specific halfword from a source vector into all elements of a destination vector, which is useful for operations requiring uniform operands. Ensure the specified bit position (b) is within the valid range to avoid undefined behavior. This instruction operates at user privilege level and does not generate exceptions under normal circumstances.
Example
Encoding
Operands
-
vD
Target -
vB
Source -
UIM
Index