4 ms·
Poster speaking... The original title on this was "RISC-V Bitmanip Extension proposal is an education" because, besides a list of proposed instructions and pre
by ncmncm 7y ago
Poster speaking...
The original title on this was "RISC-V Bitmanip Extension proposal is an education" because, besides a list of proposed instructions and precise definitions, the new draft explains in some detail how they are useful for real programs, and in many cases shows how they can be implemented with minimal additional gate count.
It's an education because many of these operations will be unfamiliar to most readers, and may suggest to them new ways to solve problems. Some of the instructions are also implemented in recent x86 cores, sometimes in an AVXx extension, but Intel's assembly language mnemonic offers little hint at how powerful it is, and its reference documentation sheds little more light.
So, previous drafts looked like a huge bolus of largely doubtful instructions that looked to bloat the RISC-V spec but be little used. Now we can see that most need only an extra gate here and there on such existing subunits as barrel shifters and multipliers, yet open up whole new vistas of operations they could be used for. The more powerful ones turn a whole family of O(N) operations (N the word size or number of 1s or 0s) to O(1). In turn, they are building blocks for fundamental signal analysis and encoding algorithms that may then run up to N times faster.
The document is maintained at https://github.com/riscv/riscv-bitmanip/ https://github.com/riscv/riscv-bitmanip/ .
- equalunique 7y agoThanks you for the explanation
- tntn 7y agoFWIW, I've never before heard a document referred to as "an education." Pretty weird phrase, IMO.
- paulrpotts 7y agoInteresting stuff, thanks. I am a big fan of Henry S. Warren's book _Hacker's Delight, 2nd ed._ and have used his algorithms several times - for example, when I need a 64-bit divide operation on a 32-bit microcontroller with single-precision floating-point only.