Does REV8 access memory?
No. It only reads and writes integer registers; any memory access must be performed by a separate load or store instruction.
Byte-reverse register (endianness conversion)
REV8 uses opcode 0010011 (0x13), funct3 101, funct7 0110100. The rs1 field selects the source register, the 12-bit immediate provides the second operand, and rd selects the destination.
Byte-reverse: reverses the byte order of rs. RV32: rev8(0xAABBCCDD)=0xDDCCBBAA. REV8(RV32) and REV8(RV64) have different funct7. Part of Zbb and Zbkb.
REV8 is a B/Zbb instruction for reverse byte order across XLEN. This page is checked against the official B extension semantics, with emphasis on XLEN, W suffixes, .uw suffixes, and bitwise or rotate boundaries.
Understand this scenario with real code like «rev8 x10, x11 ; byte-reverse x11 (bswap)».
No. It only reads and writes integer registers; any memory access must be performed by a separate load or store instruction.
Except that W-suffixed forms produce a 32-bit result then sign-extend and .uw forms first extract a 32-bit unsigned operand, the result is written to rd at XLEN width.