21 ms·
> Divide is split into each cycle's ops, iterate for as long as your results need. You know what would be better? If you had a decompression routine built into
by dragontamer 5y ago
> Divide is split into each cycle's ops, iterate for as long as your results need.
You know what would be better? If you had a decompression routine built into the CPU that would convert division and modulus commands into this loop at the micro-code level.
That way, a divide / modulus cycle (probably taking 20 instructions taking 50+ bytes) can be compressed into a singular instruction (1 instruction taking 4 bytes)... using less L1 cache.
- monocasa 5y agoI mean, it doesn't have any microcode, and does better than MIPS ironically at achieving the whole "Microprocessor without Interlocked Pipelined Stages" thing because of directly exposing the divide pipeline in single cycle units. Having to add pipeline interlocking from the EX stage just for that as well as the microcode itself would have been non trivial from a gate count perspective on a core that's already cutting gates left and right. And it's neat to be able to choose the divide precision you need down to the cycle. I agree though in the general case, hence why I end with it being a little ascetic these days.