[llvm-commits] CVS: llvm/docs/LangRef.html
Chris Lattner
lattner at cs.uiuc.edu
Thu Jan 12 18:03:26 PST 2006
Changes in directory llvm/docs:
LangRef.html updated: 1.122 -> 1.123
---
Log message:
Add llvm.stacksave and llvm.stackrestore.
---
Diffs of the changes: (+69 -1)
LangRef.html | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-
1 files changed, 69 insertions(+), 1 deletion(-)
Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.122 llvm/docs/LangRef.html:1.123
--- llvm/docs/LangRef.html:1.122 Thu Jan 12 19:20:27 2006
+++ llvm/docs/LangRef.html Thu Jan 12 20:03:13 2006
@@ -127,6 +127,8 @@
<ol>
<li><a href="#i_returnaddress">'<tt>llvm.returnaddress</tt>' Intrinsic</a></li>
<li><a href="#i_frameaddress">'<tt>llvm.frameaddress</tt>' Intrinsic</a></li>
+ <li><a href="#i_stacksave">'<tt>llvm.stacksave</tt>' Intrinsic</a></li>
+ <li><a href="#i_stackrestore">'<tt>llvm.stackrestore</tt>' Intrinsic</a></li>
<li><a href="#i_prefetch">'<tt>llvm.prefetch</tt>' Intrinsic</a></li>
<li><a href="#i_pcmarker">'<tt>llvm.pcmarker</tt>' Intrinsic</a></li>
<li><a href="#i_readcyclecounter"><tt>llvm.readcyclecounter</tt>' Intrinsic</a></li>
@@ -2789,6 +2791,72 @@
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
+ <a name="i_stacksave">'<tt>llvm.stacksave</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare sbyte *%llvm.stacksave()
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.stacksave</tt>' intrinsic is used to remember the current state of
+the function stack, for use with <a href="#i_stackrestore">
+<tt>llvm.stackrestore</tt></a>. This is useful for implementing language
+features like scoped automatic variable sized arrays in C99.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+This intrinsic returns a opaque pointer value that can be passed to <a
+href="#i_stackrestore"><tt>llvm.stackrestore</tt></a>. When an
+<tt>llvm.stackrestore</tt> intrinsic is executed with a value saved from
+<tt>llvm.stacksave</tt>, it effectively restores the state of the stack to the
+state it was in when the <tt>llvm.stacksave</tt> intrinsic executed. In
+practice, this pops any <a href="#i_alloca">alloca</a> blocks from the stack
+that were allocated after the <tt>llvm.stacksave</tt> was executed.
+</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+ <a name="i_stackrestore">'<tt>llvm.stackrestore</tt>' Intrinsic</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+<pre>
+ declare void %llvm.stackrestore(sbyte* %ptr)
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>llvm.stackrestore</tt>' intrinsic is used to restore the state of
+the function stack to the state it was in when the corresponding <a
+href="#llvm.stacksave"><tt>llvm.stacksave</tt></a> intrinsic executed. This is
+useful for implementing language features like scoped automatic variable sized
+arrays in C99.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+See the description for <a href="#i_stacksave"><tt>llvm.stacksave</tt></a>.
+</p>
+
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
<a name="i_prefetch">'<tt>llvm.prefetch</tt>' Intrinsic</a>
</div>
@@ -3481,7 +3549,7 @@
<a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
<a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2006/01/13 01:20:27 $
+ Last modified: $Date: 2006/01/13 02:03:13 $
</address>
</body>
</html>
More information about the llvm-commits
mailing list