stxsiwx

Store VSX Scalar as Integer Word Indexed

stxsiwx XS, RA, RB

Stores a single-precision floating-point value from a VSX register into memory, indexed by another register.

Details

The stxsiwx instruction stores the contents of word element 1 of VSR[XS] into memory at the effective address (EA) calculated from GPR[RA] and GPR[RB].

Pseudocode Operation

if MSR.VSX=0 then
    VSX_Unavailable()
EA ←((RA=0) ? 0 : GPR[RA]) + GPR[RB]
store_data ← VSR[32×SX+S].word[1]
MEM(EA,4) ← store_data

Programming Note

The stxsiwx instruction stores the second word of a VSX register into memory. Ensure that the VSX facility is enabled in the MSR register to avoid exceptions. The effective address is calculated from two GPRs, so ensure proper alignment and bounds checking to prevent memory access errors.

Example

stxsiwx vs1, r4, r5

Encoding

Binary Layout
011111
6
RS
11
B
16
RB
21
00100
31
01100
 
Format XX1-form
Opcode 0x7C00008C
Extension VSX
Registers Altered MSR

Operands

  • XS
    Source
  • RA
    Base
  • RB
    Index
  • RS
    Source VSX Register
  • B
    Base General Purpose Register