rev8
Byte-reverse register (RV64 encoding)
This instruction reverses the order of the bytes in rs1.
The rev8 mnemonic corresponds to different instruction encodings in RV32 and RV64. |
The byte-reverse operation is only available for the full register width. To emulate word-sized
and halfword-sized byte-reversal, perform a rev8 rd,rs followed by a srai rd,rd,K , where K
is XLEN-32 and XLEN-16, respectively.
|
This instruction must have data-independent timing when extension Zkt is enabled. |
Decode Variables
-
RV32
-
RV64
Bits<5> rs1 = $encoding[19:15];
Bits<5> rd = $encoding[11:7];
Bits<5> rs1 = $encoding[19:15];
Bits<5> rd = $encoding[11:7];