stdbrx

Store Doubleword Byte-Reverse Indexed

stdbrx RS, RA, RB

Swaps bytes and stores 64 bits.

Details

Byte-reverses all 64 bits of RS and stores the result as a doubleword in memory at address (RA|0) + RB. No status flags are affected. This instruction is used to write doubleword data in reversed byte order to memory.

Pseudocode Operation

EA ← (RA|0) + RB
[EA] ← byte_reverse_64(RS)

Programming Note

The stdbrx instruction is useful for storing a doubleword in memory with byte-reversed order. Ensure that the source register RS contains the data to be stored, and registers RA and RB are correctly set to calculate the effective address. This instruction operates at user privilege level and may raise an exception if there's a memory access violation.

Example

stdbrx r3, r4, r5

Encoding

Binary Layout
31
0
RS
6
RA
11
RB
16
660
21
/
31
 
Format X-form
Opcode 0x7C000528
Extension Base

Operands

  • RS
    Source
  • RA
    Base
  • RB
    Index