sthbrx
Store Halfword Byte-Reverse Indexed
Swaps bytes and stores a halfword.
Details
The sthbrx instruction stores a halfword from the source register RS to memory at an effective address calculated by adding the contents of registers RA and RB. The data is stored in byte-reversed order compared to other store instructions.
Pseudocode Operation
Programming Note
The sthbrx instruction is useful for storing a halfword in memory with byte-reversed order. Ensure that the base address register (RA) and index register (RB) are correctly set to avoid incorrect memory addresses. This instruction operates at user privilege level and will raise an exception if the effective address is out of bounds or if there is a protection fault.
Example
Encoding
Operands
-
RS
Source -
RA
Base -
RB
Index