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)
| Mnemonic | Name (riscv-unified-db) | XLEN |
|---|---|---|
andn | AND with inverted operand | RV32 and RV64 |
clz | Count leading zero bits | RV32 and RV64 |
clzw | Count leading zero bits in word | RV64 only |
cpop | Count set bits | RV32 and RV64 |
cpopw | Count set bits in word | RV64 only |
ctz | Count trailing zero bits | RV32 and RV64 |
ctzw | Count trailing zero bits in word | RV64 only |
max | Maximum | RV32 and RV64 |
maxu | Unsigned maximum | RV32 and RV64 |
min | Minimum | RV32 and RV64 |
minu | Unsigned minimum | RV32 and RV64 |
orc.b | Bitware OR-combine, byte granule | RV32 and RV64 |
orn | OR with inverted operand | RV32 and RV64 |
rev8 | Byte-reverse register (RV64 encoding) | RV32 and RV64 |
rol | Rotate left (Register) | RV32 and RV64 |
rolw | Rotate left word (Register) | RV64 only |
ror | Rotate right (Register) | RV32 and RV64 |
rori | Rotate right (Immediate) | RV32 and RV64 |
roriw | Rotate right word (Immediate) | RV64 only |
rorw | Rotate right word (Register) | RV64 only |
sext.b | Sign-extend byte | RV32 and RV64 |
sext.h | Sign-extend halfword | RV32 and RV64 |
xnor | Exclusive NOR | RV32 and RV64 |
zext.h | Zero-extend halfword (pseudo-op) | RV32 and RV64 |