xperm4

The xperm4 instruction operates on nibbles. The xs1 register contains a vector of XLEN/4 4-bit elements. The xs2 register contains a vector of XLEN/4 4-bit indexes. The result is each element in xs2 replaced by the indexed element in xs1, or zero if the index into xs2 is out of bounds.

Synopsis

xperm4 xd, xs1, xs2

Encoding

Type: R

0671112141519202425310110011xd010xs1xs20010100
funct7: 0010100
funct3: 010
opcode: 0110011

RISC-V Instruction Encoder/Decoder

open xperm4 in rvcodecjs

Availability