lxsiwzx

Load VSX Scalar as Integer Word Zero Indexed

lxsiwzx XT, RA, RB

Loads a word from memory and places it into the specified VSX register, zero-extending it.

Details

The lxsiwzx instruction loads a word from memory and places it into the specified VSX register, zero-extending it. The address is calculated by adding the contents of GPR[RA] (or 0 if RA is 0) to the contents of GPR[RB].

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].dword[0] ← ExtendZero(load_data)
VSR[32×TX+T].dword[1] ← 0x0000_0000_0000_0000

Programming Note

The lxsiwzx instruction is commonly used to load a word from memory into a VSX register, ensuring zero-extension. Ensure that the VSX facility is enabled in the MSR register; otherwise, a VSX_Unavailable exception will be raised. The address calculation respects the base and offset registers, with RA being optional (use 0 if not needed). This instruction does not require any specific alignment but must be executed at a privilege level where VSX operations are permitted.

Example

lxsiwzx vs1, r4, r5

Encoding

Binary Layout
0
0
T
6
RA
11
RB
16
12
21
TX
31
 
Format XX1-form
Opcode 0x7C00000C
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • RA
    Base
  • RB
    Index