[llvm-commits] CVS: llvm/docs/LangRef.html
Reid Spencer
reid at x10sys.com
Wed Oct 25 23:16:28 PDT 2006
Changes in directory llvm/docs:
LangRef.html updated: 1.158 -> 1.159
---
Log message:
For PR950: http://llvm.org/PR950 :
Make necessary changes to support DIV -> [SUF]Div. This changes llvm to
have three division instructions: signed, unsigned, floating point. The
bytecode and assembler are bacwards compatible, however.
---
Diffs of the changes: (+59 -13)
LangRef.html | 72 ++++++++++++++++++++++++++++++++++++++++++++++++-----------
1 files changed, 59 insertions(+), 13 deletions(-)
Index: llvm/docs/LangRef.html
diff -u llvm/docs/LangRef.html:1.158 llvm/docs/LangRef.html:1.159
--- llvm/docs/LangRef.html:1.158 Sun Oct 15 15:05:59 2006
+++ llvm/docs/LangRef.html Thu Oct 26 01:15:43 2006
@@ -77,7 +77,9 @@
<li><a href="#i_add">'<tt>add</tt>' Instruction</a></li>
<li><a href="#i_sub">'<tt>sub</tt>' Instruction</a></li>
<li><a href="#i_mul">'<tt>mul</tt>' Instruction</a></li>
- <li><a href="#i_div">'<tt>div</tt>' Instruction</a></li>
+ <li><a href="#i_udiv">'<tt>udiv</tt>' Instruction</a></li>
+ <li><a href="#i_sdiv">'<tt>sdiv</tt>' Instruction</a></li>
+ <li><a href="#i_fdiv">'<tt>fdiv</tt>' Instruction</a></li>
<li><a href="#i_rem">'<tt>rem</tt>' Instruction</a></li>
<li><a href="#i_setcc">'<tt>set<i>cc</i></tt>' Instructions</a></li>
</ol>
@@ -1630,26 +1632,70 @@
</pre>
</div>
<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection"> <a name="i_div">'<tt>div</tt>'
+<div class="doc_subsubsection"> <a name="i_udiv">'<tt>udiv</tt>' Instruction
+</a></div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = udiv <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>udiv</tt>' instruction returns the quotient of its two
+operands.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>udiv</tt>' instruction must be
+<a href="#t_integer">integer</a> values. Both arguments must have identical
+types. This instruction can also take <a href="#t_packed">packed</a> versions
+of the values in which case the elements must be integers.</p>
+<h5>Semantics:</h5>
+<p>The value produced is the unsigned integer quotient of the two operands. This
+instruction always performs an unsigned division operation, regardless of
+whether the arguments are unsigned or not.</p>
+<h5>Example:</h5>
+<pre> <result> = udiv uint 4, %var <i>; yields {uint}:result = 4 / %var</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_sdiv">'<tt>sdiv</tt>' Instruction
+</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = sdiv <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>sdiv</tt>' instruction returns the quotient of its two
+operands.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>sdiv</tt>' instruction must be
+<a href="#t_integer">integer</a> values. Both arguments must have identical
+types. This instruction can also take <a href="#t_packed">packed</a> versions
+of the values in which case the elements must be integers.</p>
+<h5>Semantics:</h5>
+<p>The value produced is the signed integer quotient of the two operands. This
+instruction always performs a signed division operation, regardless of whether
+the arguments are signed or not.</p>
+<h5>Example:</h5>
+<pre> <result> = sdiv int 4, %var <i>; yields {int}:result = 4 / %var</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_fdiv">'<tt>fdiv</tt>'
Instruction</a> </div>
<div class="doc_text">
<h5>Syntax:</h5>
-<pre> <result> = div <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+<pre> <result> = fdiv <ty> <var1>, <var2> <i>; yields {ty}:result</i>
</pre>
<h5>Overview:</h5>
-<p>The '<tt>div</tt>' instruction returns the quotient of its two
+<p>The '<tt>fdiv</tt>' instruction returns the quotient of its two
operands.</p>
<h5>Arguments:</h5>
-<p>The two arguments to the '<tt>div</tt>' instruction must be either <a
- href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
-values.
-This instruction can also take <a href="#t_packed">packed</a> versions of the values.
-Both arguments must have identical types.</p>
+<p>The two arguments to the '<tt>div</tt>' instruction must be
+<a href="#t_floating">floating point</a> values. Both arguments must have
+identical types. This instruction can also take <a href="#t_packed">packed</a>
+versions of the values in which case the elements must be floating point.</p>
<h5>Semantics:</h5>
-<p>The value produced is the integer or floating point quotient of the
-two operands.</p>
+<p>The value produced is the floating point quotient of the two operands.</p>
<h5>Example:</h5>
-<pre> <result> = div int 4, %var <i>; yields {int}:result = 4 / %var</i>
+<pre> <result> = fdiv float 4.0, %var <i>; yields {float}:result = 4.0 / %var</i>
</pre>
</div>
<!-- _______________________________________________________________________ -->
@@ -3910,7 +3956,7 @@
<a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
<a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
- Last modified: $Date: 2006/10/15 20:05:59 $
+ Last modified: $Date: 2006/10/26 06:15:43 $
</address>
</body>
</html>
More information about the llvm-commits
mailing list