Webcentive RISC-V Reference

Zbb instructions

Basic bit-manipulation

Basic bit-manipulation

Extension description from riscv-unified-db, reformatted.

Specification chapter: The RISC-V Instruction Set Manual, src/unpriv/zbb.adoc.

Instructions (24)

MnemonicName (riscv-unified-db)XLEN
andnAND with inverted operandRV32 and RV64
clzCount leading zero bitsRV32 and RV64
clzwCount leading zero bits in wordRV64 only
cpopCount set bitsRV32 and RV64
cpopwCount set bits in wordRV64 only
ctzCount trailing zero bitsRV32 and RV64
ctzwCount trailing zero bits in wordRV64 only
maxMaximumRV32 and RV64
maxuUnsigned maximumRV32 and RV64
minMinimumRV32 and RV64
minuUnsigned minimumRV32 and RV64
orc.bBitware OR-combine, byte granuleRV32 and RV64
ornOR with inverted operandRV32 and RV64
rev8Byte-reverse register (RV64 encoding)RV32 and RV64
rolRotate left (Register)RV32 and RV64
rolwRotate left word (Register)RV64 only
rorRotate right (Register)RV32 and RV64
roriRotate right (Immediate)RV32 and RV64
roriwRotate right word (Immediate)RV64 only
rorwRotate right word (Register)RV64 only
sext.bSign-extend byteRV32 and RV64
sext.hSign-extend halfwordRV32 and RV64
xnorExclusive NORRV32 and RV64
zext.hZero-extend halfword (pseudo-op)RV32 and RV64