lxsiwax

Load VSX Scalar as Integer Word Algebraic Indexed

lxsiwax XT, RA, RB

Loads a word from memory into the left-most doubleword element of a VSR, sign-extends it to 64 bits, and aligns it.

Details

The lxsiwax instruction loads a word from memory into the rightmost word of the left-most doubleword element of the target VSR. The remaining bits in the left-most doubleword are set to the copy of the sign bit of the loaded word.

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

Programming Note

The lxsiwax instruction is commonly used to load a 32-bit integer from memory into the left-most doubleword of a VSX register, with sign extension. Ensure that the VSX facility is enabled in the MSR register; otherwise, a VSX_Unavailable exception will be raised. The effective address (EA) must be properly calculated and aligned to a word boundary for optimal performance and correct data loading.

Example

lxsiwax vs1, r4, r5

Encoding

Binary Layout
31
0
XT
6
RA
11
RB
16
76
21
TX
31
 
Format XX1-form
Opcode 0x7C00004C
Extension VSX
Registers Altered MSR

Operands

  • XT
    Target
  • RA
    Base
  • RB
    Index
  • VX
    Target Vector-Specific Register