Increases the efficiency of using the Intel register for its "intended use"?

This article states that each register has a purpose and, more importantly,

When Intel engineers developed the original 8086 processor, they had a special purpose for each register. Because they are a set of instructions, they created many optimizations and special instructions based on the expected function of each register to execute. Using the initial plan registered in accordance with Intel allows the code to take full advantage of these optimizations. Unfortunately, this seems to be Art. Several coders are aware of Intel's overall design and most compilers are too simplistic or focus on execution speed to use registers properly. Understanding how registers and a set of instructions together, however, is an important step towards easy size-coding.

Are there any other sources to confirm this article? If so, I would really like to check it out.

Please note: I'm not talking about situations where fast operations like STOS use edi - I'm just wondering if there is performance degradation if I use eax and esi as counters instead of ecx or is it just readability?

+6
assembly intel
source share
2 answers

No, really not anymore - or at least not very often. Using ECX as a counter allows you to use the LOOP instruction. This was a significant advantage at the time, but on most modern LOOP processors it takes longer than the DEC ECX / JNZ combination, wherever you are. A possible advantage is that it reduces the use of memory bandwidth, which is a bottleneck more and more. It can also be an advantage if you can use other forms, such as LOOPNZ, which can be relatively difficult to simulate using separate instructions.

+4
source share

The instruction set contains instructions that use certain registers, which are smaller (and often faster) than equivalent functions that target any register.

+5
source share

All Articles