stxvrhx

Store VSX Vector Rightmost Halfword Indexed X-form

stxvrhx XS,RA,RB

Stores the rightmost halfword of a VSX vector element to memory.

Details

Stores the rightmost halfword (least significant 16 bits) of the first double-precision element in a VSX vector to memory using indexed addressing. The effective address is computed as (RA|0) + RB. This VSX instruction does not affect condition registers or status flags.

Pseudocode Operation

EA ← (RA|0) + RB
[EA:EA+1] ← VSR[XS][48:63]

Programming Note

The stxvrhx instruction stores the rightmost halfword of a VSX vector element into memory. Ensure that the VSX facility is enabled (MSR.VSX=1); otherwise, a VSX_Unavailable exception will occur. The effective address is calculated by adding GPR[RA] and GPR[RB], so ensure these registers contain valid addresses. This instruction operates at user privilege level.

Example

stxvrhx vs1, r4, r5

Encoding

Binary Layout
0
0
S
6
RA
11
RB
16
16
21
SX
31
 
Format X-form
Opcode 0x7C00015A
Extension VSX

Operands

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