Repository navigation
v0.17.0: Zba + Zbb Bit-Manipulation Extensions
What's New
Zba Extension (Address Generation)
- SH1ADD, SH2ADD, SH3ADD — shifted-add for array indexing patterns
- SH1ADD.UW, SH2ADD.UW, SH3ADD.UW — unsigned word variants
- ADD.UW — add with zero-extended 32-bit source
- SLLI.UW — shift-left with zero-extended 32-bit source
Zbb Extension (Basic Bit Manipulation)
- Logical: ANDN, ORN, XNOR
- Counting: CLZ/CLZW, CTZ/CTZW, CPOP/CPOPW
- Min/Max: MIN, MINU, MAX, MAXU (signed + unsigned)
- Sign/Zero extend: SEXT.B, SEXT.H, ZEXT.H
- Rotate: ROL/ROLW, ROR/RORW, RORI/RORIW
- Byte operations: REV8 (byte-reverse), ORC.B (or-combine bytes)
Other
- DTB ISA string updated with
zba,zbbextensions - 16 new tests (123 total, all passing)
These extensions are part of the ratified RISC-V B (bit-manipulation) standard and are used by modern Linux kernels for optimized string operations, memory copying, and address calculations.