4 ms·
> - have rotate instructions in the core set > - have popcount instructions in the core set There is the Bitmanip extension for that. Why it should be in the
by avianes 6y ago
> - have rotate instructions in the core set
> - have popcount instructions in the core set
There is the Bitmanip extension for that.
Why it should be in the core ISA ? Microcontrollers don't always need it.
The purpose of the extensions is to keep the core ISA as minimal as possible.
> - represent bool `true` with ~0 in the ABI
It only takes one operation to emulate this behavior when you need it.
addi rd, rs, -1 (you also have to flip the comparison, but it doesn't cost anything)
Can you justify that we need "0/-1" more often than "0/1"?
> - have all the add, subtract, and comparison instructions set two registers (in addition to the destination), one to 0 and the other to ~0, according to a test of the result.
Why ?
Adding destination registers puts more pressure on the register bank and may limit future CPU designs.
Do you have an argument to show that it's worth it despite the price?
> - have two ISA registers fixed at 0 and -1
Which piece of code would benefit from that?
A good justification is required to remove a (non-constant) registre from the ISA.
Anyway, RISC-V already allows you to do that. Just write "addi rd, x0, -1" at the beginning of your code then use the rd register as a -1 register.