<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - LLVM hardcodes stack probe space to 4096 bytes"
   href="http://llvm.org/bugs/show_bug.cgi?id=21895">21895</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>LLVM hardcodes stack probe space to 4096 bytes
          </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>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>clangbugs.10.mdwxzxkl@spamgourmet.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The LLVM stack probe space (e.g. used for issuing __chkstk() calls when
compiling to Windows targets) is hard coded to 4096 bytes. However, in order to
suppress __chkstk() calls, it should be possible to specify a minimum value for
issuing stack probe calls that is greater than 4096 bytes. 

This is needed in order to properly implement the /Gs switch of the MSVC
compiler. 

The /Gs compiler switch is needed to suppress calls to __chkstk (the stack
probing function used by MSVC), e.g. when one carefully uses stack memory so
that all necessary stack probes are initiated, or when compiling with
/NODEFAULTLIB (as __chkstk would then be undefined). 

Reference to the hardcoded value of 4096 bytes:
<a href="http://llvm.org/klaus/llvm/blob/master/lib/Target/X86/X86FrameLowering.cpp#L-709">http://llvm.org/klaus/llvm/blob/master/lib/Target/X86/X86FrameLowering.cpp#L-709</a>

Reference:
<a href="http://msdn.microsoft.com/en-us/library/9598wk25">http://msdn.microsoft.com/en-us/library/9598wk25</a></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>