stdbrx

Store Doubleword Byte-Reverse Indexed

stdbrx RS, RA, RB

Swaps bytes and stores 64 bits.

Encoding

Binary Layout
31
0:5
RS
6:10
RA
11:15
RB
16:20
660
21:30
/
31
 
Format X-form
Opcode 0x7C000528
Extension Base

Operands

  • RS
    Source
  • RA
    Base
  • RB
    Index

Example

stdbrx r3, r4, r5

Related

More in Base

Reference

Description

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.

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.