3 ms·
Yeah, RISC-V omitted rotate from its 47 instruction base ISA. You don't get to be that small without cutting the unnecessary and rotate would require a barrel
by CalChris 7y ago
Yeah, RISC-V omitted rotate from its 47 instruction base ISA. You don't get to be that small without cutting the unnecessary and rotate would require a barrel shifter which in turn would rarely be used. Instead, rotate (rol, ror, rori) can be found in the “B” Standard Extension for Bit Manipulation.
- ncmncm 7y agoRotation costs exactly the same to implement as shifting, and shares the same hardware, so has about zero marginal cost. "Academic."
- microcolonel 7y agoAn "academic" design is better than the armchair design of somebody who doesn't know how barrel shifters are implemented. Sure, you could microcode it, but are the instructions really that big?
- deleted 7y ago[deleted]
- sifar 7y agoThe parent is right. The HW is not much different. You don't need to microcode them.
- microcolonel 7y agoIf you don't have a barrel shifter in your design, but your design is microcoded, you may choose to implement a rotate with a few μops, much the same way that you would write it in software.
- drudru11 7y agoThey are trying to be big and small. When the Intel dropped its barrel shifter, they caught a lot of hell for the massive performance hit. They promptly re-included it in processors following the P4.
- sifar 7y agoViewing it from the other side, when you split some of the useful but different operations into a bunch of orthogonal extensions, then when you have to do something really useful, you have to implement the entire extension. That equally bloats your core. In this case, one cannot just implement ROT, one has to implement the entire Bit manipulation extension. Scale it up across the extensions - say you need 3 basic ops from 3 different extensions. Sure you can add your custom ROT op, but then you end up breaking compatibility. [Edit] The principle of removing unused/rarely used HW goes for a toss since now you have a bunch of operations from these extensions that would lie unused yet consume HW. It is not the basic operations that cause bloat, it is the functional variants - need to support different width, indexing, different constant. In this case shift and rotate have the same function. Immediate ones are the variants.