Does XPERM8 access memory?
No. It only rearranges bit fields or performs register lookup within integer registers.
byte crossbar permutation (Zbkx).
Syntax: xperm8 rd, rs1, rs2; integer x0–x31 or ABI names, without an assembly immediate.
32-bit OP: funct7=0010100, funct3=100, opcode=0110011.
RV32/RV64 Zbkx; rs1 holds XLEN/8 8-bit entries, each rs2 element supplies an index, and out-of-range results are zero.
An x0 source is zero and writes to x0 are discarded. Overlap reads values before writeback; equal source registers share one value. No memory access.
XPERM8 (Zbkx) treats rs1 as a table of XLEN/8 8-bit elements and each 8-bit element of rs2 as an index. At each result position, an index below XLEN/8 selects the corresponding 8-bit element from rs1; otherwise the result element is zero.
Each 8-bit rs2 element indexes the rs1 element table; an out-of-range index produces a zero result element.
x0 is always zero; source values are read before writeback. Teaching steps are not processor cycles.
00101000110001011100010100110011x[rs2] indexes 4 entries in x[rs1]; result = 0xA1B2C3D4
Shows the instruction's fixed and register fields.
XPERM8 performs register lookup: rs1 holds XLEN/8 byte entries and each byte of rs2 selects an entry; out-of-range indexes produce zero.
RV32 Zbkx, x11=0xA1B2C3D4, x12=0x00010203: xperm8 x10, x11, x12 gives x10=0xD4C3B2A1.
RV32 Zbkx, x11=0xA1B2C3D4, x12=0x00010203: xperm8 x10, x11, x12 gives x10=0xD4C3B2A1.
No. It only rearranges bit fields or performs register lookup within integer registers.
It belongs to the Zbkx crossbar-permutation extension.