Changes in directory llvm/docs:
LangRef.html updated: 1.159 -> 1.160 --- Log message: For PR950: http://llvm.org/PR950 : Replace the REM instruction with UREM, SREM and FREM. --- Diffs of the changes: (+57 -13) LangRef.html | 70 ++++++++++++++++++++++++++++++++++++++++++++++++----------- 1 files changed, 57 insertions(+), 13 deletions(-) Index: llvm/docs/LangRef.html diff -u llvm/docs/LangRef.html:1.159 llvm/docs/LangRef.html:1.160 --- llvm/docs/LangRef.html:1.159 Thu Oct 26 01:15:43 2006 +++ llvm/docs/LangRef.html Wed Nov 1 19:53:58 2006 @@ -80,7 +80,9 @@ <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_urem">'<tt>urem</tt>' Instruction</a></li> + <li><a href="#i_srem">'<tt>srem</tt>' Instruction</a></li> + <li><a href="#i_frem">'<tt>frem</tt>' Instruction</a></li> <li><a href="#i_setcc">'<tt>set<i>cc</i></tt>' Instructions</a></li> </ol> </li> @@ -1699,30 +1701,72 @@ </pre> </div> <!-- _______________________________________________________________________ --> -<div class="doc_subsubsection"> <a name="i_rem">'<tt>rem</tt>' +<div class="doc_subsubsection"> <a name="i_urem">'<tt>urem</tt>' Instruction</a> +</div> +<div class="doc_text"> +<h5>Syntax:</h5> +<pre> <result> = urem <ty> <var1>, <var2> <i>; yields {ty}:result</i> +</pre> +<h5>Overview:</h5> +<p>The '<tt>urem</tt>' instruction returns the remainder from the +unsigned division of its two arguments.</p> +<h5>Arguments:</h5> +<p>The two arguments to the '<tt>urem</tt>' instruction must be +<a href="#t_integer">integer</a> values. Both arguments must have identical +types.</p> +<h5>Semantics:</h5> +<p>This instruction returns the unsigned integer <i>remainder</i> of a division. +This instruction always performs an unsigned division to get the remainder, +regardless of whether the arguments are unsigned or not.</p> +<h5>Example:</h5> +<pre> <result> = urem uint 4, %var <i>; yields {uint}:result = 4 % %var</i> +</pre> + +</div> +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection"> <a name="i_srem">'<tt>srem</tt>' Instruction</a> </div> <div class="doc_text"> <h5>Syntax:</h5> -<pre> <result> = rem <ty> <var1>, <var2> <i>; yields {ty}:result</i> +<pre> <result> = srem <ty> <var1>, <var2> <i>; yields {ty}:result</i> </pre> <h5>Overview:</h5> -<p>The '<tt>rem</tt>' instruction returns the remainder from the -division of its two operands.</p> +<p>The '<tt>srem</tt>' instruction returns the remainder from the +signed division of its two operands.</p> <h5>Arguments:</h5> -<p>The two arguments to the '<tt>rem</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>srem</tt>' instruction must be +<a href="#t_integer">integer</a> values. Both arguments must have identical +types.</p> <h5>Semantics:</h5> -<p>This returns the <i>remainder</i> of a division (where the result +<p>This instruction returns the <i>remainder</i> of a division (where the result has the same sign as the divisor), not the <i>modulus</i> (where the result has the same sign as the dividend) of a value. For more information about the difference, see <a href="http://mathforum.org/dr.math/problems/anne.4.28.99.html">The Math Forum</a>.</p> <h5>Example:</h5> -<pre> <result> = rem int 4, %var <i>; yields {int}:result = 4 % %var</i> +<pre> <result> = srem int 4, %var <i>; yields {int}:result = 4 % %var</i> +</pre> + +</div> +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection"> <a name="i_frem">'<tt>frem</tt>' +Instruction</a> </div> +<div class="doc_text"> +<h5>Syntax:</h5> +<pre> <result> = frem <ty> <var1>, <var2> <i>; yields {ty}:result</i> +</pre> +<h5>Overview:</h5> +<p>The '<tt>frem</tt>' instruction returns the remainder from the +division of its two operands.</p> +<h5>Arguments:</h5> +<p>The two arguments to the '<tt>frem</tt>' instruction must be +<a href="#t_floating">floating point</a> values. Both arguments must have +identical types.</p> +<h5>Semantics:</h5> +<p>This instruction returns the <i>remainder</i> of a division.</p> +<h5>Example:</h5> +<pre> <result> = frem float 4.0, %var <i>; yields {float}:result = 4.0 % %var</i> </pre> </div> @@ -3956,7 +4000,7 @@ <a href="mailto:[EMAIL PROTECTED]">Chris Lattner</a><br> <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br> - Last modified: $Date: 2006/10/26 06:15:43 $ + Last modified: $Date: 2006/11/02 01:53:58 $ </address> </body> </html> _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits