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

Loads a 32-bit signed integer word from memory at address RA+RB into the left-most doubleword element of VSX register XT, with the value sign-extended to 64 bits. The effective address is computed by adding RA (or 0 if RA=0) and RB. The loaded and sign-extended value occupies bits 0-63 of the VSX register, leaving the right element undefined. This VSX extension instruction does not affect condition registers.

Pseudocode Operation

EA ← (RA = 0) ? RB : RA + RB
word ← [EA:EA+3]
XT[0:63] ← sign_extend(word, 64)
XT[64:127] ← undefined

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 0x7C000098
Extension VSX
Registers Altered MSR

Operands

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