+<div class="doc_subsubsection"> <a name="i_mul">'<tt>mul</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = mul <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>mul</tt>' instruction returns the product of its two
+operands.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>mul</tt>' instruction must be either <a
+ href="#t_integer">integer</a> or <a href="#t_floating">floating point</a>
+values. Both arguments must have identical types.</p>
+<h5>Semantics:</h5>
+<p>The value produced is the integer or floating point product of the
+two operands.</p>
+<p>There is no signed vs unsigned multiplication. The appropriate
+action is taken based on the type of the operand.</p>
+<h5>Example:</h5>
+<pre> <result> = mul int 4, %var <i>; yields {int}:result = 4 * %var</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_div">'<tt>div</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = div <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>div</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. Both arguments must have identical types.</p>
+<h5>Semantics:</h5>
+<p>The value produced is the integer or 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>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_rem">'<tt>rem</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = rem <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>
+<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. Both arguments must have identical types.</p>
+<h5>Semantics:</h5>
+<p>This 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>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_setcc">'<tt>set<i>cc</i></tt>'
+Instructions</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = seteq <ty> <var1>, <var2> <i>; yields {bool}:result</i>
+ <result> = setne <ty> <var1>, <var2> <i>; yields {bool}:result</i>
+ <result> = setlt <ty> <var1>, <var2> <i>; yields {bool}:result</i>
+ <result> = setgt <ty> <var1>, <var2> <i>; yields {bool}:result</i>
+ <result> = setle <ty> <var1>, <var2> <i>; yields {bool}:result</i>
+ <result> = setge <ty> <var1>, <var2> <i>; yields {bool}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>set<i>cc</i></tt>' family of instructions returns a boolean
+value based on a comparison of their two operands.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>set<i>cc</i></tt>' instructions must
+be of <a href="#t_firstclass">first class</a> type (it is not possible
+to compare '<tt>label</tt>'s, '<tt>array</tt>'s, '<tt>structure</tt>'
+or '<tt>void</tt>' values, etc...). Both arguments must have identical
+types.</p>
+<h5>Semantics:</h5>
+<p>The '<tt>seteq</tt>' instruction yields a <tt>true</tt> '<tt>bool</tt>'
+value if both operands are equal.<br>
+The '<tt>setne</tt>' instruction yields a <tt>true</tt> '<tt>bool</tt>'
+value if both operands are unequal.<br>
+The '<tt>setlt</tt>' instruction yields a <tt>true</tt> '<tt>bool</tt>'
+value if the first operand is less than the second operand.<br>
+The '<tt>setgt</tt>' instruction yields a <tt>true</tt> '<tt>bool</tt>'
+value if the first operand is greater than the second operand.<br>
+The '<tt>setle</tt>' instruction yields a <tt>true</tt> '<tt>bool</tt>'
+value if the first operand is less than or equal to the second operand.<br>
+The '<tt>setge</tt>' instruction yields a <tt>true</tt> '<tt>bool</tt>'
+value if the first operand is greater than or equal to the second
+operand.</p>
+<h5>Example:</h5>
+<pre> <result> = seteq int 4, 5 <i>; yields {bool}:result = false</i>
+ <result> = setne float 4, 5 <i>; yields {bool}:result = true</i>
+ <result> = setlt uint 4, 5 <i>; yields {bool}:result = true</i>
+ <result> = setgt sbyte 4, 5 <i>; yields {bool}:result = false</i>
+ <result> = setle sbyte 4, 5 <i>; yields {bool}:result = true</i>
+ <result> = setge sbyte 4, 5 <i>; yields {bool}:result = false</i>
+</pre>
+</div>
+<!-- ======================================================================= -->
+<div class="doc_subsection"> <a name="bitwiseops">Bitwise Binary
+Operations</a> </div>
+<div class="doc_text">
+<p>Bitwise binary operators are used to do various forms of
+bit-twiddling in a program. They are generally very efficient
+instructions, and can commonly be strength reduced from other
+instructions. They require two operands, execute an operation on them,
+and produce a single value. The resulting value of the bitwise binary
+operators is always the same type as its first operand.</p>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_and">'<tt>and</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = and <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>and</tt>' instruction returns the bitwise logical and of
+its two operands.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>and</tt>' instruction must be <a
+ href="#t_integral">integral</a> values. Both arguments must have
+identical types.</p>
+<h5>Semantics:</h5>
+<p>The truth table used for the '<tt>and</tt>' instruction is:</p>
+<p> </p>
+<div style="align: center">
+<table border="1" cellspacing="0" cellpadding="4">
+ <tbody>
+ <tr>
+ <td>In0</td>
+ <td>In1</td>
+ <td>Out</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>1</td>
+ <td>0</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>0</td>
+ <td>0</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>1</td>
+ <td>1</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<h5>Example:</h5>
+<pre> <result> = and int 4, %var <i>; yields {int}:result = 4 & %var</i>
+ <result> = and int 15, 40 <i>; yields {int}:result = 8</i>
+ <result> = and int 4, 8 <i>; yields {int}:result = 0</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_or">'<tt>or</tt>' Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = or <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>or</tt>' instruction returns the bitwise logical inclusive
+or of its two operands.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>or</tt>' instruction must be <a
+ href="#t_integral">integral</a> values. Both arguments must have
+identical types.</p>
+<h5>Semantics:</h5>
+<p>The truth table used for the '<tt>or</tt>' instruction is:</p>
+<p> </p>
+<div style="align: center">
+<table border="1" cellspacing="0" cellpadding="4">
+ <tbody>
+ <tr>
+ <td>In0</td>
+ <td>In1</td>
+ <td>Out</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>1</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>0</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>1</td>
+ <td>1</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<h5>Example:</h5>
+<pre> <result> = or int 4, %var <i>; yields {int}:result = 4 | %var</i>
+ <result> = or int 15, 40 <i>; yields {int}:result = 47</i>
+ <result> = or int 4, 8 <i>; yields {int}:result = 12</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_xor">'<tt>xor</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = xor <ty> <var1>, <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>xor</tt>' instruction returns the bitwise logical exclusive
+or of its two operands. The <tt>xor</tt> is used to implement the
+"one's complement" operation, which is the "~" operator in C.</p>
+<h5>Arguments:</h5>
+<p>The two arguments to the '<tt>xor</tt>' instruction must be <a
+ href="#t_integral">integral</a> values. Both arguments must have
+identical types.</p>
+<h5>Semantics:</h5>
+<p>The truth table used for the '<tt>xor</tt>' instruction is:</p>
+<p> </p>
+<div style="align: center">
+<table border="1" cellspacing="0" cellpadding="4">
+ <tbody>
+ <tr>
+ <td>In0</td>
+ <td>In1</td>
+ <td>Out</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>0</td>
+ <td>0</td>
+ </tr>
+ <tr>
+ <td>0</td>
+ <td>1</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>0</td>
+ <td>1</td>
+ </tr>
+ <tr>
+ <td>1</td>
+ <td>1</td>
+ <td>0</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+<p> </p>
+<h5>Example:</h5>
+<pre> <result> = xor int 4, %var <i>; yields {int}:result = 4 ^ %var</i>
+ <result> = xor int 15, 40 <i>; yields {int}:result = 39</i>
+ <result> = xor int 4, 8 <i>; yields {int}:result = 12</i>
+ <result> = xor int %V, -1 <i>; yields {int}:result = ~%V</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_shl">'<tt>shl</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = shl <ty> <var1>, ubyte <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>shl</tt>' instruction returns the first operand shifted to
+the left a specified number of bits.</p>
+<h5>Arguments:</h5>
+<p>The first argument to the '<tt>shl</tt>' instruction must be an <a
+ href="#t_integer">integer</a> type. The second argument must be an '<tt>ubyte</tt>'
+type.</p>
+<h5>Semantics:</h5>
+<p>The value produced is <tt>var1</tt> * 2<sup><tt>var2</tt></sup>.</p>
+<h5>Example:</h5>
+<pre> <result> = shl int 4, ubyte %var <i>; yields {int}:result = 4 << %var</i>
+ <result> = shl int 4, ubyte 2 <i>; yields {int}:result = 16</i>
+ <result> = shl int 1, ubyte 10 <i>; yields {int}:result = 1024</i>
+</pre>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_shr">'<tt>shr</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = shr <ty> <var1>, ubyte <var2> <i>; yields {ty}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>shr</tt>' instruction returns the first operand shifted to
+the right a specified number of bits.</p>
+<h5>Arguments:</h5>
+<p>The first argument to the '<tt>shr</tt>' instruction must be an <a
+ href="#t_integer">integer</a> type. The second argument must be an '<tt>ubyte</tt>'
+type.</p>
+<h5>Semantics:</h5>
+<p>If the first argument is a <a href="#t_signed">signed</a> type, the
+most significant bit is duplicated in the newly free'd bit positions.
+If the first argument is unsigned, zero bits shall fill the empty
+positions.</p>
+<h5>Example:</h5>
+<pre> <result> = shr int 4, ubyte %var <i>; yields {int}:result = 4 >> %var</i>
+ <result> = shr uint 4, ubyte 1 <i>; yields {uint}:result = 2</i>
+ <result> = shr int 4, ubyte 2 <i>; yields {int}:result = 1</i>
+ <result> = shr sbyte 4, ubyte 3 <i>; yields {sbyte}:result = 0</i>
+ <result> = shr sbyte -2, ubyte 1 <i>; yields {sbyte}:result = -1</i>
+</pre>
+</div>
+<!-- ======================================================================= -->
+<div class="doc_subsection"> <a name="memoryops">Memory Access
+Operations</a></div>
+<div class="doc_text">
+<p>A key design point of an SSA-based representation is how it
+represents memory. In LLVM, no memory locations are in SSA form, which
+makes things very simple. This section describes how to read, write,
+allocate and free memory in LLVM.</p>
+</div>
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_malloc">'<tt>malloc</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre> <result> = malloc <type>, uint <NumElements> <i>; yields {type*}:result</i>
+ <result> = malloc <type> <i>; yields {type*}:result</i>
+</pre>
+<h5>Overview:</h5>
+<p>The '<tt>malloc</tt>' instruction allocates memory from the system
+heap and returns a pointer to it.</p>
+<h5>Arguments:</h5>
+<p>The '<tt>malloc</tt>' instruction allocates <tt>sizeof(<type>)*NumElements</tt>
+bytes of memory from the operating system and returns a pointer of the
+appropriate type to the program. The second form of the instruction is
+a shorter version of the first instruction that defaults to allocating
+one element.</p>
+<p>'<tt>type</tt>' must be a sized type.</p>
+<h5>Semantics:</h5>
+<p>Memory is allocated using the system "<tt>malloc</tt>" function, and
+a pointer is returned.</p>
+<h5>Example:</h5>
+<pre> %array = malloc [4 x ubyte ] <i>; yields {[%4 x ubyte]*}:array</i>