Skip to content

Latest commit

 

History

History
38 lines (31 loc) · 927 Bytes

zbkx.adoc

File metadata and controls

38 lines (31 loc) · 927 Bytes

Zbkx: Crossbar permutations

Frozen

The Zbkx extension is frozen.

These instructions implement a "lookup table" for 4 and 8 bit elements inside the general purpose registers. rs1 is used as a vector of N-bit words, and rs2 as a vector of N-bit indices into rs1. Elements in rs1 are replaced by the indexed element in rs2, or zero if the index into rs2 is out of bounds.

These instructions are useful for expressing N-bit to N-bit boolean operations, and implementing cryptographic code with secret dependent memory accesses (particularly SBoxes) such that the execution latency does not depend on the (secret) data being operated on.

RV32 RV64 Mnemonic Instruction

xperm.n rd, rs1, rs2

[insns-xpermn]

xperm.b rd, rs1, rs2

[insns-xpermb]