2 ms·
> I doubt a register-driven architecture would've had a similar penalty for changing its stack implementation. That's not a penalty; that's an optimization for
by JoshTriplett 11y ago
> I doubt a register-driven architecture would've had a similar penalty for changing its stack implementation.
That's not a penalty; that's an optimization for the common case. That's going to be the case on any sufficiently common code pattern in RISC as well: if you recognize a common instruction pattern that you can run faster (peephole-style), that's going to give that pattern an advantage over any similar-but-not-quite-the-same instruction pattern. A lack of optimization is not the same thing as a "penalty"; not every code pattern can be optimized.
Or alternatively, if you left off that optimization, all kinds of stacks would look equally fast, or rather equally slow.
- nickpsecurity 11y agoI agree totally with your whole comment. I just find that the common case, hardware or software, often has something to do with a class of security, reliability, or maintenance issues I'm trying to counter. RISC optimizations like register windows didn't hurt me much. Plus, some specializations were quite helpful. Alpha's PALcode had more uses than I can remember. PA-RISC and Itanium had advanced memory and page protections. Intel's segments were useful to its credit as they're way more efficient than address space or paged protection. So, some structures I don't mind if they provide benefit without holding back improvements.