title: x86-64 GNU Assembly
body: <p>While investigating a crash, I came across the following code snippet and immediately recognized that the <code>mov</code> instruction should actually be <code>movq</code> to get the correct 64-bit register operation.</p>
  
  <pre class="lang-c prettyprint-override"><code>#elif defined(__x86_64__)
      unsigned long rbp;
      __asm__ volatile ("mov %%rbp, %0" : "=r" (rbp));
      sp = (void **) rbp;
  #else
  </code></pre>
  
  <p>Further to this, I also found documentation that claims that the <code>rbp</code> register for x86-64 is general purpose and does not contain the address of the current frame. I have also found documentation that claims that <code>rbp</code> does contain the address of the current frame. Can someone clarify?</p>