Design & Reuse

GCC support for the draft Bit Manipulation Extension for RISC-V

embecosm.com, Oct. 22, 2019 – 

One of the currently proposed draft ISA extensions for RISC-V is the Bit Manipulation Instructions extension (from henceonwards referred to as the "Bitmanip" or "BMI" extension.) It proposes to provide fast and direct instructions for commonly-used bitwise operations, often found in cryptographic, logarithmic, bit-counting, and logical operations. The GCC toolchain work has been developed by the community with contributions from SiFive and myself at Embecosm, providing bug fixes, regression tests, and benchmarks.

The specification proposes 95 new instructions (including all variants) spread across 9 subclasses, some of them overlapping.

The GCC backend code generator currently supports approx. 31 of 95 total instructions. This means that it is possible for GCC to emit these instructions when compiling generic C or C++ code, if it is judged to be an improvement.

Click here to learn more...