stxsspx

Store VSX Scalar Single-Precision Indexed X-form

stxsspx XS,RA,RB

Stores a single-precision floating-point value from a VSX register to memory.

Details

The stxsspx instruction stores the single-precision floating-point value from doubleword element 0 of VSR[XS] into memory at address EA, which is calculated as the sum of GPR[RA] and GPR[RB]. If RA is zero, EA is set to zero.

Pseudocode Operation

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

Programming Note

The stxsspx instruction is used to store a single-precision floating-point value from the VSX register into memory. Ensure that the VSX facility is enabled by checking and setting the MSR.VSX bit. Be cautious of alignment requirements; the EA must be 4-byte aligned for optimal performance. If RA is zero, the effective address (EA) will be set to zero, which might lead to unexpected behavior if not intended.

Example

stxsspx vs1, r4, r5

Encoding

Binary Layout
0
0
S
1
RA
6
RB
11
18
16
SX
21
 
Format X-form
Opcode 0x7C000518
Extension VSX
Registers Altered MSR

Operands

  • XS
    VSX Scalar Register Index
  • RA
    Source General Purpose Register (Base Address)
  • RB
    Source General Purpose Register (Index)