22 ms·
https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/_popcount.adoc https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/_...
by rwmj 5y ago
https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/_popcount.adoc https://github.com/riscv/riscv-bitmanip/blob/main/bitmanip/_...
- ncmncm 5y agoI cannot tell what this means.
- rwmj 5y agoIt's a link to the proposal for popcount in the bitmanip extension.
- ncmncm 5y agoI get that. But I said myself that the (optional!) B extension defines a popcount instruction. Does the linked page indicate anything further? Does it say RV64 chips are in fact required to implement the instruction? Or, what do the checkmarks indicate?
- cbm-vic-20 5y agoFWIW, RISC-V does have a invalid instruction trap mechanism that can be used to provide a software implementation of missing instructions. So at least if the platform provides a software implementation of the B instructions, user code can still use them (much more slowly, of course).
- ncmncm 5y agoEmulated B extension instructions would be no better than a cruel joke: "Ha, you thought you were optimizing? Here, see how you like extra-super-slow, instead!"
- davidlt 5y agoZba, Zbb, Zbc, Zbs (BitManip) have been approved by "Architecture Review" thus I assume they close to being ratified. Probably one of the first new extensions to be available for RISC-V. Because it's not ratified the BitManip extensions are not listed in any RISC-V Profiles as supported (or required). Platforms specification is also not requiring it. Note that the next Profiles will be for 2022, thus any extension ratified before that most likely will appear in a new profile (i.e. as supported, non-conflicting extension) in some set.
- ncmncm 5y agoOK, so does the "RV64" checkmark on the page mean anything at all?
- rwmj 5y agoRV64 on that page refers to the fact the instruction can be implemented (as part of the B extension) on 64 bit RISC-V. RISC-V itself has a well-defined system of base ISA + extensions as explained in section 1.3 of the user specification, available from here: https://riscv.org/technical/specifications/ https://riscv.org/technical/specifications/
- fwsgonzo 5y agoThe B-extension, which likely all desktop class CPUs will have (and probably others too?) has most of the bit manipulation instructions. There is also a vector extension, crypto extension and even a 128-bit computer (Q-extension)!