title: Why does the compiler generate this code?
body: <p>I disassembled an object file (most likely generated using the Visual C++ compiler) using <code>DumpBin</code> and saw the following piece of code:</p>
  
  <pre><code>...         ...
  mov         dword ptr [ebp-4],eax       // Why save EAX?
  push        dword ptr [ebp+14h]
  push        dword ptr [ebp+10h]
  push        dword ptr [ebp+0Ch]
  push        dword ptr [ebp+8]
  mov         eax,dword ptr [ebp-4]       // Why restore EAX? Did it change at all?
  call        &lt;function&gt;
  ...         ...
  </code></pre>
  
  <p>Could someone please explain why the EAX register is being saved and restored across these 4 <code>push</code> instructions?</p>