bswap

Byte Swap

BSWAP r

Reverses the byte order of a 32/64-bit register.

Details

The Byte Swap instruction reverses the byte order of a 32/64-bit register.

Pseudocode Operation

// Reverses the byte order of a 32/64-bit register

Example

BSWAP rax

Encoding

Binary Layout
0F
+0
C8
+1
 
Format Legacy
Opcode 0F C8
Extension Base

Operands

  • dest
    General-purpose register