This article claims that each register has an intended purpose and more importantly,
When the engineers at Intel designed the original 8086 processor, they had a special purpose in mind for each register. As they designed the instruction set, they created many optimizations and special instructions based on the function they expected each register to perform. Using registers according to Intel's original plan allows the code to take full advantage of these optimizations. Unfortunately, this seems to be a lost art. Few coders are aware of Intel's overall design, and most compilers are too the simplistic or focused on execution speed to use the registers properly. Understanding how the registers and instruction set fit together, however, is an important step on the road to effortless size-coding.
Are there any other sources to corroborate this article? If so, I'd really like to check it out.
Please note I'm not talking about situations where fast operations like STOS
uses edi
- I'm just wondering if there is any performance degradation if I use eax
and esi
as counters instead of ecx
or is it just about readability?