Does XPERM8 access memory?
No. It only rearranges bit fields or performs register lookup within integer registers.
byte crossbar permutation (Zbkx).
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.
00101000110001011100010100110011x[rs2] indexes 4 entries in x[rs1]; result = 0xA1B2C3D4
Shows the instruction's fixed and register fields.
XPERM8 is a Zbkx cross-register permutation instruction; this page follows the official B-extension operation.
Understand this scenario with real code like «xperm8 a0, a1, a2».
Understand this scenario with real code like «xperm8 a0, a1, a2».
No. It only rearranges bit fields or performs register lookup within integer registers.
It belongs to the Zbkx crossbar-permutation extension.