Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>No, there is no hidden indication.</p> <p>This is a typical strategy for generating 80x86 instructions used by many compiler implementations, <code>C</code> and otherwise. For example, the 1980s Intel Fortran-77 compiler, when optimization was turned on, did the same thing.</p> <p>That is uses <code>eax</code> and <code>ecx</code> preferentially is probably an artifact of avoiding use of <code>esi</code> and <code>edi</code> since those registers cannot directly be used to load byte operands.</p> <p>Why not <code>ebx</code> and <code>edx</code>? Well, those are preferred by many code generators for holding intermediate pointers in evaluating complex structure evaluation, which is to say, there isn't much reason at all. The compiler just looked for two available registers to use and overwrote them to buffer the values.</p> <p>Why not reuse <code>eax</code> like this?:</p> <pre><code> push esi mov eax,dword ptr [esp+2Ch] push eax mov eax,dword ptr [esp+8] push eax mov eax,dword ptr [esp+4] push eax </code></pre> <p>Because that causes pipeline stalls waiting for <code>eax</code> to complete previous memory cycles, in 80x86s since the 80586 (maybe 80486—it's too long ago to be sure off the top of my head).</p> <p>The x86 architecture is a strange beast. Each register, though promoted as being "general purpose" by Intel, has its quirks (<code>cx</code>/<code>ecx</code> is tied to the <code>loop</code> instruction for example, and <code>eax:edx</code> is tied to the multiply instruction). That combined with the peculiar ways to optimize execution to avoid cache misses and pipeline stalls often leads to inscrutable generated code by a code generator which factors all that in.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload