3 ms·
This was my thought initially. The decode logic needed to get this right in all cases seems really hairy. Beyond that though it seems like a good optimization
by ajross 6y ago
This was my thought initially. The decode logic needed to get this right in all cases seems really hairy. Beyond that though it seems like a good optimization to me. Fogg seems to think it takes a lot of transistors to implement but it doesn't strike me as the case. It's effectively a renaming operation where the 2nd and further references to the shared operand get rewritten to some other register.
As far as volatile: this isn't changing anything to do with memory operations. It's just caching a computed address in a special place so the CPU doesn't have to decode and recompute it for the very next instruction.