title: What is the difference between "lea eax, [ebx + eax]" and "add eax, ebx" in x86-32 assembly?
body: <p>GCC made me some assembly code, and inside theres this statement:</p>
  
  <pre><code>lea eax, [ebx+eax]
  </code></pre>
  
  <p>(Intel Syntax)
  Just curious, what would the difference between that, and:</p>
  
  <pre><code>add eax, ebx
  </code></pre>
  
  <p>Be?</p>
  
  <p>eax, and ebx contains return values from functions :)</p>
  
  <pre><code>mov eax, DWORD PTR [ebp+8]
  mov DWORD PTR [esp], eax 
  call CALC1
  mov ebx, eax.
  mov eax, DWORD PTR [ebp+8]
  mov DWORD PTR [esp], eax
  call CALC2
  lea eax, [ebx+eax]
  </code></pre>