<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Use ENTER and LEAVE instructions in function stack handling for optsize or when performant"
   href="https://bugs.llvm.org/show_bug.cgi?id=32858">32858</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Use ENTER and LEAVE instructions in function stack handling for optsize or when performant
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Backend: X86
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>llvm-dev@redking.me.uk
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>andrea.dibiagio@gmail.com, craig.topper@gmail.com, filcab@gmail.com, llvm-bugs@lists.llvm.org, spatel+llvm@rotateright.com
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>26299
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The ENTER and LEAVE instructions give us a way to start/end a stack frame in a
single instruction instead of:

ENTER N, 0 -->
push  %esp
mov   %esp, %ebp
sub   N, %esp // if we need to align the stack N must be 0 with separate
and+sub

LEAVE -->
mov %ebp, %esp
pop %ebp

They aren't fast on all architectures (especially ENTER), but can reduce
codesize and decode pressure which should be taken into account.

The AMD 15h SOG encourages the use of LEAVE (even without a corresponding
ENTER) under all circumstances.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [meta][X86] Size optimization opportunities (in particular for 32-bit Chromium on Windows)"
   href="https://bugs.llvm.org/show_bug.cgi?id=26299">Bug 26299</a>] [meta][X86] Size optimization opportunities (in particular for 32-bit Chromium on Windows)
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>