REV8

Byte Reverse

REV8 rd, rs1

Reverses the order of bytes in a register (Endian swap).

Details

REV8 reverses the byte order of rs1 (byte-swap / endianness conversion), writing the result to rd.

Pseudocode Operation

R[rd] = Byteswap(R[rs1]);

Example

REV8 x10, x11

Encoding

Binary Layout
011010111000
31:20
rs1
19:15
101
14:12
rd
11:7
0010011
6:0
 
Format I-Type
Opcode 0x6B805013
Extension Zbb

Operands

  • rd
    Destination register (integer)
  • rs1
    Source