brd

Byte-Reverse Doubleword

brd RT,RA

Reverses the bytes in a doubleword.

Details

Reverses the byte order of a 64-bit doubleword from the source register and places the result in the target register. This instruction operates at the architectural level to perform a complete byte reversal (byte 0 ↔ byte 7, byte 1 ↔ byte 6, etc.). No status fields are affected. This is a Base category instruction with no privilege requirements.

Pseudocode Operation

RT ← BYTESWAP64(RA)

Programming Note

The brd instruction is useful for reversing the byte order of a doubleword in a register, which can be necessary for data format conversion between big-endian and little-endian systems. Ensure that the source register (RA) contains a valid doubleword value to avoid undefined behavior. This operation does not require any special privileges or alignment considerations.

Example

brd r3, r4

Encoding

Binary Layout
18
0
LI
6
AA
30
LK
31
 
Format XO-form
Opcode 0x7C000176
Extension Base

Operands

  • RT
    Target General Purpose Register
  • RA
    Source General Purpose Register