lxvrwx

Load VSX Vector Rightmost Word Indexed X-form

lxvrwx XT,RA,RB

Loads a word from memory into the rightmost word of a VSX vector register.

Details

The lxvrwx instruction loads a word from memory into the rightmost word 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, the base address is considered to be zero.

Pseudocode Operation

if MSR.VSX=0 then
    VSX_Unavailable()
EA = ((RA=0) ? 0 : GPR[RA]) + GPR[RB]
load_data = MEM(EA,4)
VSR[32×TX+T].word[3] = load_data
VSR[32×TX+T].word[0-2] = 0

Programming Note

The lxvrwx instruction is used to load a word from memory into the rightmost word 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 involves adding two general-purpose registers, RA and RB, with a special case where if RA is zero, the base address defaults to zero. This instruction zeroes out the first three words of the target vector register before placing the loaded word into the rightmost position.

Example

lxvrwx vs1, r4, r5

Encoding

Binary Layout
0
0
T
6
RA
11
RB
16
77
21
TX
26
 
Format X-form
Opcode 0x7C00009A
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target VSX Vector Register
  • RA
    Source General Purpose Register (Base Address)
  • RB
    Source General Purpose Register (Offset)