lxvrhx
Load VSX Vector Rightmost Halfword Indexed
Loads a halfword from memory into the rightmost element of a VSX vector register.
Details
The lxvrhx instruction loads a halfword from memory into the rightmost element of a VSX vector register. The address is calculated by adding the contents of two general-purpose registers, RA and RB. If RA is zero, it is treated as zero. The loaded halfword is placed in the rightmost halfword element (element 7) of the VSX vector register specified by XT, with all other elements set to zero.
Pseudocode Operation
Programming Note
The lxvrhx instruction is used to load a halfword from memory into the rightmost element of a VSX vector register. Ensure that the VSX facility is enabled in the MSR register; otherwise, an exception will be raised. The address calculation uses two general-purpose registers, RA and RB, where RA can be zero. The loaded halfword is placed in the rightmost halfword element (element 7) of the specified VSX vector register, with all other elements set to zero. Endianness affects how the halfword is stored in the vector register; ensure proper handling for both big-endian and little-endian systems.
Example
Encoding
Operands
-
XT
Target Vector-Scalar Register -
RA
Source General Purpose Register (Base Address) -
RB
Source General Purpose Register (Index)