ISARef Multi-ISA & Silicon Reference
45,419 ISA items · 105,907 timings · 1,823 microarchs · 16,083 chips · 105 sources
Arch:
Tier:

xperm8

T1 riscv alu insn
Crossbar permutation (bytes)
SourceRISC-V Official Unified Database (riscv-unified-db) (riscv_unified_db)
Reliability TierT1 — Official Specification
ISA / Silicon ScopeRV32/RV64 Zbkx, Zkt-DIT
RV32 / RV64 (Ratified & Standard Extensions)
License & VersionApache-2.0 / CC-BY-4.0
main
Upstreamhttps://github.com/riscv/riscv-unified-db
Privilegeuser
ExtensionsZbkx, Zkt-DIT

Summary

The xperm8 instruction operates on bytes. The xs1 register contains a vector of XLEN/8 8-bit elements. The xs2 register contains a vector of XLEN/8 8-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.

Syntax / Encoding

xperm8 xd, xs1, xs2 | 0010100xxxxxxxxxx100xxxxx0110011 (mask=0xfe00707f match=0x28004033)

Binary Encodings (1)

WidthFormatBit PatternMask / Match
32RV0010100xxxxxxxxxx100xxxxx01100110xfe00707f / 0x28004033

Operands

NameDescription
xs2bits [24:20]
xs1bits [19:15]
xdbits [11:7]

Reference Notes

The xperm8 instruction operates on bytes. The xs1 register contains a vector of XLEN/8 8-bit
elements. The xs2 register contains a vector of XLEN/8 8-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.