rev8

Reverses the order of the bytes in rs1. [NOTE] The rev8 mnemonic corresponds to different instruction encodings in RV32 and RV64. [NOTE] The byte-reverse operation is only available for the full register width. To emulate word-sized and halfword-sized byte-reversal, perform a `rev8 xd,xs1` followed by a `srai xd,xd,K`, where K is XLEN-32 and XLEN-16, respectively.

Synopsis

rev8 xd, xs1

Encoding

Type:

067111214151920310010011xd101xs1011010011000

RISC-V Instruction Encoder/Decoder

open rev8 in rvcodecjs

Availability