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
0110101
31:25
11000
24:20
rs1
19:15
101
14:12
rd
11:7
0010011
6:0
 
Format I-Type
Opcode 0x13
Extension Zbb

Operands

  • rd
    Destination register (integer)
  • rs1
    Source