lvehx
Load Vector Element Halfword Indexed X-form
Loads a halfword element from memory into the corresponding halfword element of a vector register, with the address computed as the sum of RA and RB, aligned to a halfword boundary.
Details
The effective address is computed by adding the contents of general-purpose register RA (or 0 if RA=0) and general-purpose register RB, then truncating to a halfword-aligned boundary. A halfword is loaded from that effective address into the element of vector register VRT that contains the addressed halfword, while all other bytes of the target vector register are undefined.
Programming Note
The lvehx instruction loads a halfword from memory into a specific element of a vector register. Ensure the effective address is halfword-aligned to avoid alignment faults. The operation does not require any special privileges, but it may raise an exception if the access violates memory protection rules.
Example
Encoding
Operands
-
VX
Target VSX Register -
RA
Base Address General Purpose Register -
RB
Index General Purpose Register