<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span> changed
              <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Win64 prologues with frame pointers must set RBP last"
   href="http://llvm.org/bugs/show_bug.cgi?id=22467">bug 22467</a>
        <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>NEW
           </td>
           <td>RESOLVED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>---
           </td>
           <td>FIXED
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Win64 prologues with frame pointers must set RBP last"
   href="http://llvm.org/bugs/show_bug.cgi?id=22467#c3">Comment # 3</a>
              on <a class="bz_bug_link 
          bz_status_RESOLVED  bz_closed"
   title="RESOLVED FIXED - Win64 prologues with frame pointers must set RBP last"
   href="http://llvm.org/bugs/show_bug.cgi?id=22467">bug 22467</a>
              from <span class="vcard"><a class="email" href="mailto:rnk@google.com" title="Reid Kleckner <rnk@google.com>"> <span class="fn">Reid Kleckner</span></a>
</span></b>
        <pre>David fixed this in r228641. X86FrameLowering may be my least favorite class in
LLVM. Now we should emit prologues like GCC and MSVC when a frame pointer is
required:

push %rbp
.seh_pushreg N
push %rbx
.seh_pushreg N
...
sub $320, %rsp
.seh_stackalloc 320
lea -128(%rsp), %rbp
.seh_setframe 5, 240

All offsets calculated via rbp have been updated to take into account the space
used by CSRs and the space used to do stackalloc.

One thing we don't account for is the "tail call return addr delta" which comes
into play when someone asks for guaranteed tail call optimization.

Another thing we'd like to do is make __builtin_frameaddress(0) /
llvm.frameaddress(i32 0) return "%rbp + 128" in this example to recover the
stack pointer when the FP was established. The raw value of RBP is not useful
for stack unwinding anymore, but the SP at the end of the prologue can be used
in combination with the xdata tables to unwind.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>