title: What does "nop dword ptr [rax+rax]" x64 assembly instruction do?
body: <p>I'm trying to understand the <code>x64</code> assembly optimization that is done by the compiler.</p>
  
  <p>I compiled a small C++ project as <code>Release</code> build with <code>Visual Studio 2008 SP1</code> IDE on Windows 8.1.</p>
  
  <p>And one of the lines contained the following assembly code:</p>
  
  <pre><code>B8 31 00 00 00   mov         eax,31h
  0F 1F 44 00 00   nop         dword ptr [rax+rax]
  </code></pre>
  
  <p>And here's a screenshot:</p>
  
  <p><a href="https://i.stack.imgur.com/M3Hwc.png" rel="noreferrer"><img src="https://i.stack.imgur.com/M3Hwc.png" alt="enter image description here"></a></p>
  
  <p>As far as I know <code>nop</code> by itself is <code>do nothing</code>, but I've never seen it with an operand like that.</p>
  
  <p>Can someone explain what does it do?</p>