Function core::arch::riscv32::xperm8

source ·
pub unsafe fn xperm8(rs1: usize, rs2: usize) -> usize
🔬This is a nightly-only experimental API. (stdsimd #48556)
Available with target feature zbkx only.
Expand description

Byte-wise lookup of indicies into a vector in registers.

The xperm8 instruction operates on bytes. The rs1 register contains a vector of XLEN/8 8-bit elements. The rs2 register contains a vector of XLEN/8 8-bit indexes. The result is each element in rs2 replaced by the indexed element in rs1, or zero if the index into rs2 is out of bounds.

Source: RISC-V Cryptography Extensions Volume I: Scalar & Entropy Source Instructions

Version: v1.0.1

Section: 3.47

Safety

This function is safe to use if the zbkx target feature is present.