Fix a problem with use of undefined variables. Print an error message if
[oota-llvm.git] / docs / LangRef.html
index be4725ce10156dd3ff67aed5733c51802ba170ce..6e339f6616dd616d747a0227a5ebac5d3f07356a 100644 (file)
       <li><a href="#linkage">Linkage Types</a></li>
       <li><a href="#callingconv">Calling Conventions</a></li>
       <li><a href="#globalvars">Global Variables</a></li>
-      <li><a href="#functionstructure">Function Structure</a></li>
+      <li><a href="#functionstructure">Functions</a></li>
+      <li><a href="#moduleasm">Module-Level Inline Assembly</a></li>
     </ol>
   </li>
   <li><a href="#typesystem">Type System</a>
     <ol>
-      <li><a href="#t_primitive">Primitive Types</a>   
+      <li><a href="#t_primitive">Primitive Types</a>    
         <ol>
           <li><a href="#t_classifications">Type Classifications</a></li>
         </ol>
       <li><a href="#constantexprs">Constant Expressions</a>
     </ol>
   </li>
+  <li><a href="#othervalues">Other Values</a>
+    <ol>
+      <li><a href="#inlineasm">Inline Assembler Expressions</a>
+    </ol>
+  </li>
   <li><a href="#instref">Instruction Reference</a>
     <ol>
       <li><a href="#terminators">Terminator Instructions</a>
           <li><a href="#i_shr">'<tt>shr</tt>' Instruction</a></li>
         </ol>
       </li>
+      <li><a href="#vectorops">Vector Operations</a>
+        <ol>
+          <li><a href="#i_extractelement">'<tt>extractelement</tt>' Instruction</a></li>
+          <li><a href="#i_insertelement">'<tt>insertelement</tt>' Instruction</a></li>
+          <li><a href="#i_shufflevector">'<tt>shufflevector</tt>' Instruction</a></li>
+          <li><a href="#i_vsetint">'<tt>vsetint</tt>' Instruction</a></li>
+          <li><a href="#i_vsetfp">'<tt>vsetfp</tt>' Instruction</a></li>
+          <li><a href="#i_vselect">'<tt>vselect</tt>' Instruction</a></li>
+        </ol>
+      </li>
       <li><a href="#memoryops">Memory Access Operations</a>
         <ol>
           <li><a href="#i_malloc">'<tt>malloc</tt>'   Instruction</a></li>
           <li><a href="#i_free">'<tt>free</tt>'     Instruction</a></li>
           <li><a href="#i_alloca">'<tt>alloca</tt>'   Instruction</a></li>
-        <li><a href="#i_load">'<tt>load</tt>'     Instruction</a></li>
-        <li><a href="#i_store">'<tt>store</tt>'    Instruction</a></li>
-        <li><a href="#i_getelementptr">'<tt>getelementptr</tt>' Instruction</a></li>
+         <li><a href="#i_load">'<tt>load</tt>'     Instruction</a></li>
+         <li><a href="#i_store">'<tt>store</tt>'    Instruction</a></li>
+         <li><a href="#i_getelementptr">'<tt>getelementptr</tt>' Instruction</a></li>
         </ol>
       </li>
       <li><a href="#otherops">Other Operations</a>
           <li><a href="#i_phi">'<tt>phi</tt>'   Instruction</a></li>
           <li><a href="#i_cast">'<tt>cast .. to</tt>' Instruction</a></li>
           <li><a href="#i_select">'<tt>select</tt>' Instruction</a></li>
-          <li><a href="#i_extractelement">'<tt>extractelement</tt>' Instruction</a></li>
-          <li><a href="#i_insertelement">'<tt>insertelement</tt>' Instruction</a></li>
           <li><a href="#i_call">'<tt>call</tt>'  Instruction</a></li>
           <li><a href="#i_va_arg">'<tt>va_arg</tt>'  Instruction</a></li>
         </ol>
           <li><a href="#i_readcyclecounter"><tt>llvm.readcyclecounter</tt>' Intrinsic</a></li>
         </ol>
       </li>
-      <li><a href="#int_os">Operating System Intrinsics</a>
-        <ol>
-          <li><a href="#i_readport">'<tt>llvm.readport</tt>' Intrinsic</a></li>
-          <li><a href="#i_writeport">'<tt>llvm.writeport</tt>' Intrinsic</a></li>
-          <li><a href="#i_readio">'<tt>llvm.readio</tt>'   Intrinsic</a></li>
-          <li><a href="#i_writeio">'<tt>llvm.writeio</tt>'   Intrinsic</a></li>
-        </ol>
       <li><a href="#int_libc">Standard C Library Intrinsics</a>
         <ol>
-          <li><a href="#i_memcpy">'<tt>llvm.memcpy</tt>' Intrinsic</a></li>
-          <li><a href="#i_memmove">'<tt>llvm.memmove</tt>' Intrinsic</a></li>
-          <li><a href="#i_memset">'<tt>llvm.memset</tt>' Intrinsic</a></li>
-          <li><a href="#i_isunordered">'<tt>llvm.isunordered</tt>' Intrinsic</a></li>
-          <li><a href="#i_sqrt">'<tt>llvm.sqrt</tt>' Intrinsic</a></li>
+          <li><a href="#i_memcpy">'<tt>llvm.memcpy.*</tt>' Intrinsic</a></li>
+          <li><a href="#i_memmove">'<tt>llvm.memmove.*</tt>' Intrinsic</a></li>
+          <li><a href="#i_memset">'<tt>llvm.memset.*</tt>' Intrinsic</a></li>
+          <li><a href="#i_isunordered">'<tt>llvm.isunordered.*</tt>' Intrinsic</a></li>
+          <li><a href="#i_sqrt">'<tt>llvm.sqrt.*</tt>' Intrinsic</a></li>
 
         </ol>
       </li>
@@ -343,6 +350,9 @@ symbol table entries. Here is an example of the "hello world" module:</p>
 <i>; External declaration of the puts function</i>
 <a href="#functionstructure">declare</a> int %puts(sbyte*)                                            <i>; int(sbyte*)* </i>
 
+<i>; Global variable / Function body section separator</i>
+implementation
+
 <i>; Definition of main function</i>
 int %main() {                                                        <i>; int()* </i>
         <i>; Convert [13x sbyte]* to sbyte *...</i>
@@ -366,6 +376,13 @@ represented by a pointer to a memory location (in this case, a pointer to an
 array of char, and a pointer to a function), and have one of the following <a
 href="#linkage">linkage types</a>.</p>
 
+<p>Due to a limitation in the current LLVM assembly parser (it is limited by
+one-token lookahead), modules are split into two pieces by the "implementation"
+keyword.  Global variable prototypes and definitions must occur before the
+keyword, and function definitions must occur after it.  Function prototypes may
+occur either before or after it.  In the future, the implementation keyword may
+become a noop, if the parser gets smarter.</p>
+
 </div>
 
 <!-- ======================================================================= -->
@@ -457,6 +474,19 @@ the future:</p>
   prototype and implemented declaration of the function (as does normal C).
   </dd>
 
+  <dt><b>"<tt>csretcc</tt>" - The C struct return calling convention</b>:</dt>
+
+  <dd>This calling convention matches the target C calling conventions, except
+  that functions with this convention are required to take a pointer as their
+  first argument, and the return type of the function must be void.  This is
+  used for C functions that return aggregates by-value.  In this case, the
+  function has been transformed to take a pointer to the struct as the first
+  argument to the function.  For targets where the ABI specifies specific
+  behavior for structure-return calls, the calling convention can be used to
+  distinguish between struct return functions and other functions that take a
+  pointer to a struct as the first argument.
+  </dd>
+
   <dt><b>"<tt>fastcc</tt>" - The fast calling convention</b>:</dt>
 
   <dd>This calling convention attempts to make calls as fast as possible
@@ -580,6 +610,34 @@ a power of 2.</p>
 
 </div>
 
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+  <a name="moduleasm">Module-Level Inline Assembly</a>
+</div>
+
+<div class="doc_text">
+<p>
+Modules may contain "module-level inline asm" blocks, which corresponds to the
+GCC "file scope inline asm" blocks.  These blocks are internally concatenated by
+LLVM and treated as a single unit, but may be separated in the .ll file if
+desired.  The syntax is very simple:
+</p>
+
+<div class="doc_code"><pre>
+  module asm "inline asm code goes here"
+  module asm "more can go here"
+</pre></div>
+
+<p>The strings can contain any character by escaping non-printable characters.
+   The escape sequence used is simply "\xx" where "xx" is the two digit hex code
+   for the number.
+</p>
+
+<p>
+  The inline asm code is simply printed to the machine code .s file when
+  assembly code is generated.
+</p>
+</div>
 
 
 <!-- *********************************************************************** -->
@@ -1105,6 +1163,12 @@ following is the syntax for constant expressions:</p>
   <dd>Perform the <a href="#i_insertelement">insertelement
   operation</a> on constants.
 
+
+  <dt><b><tt>shufflevector ( VEC1, VEC2, IDXMASK )</tt></b></dt>
+
+  <dd>Perform the <a href="#i_shufflevector">shufflevector
+  operation</a> on constants.
+
   <dt><b><tt>OPCODE ( LHS, RHS )</tt></b></dt>
 
   <dd>Perform the specified operation of the LHS and RHS constants. OPCODE may 
@@ -1115,6 +1179,56 @@ following is the syntax for constant expressions:</p>
 </dl>
 </div>
 
+<!-- *********************************************************************** -->
+<div class="doc_section"> <a name="othervalues">Other Values</a> </div>
+<!-- *********************************************************************** -->
+
+<!-- ======================================================================= -->
+<div class="doc_subsection">
+<a name="inlineasm">Inline Assembler Expressions</a>
+</div>
+
+<div class="doc_text">
+
+<p>
+LLVM supports inline assembler expressions (as opposed to <a href="#moduleasm">
+Module-Level Inline Assembly</a>) through the use of a special value.  This
+value represents the inline assembler as a string (containing the instructions
+to emit), a list of operand constraints (stored as a string), and a flag that 
+indicates whether or not the inline asm expression has side effects.  An example
+inline assembler expression is:
+</p>
+
+<pre>
+  int(int) asm "bswap $0", "=r,r"
+</pre>
+
+<p>
+Inline assembler expressions may <b>only</b> be used as the callee operand of
+a <a href="#i_call"><tt>call</tt> instruction</a>.  Thus, typically we have:
+</p>
+
+<pre>
+  %X = call int asm "<a href="#i_bswap">bswap</a> $0", "=r,r"(int %Y)
+</pre>
+
+<p>
+Inline asms with side effects not visible in the constraint list must be marked
+as having side effects.  This is done through the use of the
+'<tt>sideeffect</tt>' keyword, like so:
+</p>
+
+<pre>
+  call void asm sideeffect "eieio", ""()
+</pre>
+
+<p>TODO: The format of the asm and constraints string still need to be
+documented here.  Constraints on what can be done (e.g. duplication, moving, etc
+need to be documented).
+</p>
+
+</div>
+
 <!-- *********************************************************************** -->
 <div class="doc_section"> <a name="instref">Instruction Reference</a> </div>
 <!-- *********************************************************************** -->
@@ -1280,7 +1394,7 @@ branches or with a lookup table.</p>
 
 <pre>
   &lt;result&gt; = invoke [<a href="#callingconv">cconv</a>] &lt;ptr to function ty&gt; %&lt;function ptr val&gt;(&lt;function args&gt;) 
-                to label &lt;normal label&gt; except label &lt;exception label&gt;
+                to label &lt;normal label&gt; unwind label &lt;exception label&gt;
 </pre>
 
 <h5>Overview:</h5>
@@ -1341,9 +1455,9 @@ exception.  Additionally, this is important for implementation of
 <h5>Example:</h5>
 <pre>
   %retval = invoke int %Test(int 15)             to label %Continue
-              except label %TestCleanup     <i>; {int}:retval set</i>
+              unwind label %TestCleanup     <i>; {int}:retval set</i>
   %retval = invoke <a href="#callingconv">coldcc</a> int %Test(int 15)             to label %Continue
-              except label %TestCleanup     <i>; {int}:retval set</i>
+              unwind label %TestCleanup     <i>; {int}:retval set</i>
 </pre>
 </div>
 
@@ -1535,6 +1649,7 @@ Math Forum</a>.</p>
 <h5>Example:</h5>
 <pre>  &lt;result&gt; = 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>'
@@ -1580,6 +1695,7 @@ operand.</p>
   &lt;result&gt; = setge sbyte 4, 5        <i>; yields {bool}:result = false</i>
 </pre>
 </div>
+
 <!-- ======================================================================= -->
 <div class="doc_subsection"> <a name="bitwiseops">Bitwise Binary
 Operations</a> </div>
@@ -1805,6 +1921,356 @@ positions.</p>
 </pre>
 </div>
 
+<!-- ======================================================================= -->
+<div class="doc_subsection"> 
+  <a name="vectorops">Vector Operations</a>
+</div>
+
+<div class="doc_text">
+
+<p>LLVM supports several instructions to represent vector operations in a
+target-independent manner.  This instructions cover the element-access and
+vector-specific operations needed to process vectors effectively.  While LLVM
+does directly support these vector operations, many sophisticated algorithms
+will want to use target-specific intrinsics to take full advantage of a specific
+target.</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+   <a name="i_extractelement">'<tt>extractelement</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+  &lt;result&gt; = extractelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, uint &lt;idx&gt;    <i>; yields &lt;ty&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>extractelement</tt>' instruction extracts a single scalar
+element from a packed vector at a specified index.
+</p>
+
+
+<h5>Arguments:</h5>
+
+<p>
+The first operand of an '<tt>extractelement</tt>' instruction is a
+value of <a href="#t_packed">packed</a> type.  The second operand is
+an index indicating the position from which to extract the element.
+The index may be a variable.</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The result is a scalar of the same type as the element type of
+<tt>val</tt>.  Its value is the value at position <tt>idx</tt> of
+<tt>val</tt>.  If <tt>idx</tt> exceeds the length of <tt>val</tt>, the
+results are undefined.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+  %result = extractelement &lt;4 x int&gt; %vec, uint 0    <i>; yields int</i>
+</pre>
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+   <a name="i_insertelement">'<tt>insertelement</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+  &lt;result&gt; = insertelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, &lt;ty&gt; &lt;elt&gt, uint &lt;idx&gt;    <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>insertelement</tt>' instruction inserts a scalar
+element into a packed vector at a specified index.
+</p>
+
+
+<h5>Arguments:</h5>
+
+<p>
+The first operand of an '<tt>insertelement</tt>' instruction is a
+value of <a href="#t_packed">packed</a> type.  The second operand is a
+scalar value whose type must equal the element type of the first
+operand.  The third operand is an index indicating the position at
+which to insert the value.  The index may be a variable.</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The result is a packed vector of the same type as <tt>val</tt>.  Its
+element values are those of <tt>val</tt> except at position
+<tt>idx</tt>, where it gets the value <tt>elt</tt>.  If <tt>idx</tt>
+exceeds the length of <tt>val</tt>, the results are undefined.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+  %result = insertelement &lt;4 x int&gt; %vec, int 1, uint 0    <i>; yields &lt;4 x int&gt;</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+   <a name="i_shufflevector">'<tt>shufflevector</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+  &lt;result&gt; = shufflevector &lt;n x &lt;ty&gt;&gt; &lt;v1&gt;, &lt;n x &lt;ty&gt;&gt; &lt;v2&gt;, &lt;n x uint&gt; &lt;mask&gt;    <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>shufflevector</tt>' instruction constructs a permutation of elements
+from two input vectors, returning a vector of the same type.
+</p>
+
+<h5>Arguments:</h5>
+
+<p>
+The first two operands of a '<tt>shufflevector</tt>' instruction are vectors
+with types that match each other and types that match the result of the
+instruction.  The third argument is a shuffle mask, which has the same number
+of elements as the other vector type, but whose element type is always 'uint'.
+</p>
+
+<p>
+The shuffle mask operand is required to be a constant vector with either
+constant integer or undef values.
+</p>
+
+<h5>Semantics:</h5>
+
+<p>
+The elements of the two input vectors are numbered from left to right across
+both of the vectors.  The shuffle mask operand specifies, for each element of
+the result vector, which element of the two input registers the result element
+gets.  The element selector may be undef (meaning "don't care") and the second
+operand may be undef if performing a shuffle from only one vector.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+  %result = shufflevector &lt;4 x int&gt; %v1, &lt;4 x int&gt; %v2, 
+                          &lt;4 x uint&gt; &lt;uint 0, uint 4, uint 1, uint 5&gt;    <i>; yields &lt;4 x int&gt;</i>
+  %result = shufflevector &lt;4 x int&gt; %v1, &lt;4 x int&gt; undef, 
+                          &lt;4 x uint&gt; &lt;uint 0, uint 1, uint 2, uint 3&gt;  <i>; yields &lt;4 x int&gt;</i> - Identity shuffle.
+</pre>
+</div>
+
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_vsetint">'<tt>vsetint</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre>&lt;result&gt; = vsetint &lt;op&gt;, &lt;n x &lt;ty&gt;&gt; &lt;var1&gt;, &lt;var2&gt;   <i>; yields &lt;n x bool&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>vsetint</tt>' instruction takes two integer vectors and
+returns a vector of boolean values representing, at each position, the
+result of the comparison between the values at that position in the
+two operands.</p>
+
+<h5>Arguments:</h5>
+
+<p>The arguments to a '<tt>vsetint</tt>' instruction are a comparison
+operation and two value arguments.  The value arguments must be of <a
+href="#t_integral">integral</a> <a href="#t_packed">packed</a> type,
+and they must have identical types.  The operation argument must be
+one of <tt>eq</tt>, <tt>ne</tt>, <tt>slt</tt>, <tt>sgt</tt>,
+<tt>sle</tt>, <tt>sge</tt>, <tt>ult</tt>, <tt>ugt</tt>, <tt>ule</tt>,
+<tt>uge</tt>, <tt>true</tt>, and <tt>false</tt>.  The result is a
+packed <tt>bool</tt> value with the same length as each operand.</p>
+
+<h5>Semantics:</h5>
+
+<p>The following table shows the semantics of '<tt>vsetint</tt>'.  For
+each position of the result, the comparison is done on the
+corresponding positions of the two value arguments.  Note that the
+signedness of the comparison depends on the comparison opcode and
+<i>not</i> on the signedness of the value operands.  E.g., <tt>vsetint
+slt <4 x unsigned> %x, %y</tt> does an elementwise <i>signed</i>
+comparison of <tt>%x</tt> and <tt>%y</tt>.</p>
+
+<table  border="1" cellspacing="0" cellpadding="4">
+  <tbody>
+    <tr><th>Operation</th><th>Result is true iff</th><th>Comparison is</th></tr>
+    <tr><td><tt>eq</tt></td><td>var1 == var2</td><td>--</td></tr>
+    <tr><td><tt>ne</tt></td><td>var1 != var2</td><td>--</td></tr>
+    <tr><td><tt>slt</tt></td><td>var1 &lt; var2</td><td>signed</td></tr>
+    <tr><td><tt>sgt</tt></td><td>var1 &gt; var2</td><td>signed</td></tr>
+    <tr><td><tt>sle</tt></td><td>var1 &lt;= var2</td><td>signed</td></tr>
+    <tr><td><tt>sge</tt></td><td>var1 &gt;= var2</td><td>signed</td></tr>
+    <tr><td><tt>ult</tt></td><td>var1 &lt; var2</td><td>unsigned</td></tr>
+    <tr><td><tt>ugt</tt></td><td>var1 &gt; var2</td><td>unsigned</td></tr>
+    <tr><td><tt>ule</tt></td><td>var1 &lt;= var2</td><td>unsigned</td></tr>
+    <tr><td><tt>uge</tt></td><td>var1 &gt;= var2</td><td>unsigned</td></tr>
+    <tr><td><tt>true</tt></td><td>always</td><td>--</td></tr>
+    <tr><td><tt>false</tt></td><td>never</td><td>--</td></tr>
+  </tbody>
+</table>
+
+<h5>Example:</h5>
+<pre>  &lt;result&gt; = vsetint eq &lt;2 x int&gt; &lt;int 0, int 1&gt;, &lt;int 1, int 0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = false, false</i>
+  &lt;result&gt; = vsetint ne &lt;2 x int&gt; &lt;int 0, int 1&gt;, &lt;int 1, int 0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = true, true</i>
+  &lt;result&gt; = vsetint slt &lt;2 x int&gt; &lt;int 0, int 1&gt;, &lt;int 1, int 0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = true, false</i>
+  &lt;result&gt; = vsetint sgt &lt;2 x int&gt; &lt;int 0, int 1&gt;, &lt;int 1, int 0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = false, true</i>
+  &lt;result&gt; = vsetint sle &lt;2 x int&gt; &lt;int 0, int 1&gt;, &lt;int 1, int 0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = true, false</i>
+  &lt;result&gt; = vsetint sge &lt;2 x int&gt; &lt;int 0, int 1&gt;, &lt;int 1, int 0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = false, true</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection"> <a name="i_vsetfp">'<tt>vsetfp</tt>'
+Instruction</a> </div>
+<div class="doc_text">
+<h5>Syntax:</h5>
+<pre>&lt;result&gt; = vsetfp &lt;op&gt;, &lt;n x &lt;ty&gt;&gt; &lt;var1&gt;, &lt;var2&gt;   <i>; yields &lt;n x bool&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>The '<tt>vsetfp</tt>' instruction takes two floating point vector
+arguments and returns a vector of boolean values representing, at each
+position, the result of the comparison between the values at that
+position in the two operands.</p>
+
+<h5>Arguments:</h5>
+
+<p>The arguments to a '<tt>vsetfp</tt>' instruction are a comparison
+operation and two value arguments.  The value arguments must be of <a
+href="t_floating">floating point</a> <a href="#t_packed">packed</a>
+type, and they must have identical types.  The operation argument must
+be one of <tt>eq</tt>, <tt>ne</tt>, <tt>lt</tt>, <tt>gt</tt>,
+<tt>le</tt>, <tt>ge</tt>, <tt>oeq</tt>, <tt>one</tt>, <tt>olt</tt>,
+<tt>ogt</tt>, <tt>ole</tt>, <tt>oge</tt>, <tt>ueq</tt>, <tt>une</tt>,
+<tt>ult</tt>, <tt>ugt</tt>, <tt>ule</tt>, <tt>uge</tt>, <tt>o</tt>,
+<tt>u</tt>, <tt>true</tt>, and <tt>false</tt>.  The result is a packed
+<tt>bool</tt> value with the same length as each operand.</p>
+
+<h5>Semantics:</h5>
+
+<p>The following table shows the semantics of '<tt>vsetfp</tt>' for
+floating point types.  If either operand is a floating point Not a
+Number (NaN) value, the operation is unordered, and the value in the
+first column below is produced at that position.  Otherwise, the
+operation is ordered, and the value in the second column is
+produced.</p>
+
+<table  border="1" cellspacing="0" cellpadding="4">
+  <tbody>
+    <tr><th>Operation</th><th>If unordered<th>Otherwise true iff</th></tr>
+    <tr><td><tt>eq</tt></td><td>undefined</td><td>var1 == var2</td></tr>
+    <tr><td><tt>ne</tt></td><td>undefined</td><td>var1 != var2</td></tr>
+    <tr><td><tt>lt</tt></td><td>undefined</td><td>var1 &lt; var2</td></tr>
+    <tr><td><tt>gt</tt></td><td>undefined</td><td>var1 &gt; var2</td></tr>
+    <tr><td><tt>le</tt></td><td>undefined</td><td>var1 &lt;= var2</td></tr>
+    <tr><td><tt>ge</tt></td><td>undefined</td><td>var1 &gt;= var2</td></tr>
+    <tr><td><tt>oeq</tt></td><td>false</td><td>var1 == var2</td></tr>
+    <tr><td><tt>one</tt></td><td>false</td><td>var1 != var2</td></tr>
+    <tr><td><tt>olt</tt></td><td>false</td><td>var1 &lt; var2</td></tr>
+    <tr><td><tt>ogt</tt></td><td>false</td><td>var1 &gt; var2</td></tr>
+    <tr><td><tt>ole</tt></td><td>false</td><td>var1 &lt;= var2</td></tr>
+    <tr><td><tt>oge</tt></td><td>false</td><td>var1 &gt;= var2</td></tr>
+    <tr><td><tt>ueq</tt></td><td>true</td><td>var1 == var2</td></tr>
+    <tr><td><tt>une</tt></td><td>true</td><td>var1 != var2</td></tr>
+    <tr><td><tt>ult</tt></td><td>true</td><td>var1 &lt; var2</td></tr>
+    <tr><td><tt>ugt</tt></td><td>true</td><td>var1 &gt; var2</td></tr>
+    <tr><td><tt>ule</tt></td><td>true</td><td>var1 &lt;= var2</td></tr>
+    <tr><td><tt>uge</tt></td><td>true</td><td>var1 &gt;= var2</td></tr>
+    <tr><td><tt>o</tt></td><td>false</td><td>always</td></tr>
+    <tr><td><tt>u</tt></td><td>true</td><td>never</td></tr>
+    <tr><td><tt>true</tt></td><td>true</td><td>always</td></tr>
+    <tr><td><tt>false</tt></td><td>false</td><td>never</td></tr>
+  </tbody>
+</table>
+
+<h5>Example:</h5>
+<pre>  &lt;result&gt; = vsetfp eq &lt;2 x float&gt; &lt;float 0.0, float 1.0&gt;, &lt;float 1.0, float 0.0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = false, false</i>
+  &lt;result&gt; = vsetfp ne &lt;2 x float&gt; &lt;float 0.0, float 1.0&gt;, &lt;float 1.0, float 0.0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = true, true</i>
+  &lt;result&gt; = vsetfp lt &lt;2 x float&gt; &lt;float 0.0, float 1.0&gt;, &lt;float 1.0, float 0.0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = true, false</i>
+  &lt;result&gt; = vsetfp gt &lt;2 x float&gt; &lt;float 0.0, float 1.0&gt;, &lt;float 1.0, float 0.0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = false, true</i>
+  &lt;result&gt; = vsetfp le &lt;2 x float&gt; &lt;float 0.0, float 1.0&gt;, &lt;float 1.0, float 0.0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = true, false</i>
+  &lt;result&gt; = vsetfp ge &lt;2 x float&gt; &lt;float 0.0, float 1.0&gt;, &lt;float 1.0, float 0.0&gt;      <i>; yields {&lt;2 x bool&gt;}:result = false, true</i>
+</pre>
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
+   <a name="i_vselect">'<tt>vselect</tt>' Instruction</a>
+</div>
+
+<div class="doc_text">
+
+<h5>Syntax:</h5>
+
+<pre>
+  &lt;result&gt; = vselect &lt;n x bool&gt; &lt;cond&gt;, &lt;n x &lt;ty&gt;&gt; &lt;val1&gt;, &lt;n x &lt;ty&gt;&gt; &lt;val2&gt; <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
+</pre>
+
+<h5>Overview:</h5>
+
+<p>
+The '<tt>vselect</tt>' instruction chooses one value at each position
+of a vector based on a condition.
+</p>
+
+
+<h5>Arguments:</h5>
+
+<p>
+The '<tt>vselect</tt>' instruction requires a <a
+href="#t_packed">packed</a> <tt>bool</tt> value indicating the
+condition at each vector position, and two values of the same packed
+type.  All three operands must have the same length.  The type of the
+result is the same as the type of the two value operands.</p>
+
+<h5>Semantics:</h5>
+
+<p>
+At each position where the <tt>bool</tt> vector is true, that position
+of the result gets its value from the first value argument; otherwise,
+it gets its value from the second value argument.
+</p>
+
+<h5>Example:</h5>
+
+<pre>
+  %X = vselect bool &lt;2 x bool&gt; &lt;bool true, bool false&gt;, &lt;2 x ubyte&gt; &lt;ubyte 17, ubyte 17&gt;, 
+    &lt;2 x ubyte&gt; &lt;ubyte 42, ubyte 42&gt;      <i>; yields &lt;2 x ubyte&gt;:17, 42</i>
+</pre>
+</div>
+
+
+
 <!-- ======================================================================= -->
 <div class="doc_subsection"> 
   <a name="memoryops">Memory Access Operations</a>
@@ -2250,99 +2716,6 @@ value argument; otherwise, it returns the second value argument.
 </div>
 
 
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-   <a name="i_extractelement">'<tt>extractelement</tt>' Instruction</a>
-</div>
-
-<div class="doc_text">
-
-<h5>Syntax:</h5>
-
-<pre>
-  &lt;result&gt; = extractelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, uint &lt;idx&gt;    <i>; yields &lt;ty&gt;</i>
-</pre>
-
-<h5>Overview:</h5>
-
-<p>
-The '<tt>extractelement</tt>' instruction extracts a single scalar
-element from a packed vector at a specified index.
-</p>
-
-
-<h5>Arguments:</h5>
-
-<p>
-The first operand of an '<tt>extractelement</tt>' instruction is a
-value of <a href="#t_packed">packed</a> type.  The second operand is
-an index indicating the position from which to extract the element.
-The index may be a variable.</p>
-
-<h5>Semantics:</h5>
-
-<p>
-The result is a scalar of the same type as the element type of
-<tt>val</tt>.  Its value is the value at position <tt>idx</tt> of
-<tt>val</tt>.  If <tt>idx</tt> exceeds the length of <tt>val</tt>, the
-results are undefined.
-</p>
-
-<h5>Example:</h5>
-
-<pre>
-  %result = extractelement &lt;4 x int&gt; %vec, uint 0    <i>; yields int</i>
-</pre>
-</div>
-
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-   <a name="i_insertelement">'<tt>insertelement</tt>' Instruction</a>
-</div>
-
-<div class="doc_text">
-
-<h5>Syntax:</h5>
-
-<pre>
-  &lt;result&gt; = insertelement &lt;n x &lt;ty&gt;&gt; &lt;val&gt;, &lt;ty&gt; &lt;elt&gt, uint &lt;idx&gt;    <i>; yields &lt;n x &lt;ty&gt;&gt;</i>
-</pre>
-
-<h5>Overview:</h5>
-
-<p>
-The '<tt>insertelement</tt>' instruction inserts a scalar
-element into a packed vector at a specified index.
-</p>
-
-
-<h5>Arguments:</h5>
-
-<p>
-The first operand of an '<tt>insertelement</tt>' instruction is a
-value of <a href="#t_packed">packed</a> type.  The second operand is a
-scalar value whose type must equal the element type of the first
-operand.  The third operand is an index indicating the position at
-which to insert the value.  The index may be a variable.</p>
-
-<h5>Semantics:</h5>
-
-<p>
-The result is a packed vector of the same type as <tt>val</tt>.  Its
-element values are those of <tt>val</tt> except at position
-<tt>idx</tt>, where it gets the value <tt>elt</tt>.  If <tt>idx</tt>
-exceeds the length of <tt>val</tt>, the results are undefined.
-</p>
-
-<h5>Example:</h5>
-
-<pre>
-  %result = insertelement &lt;4 x int&gt; %vec, int 1, uint 0    <i>; yields &lt;4 x int&gt;</i>
-</pre>
-</div>
-
-
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
   <a name="i_call">'<tt>call</tt>' Instruction</a>
@@ -2512,7 +2885,7 @@ language reference manual does not define what this type is, so all
 transformations should be prepared to handle intrinsics with any type
 used.</p>
 
-<p>This example shows how the <a href="#i_vanext"><tt>vanext</tt></a>
+<p>This example shows how the <a href="#i_va_arg"><tt>va_arg</tt></a>
 instruction and the variable argument handling intrinsic functions are
 used.</p>
 
@@ -2686,7 +3059,7 @@ the runtime to find the pointer at GC safe points.
 <h5>Syntax:</h5>
 
 <pre>
-  declare sbyte* %llvm.gcread(sbyte** %Ptr)
+  declare sbyte* %llvm.gcread(sbyte* %ObjPtr, sbyte** %Ptr)
 </pre>
 
 <h5>Overview:</h5>
@@ -2697,8 +3070,10 @@ barriers.</p>
 
 <h5>Arguments:</h5>
 
-<p>The argument is the address to read from, which should be an address
-allocated from the garbage collector.</p>
+<p>The second argument is the address to read from, which should be an address
+allocated from the garbage collector.  The first object is a pointer to the 
+start of the referenced object, if needed by the language runtime (otherwise
+null).</p>
 
 <h5>Semantics:</h5>
 
@@ -2719,7 +3094,7 @@ garbage collector runtime, as needed.</p>
 <h5>Syntax:</h5>
 
 <pre>
-  declare void %llvm.gcwrite(sbyte* %P1, sbyte** %P2)
+  declare void %llvm.gcwrite(sbyte* %P1, sbyte* %Obj, sbyte** %P2)
 </pre>
 
 <h5>Overview:</h5>
@@ -2730,8 +3105,10 @@ barriers (such as generational or reference counting collectors).</p>
 
 <h5>Arguments:</h5>
 
-<p>The first argument is the reference to store, and the second is the heap
-location to store to.</p>
+<p>The first argument is the reference to store, the second is the start of the
+object to store it to, and the third is the address of the field of Obj to 
+store to.  If the runtime does not require a pointer to the object, Obj may be
+null.</p>
 
 <h5>Semantics:</h5>
 
@@ -2976,7 +3353,7 @@ code to simulators and other tools.  The method is target specific, but it is
 expected that the marker will use exported symbols to transmit the PC of the marker.
 The marker makes no guarantees that it will remain with any specific instruction 
 after optimizations.  It is possible that the presence of a marker will inhibit 
-optimizations.  The intended use is to be inserted after optmizations to allow
+optimizations.  The intended use is to be inserted after optimizations to allow
 correlations of simulation runs.
 </p>
 
@@ -3028,199 +3405,6 @@ system wide value.  On backends without support, this is lowered to a constant 0
 
 </div>
 
-
-<!-- ======================================================================= -->
-<div class="doc_subsection">
-  <a name="int_os">Operating System Intrinsics</a>
-</div>
-
-<div class="doc_text">
-<p>
-These intrinsics are provided by LLVM to support the implementation of
-operating system level code.
-</p>
-
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="i_readport">'<tt>llvm.readport</tt>' Intrinsic</a>
-</div>
-
-<div class="doc_text">
-
-<h5>Syntax:</h5>
-<pre>
-  declare &lt;integer type&gt; %llvm.readport (&lt;integer type&gt; &lt;address&gt;)
-</pre>
-
-<h5>Overview:</h5>
-
-<p>
-The '<tt>llvm.readport</tt>' intrinsic reads data from the specified hardware
-I/O port.
-</p>
-
-<h5>Arguments:</h5>
-
-<p>
-The argument to this intrinsic indicates the hardware I/O address from which
-to read the data.  The address is in the hardware I/O address namespace (as
-opposed to being a memory location for memory mapped I/O).
-</p>
-
-<h5>Semantics:</h5>
-
-<p>
-The '<tt>llvm.readport</tt>' intrinsic reads data from the hardware I/O port
-specified by <i>address</i> and returns the value.  The address and return
-value must be integers, but the size is dependent upon the platform upon which
-the program is code generated.  For example, on x86, the address must be an
-unsigned 16-bit value, and the return value must be 8, 16, or 32 bits.
-</p>
-
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="i_writeport">'<tt>llvm.writeport</tt>' Intrinsic</a>
-</div>
-
-<div class="doc_text">
-
-<h5>Syntax:</h5>
-<pre>
-  call void (&lt;integer type&gt;, &lt;integer type&gt;)*
-            %llvm.writeport (&lt;integer type&gt; &lt;value&gt;,
-                             &lt;integer type&gt; &lt;address&gt;)
-</pre>
-
-<h5>Overview:</h5>
-
-<p>
-The '<tt>llvm.writeport</tt>' intrinsic writes data to the specified hardware
-I/O port.
-</p>
-
-<h5>Arguments:</h5>
-
-<p>
-The first argument is the value to write to the I/O port.
-</p>
-
-<p>
-The second argument indicates the hardware I/O address to which data should be
-written.  The address is in the hardware I/O address namespace (as opposed to
-being a memory location for memory mapped I/O).
-</p>
-
-<h5>Semantics:</h5>
-
-<p>
-The '<tt>llvm.writeport</tt>' intrinsic writes <i>value</i> to the I/O port
-specified by <i>address</i>.  The address and value must be integers, but the
-size is dependent upon the platform upon which the program is code generated.
-For example, on x86, the address must be an unsigned 16-bit value, and the
-value written must be 8, 16, or 32 bits in length.
-</p>
-
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="i_readio">'<tt>llvm.readio</tt>' Intrinsic</a>
-</div>
-
-<div class="doc_text">
-
-<h5>Syntax:</h5>
-<pre>
-  declare &lt;result&gt; %llvm.readio (&lt;ty&gt; * &lt;pointer&gt;)
-</pre>
-
-<h5>Overview:</h5>
-
-<p>
-The '<tt>llvm.readio</tt>' intrinsic reads data from a memory mapped I/O
-address.
-</p>
-
-<h5>Arguments:</h5>
-
-<p>
-The argument to this intrinsic is a pointer indicating the memory address from
-which to read the data.  The data must be a
-<a href="#t_firstclass">first class</a> type.
-</p>
-
-<h5>Semantics:</h5>
-
-<p>
-The '<tt>llvm.readio</tt>' intrinsic reads data from a memory mapped I/O
-location specified by <i>pointer</i> and returns the value.  The argument must
-be a pointer, and the return value must be a
-<a href="#t_firstclass">first class</a> type.  However, certain architectures
-may not support I/O on all first class types.  For example, 32-bit processors
-may only support I/O on data types that are 32 bits or less.
-</p>
-
-<p>
-This intrinsic enforces an in-order memory model for llvm.readio and
-llvm.writeio calls on machines that use dynamic scheduling.  Dynamically
-scheduled processors may execute loads and stores out of order, re-ordering at
-run time accesses to memory mapped I/O registers.  Using these intrinsics
-ensures that accesses to memory mapped I/O registers occur in program order.
-</p>
-
-</div>
-
-<!-- _______________________________________________________________________ -->
-<div class="doc_subsubsection">
-  <a name="i_writeio">'<tt>llvm.writeio</tt>' Intrinsic</a>
-</div>
-
-<div class="doc_text">
-
-<h5>Syntax:</h5>
-<pre>
-  declare void %llvm.writeio (&lt;ty1&gt; &lt;value&gt;, &lt;ty2&gt; * &lt;pointer&gt;)
-</pre>
-
-<h5>Overview:</h5>
-
-<p>
-The '<tt>llvm.writeio</tt>' intrinsic writes data to the specified memory
-mapped I/O address.
-</p>
-
-<h5>Arguments:</h5>
-
-<p>
-The first argument is the value to write to the memory mapped I/O location.
-The second argument is a pointer indicating the memory address to which the
-data should be written.
-</p>
-
-<h5>Semantics:</h5>
-
-<p>
-The '<tt>llvm.writeio</tt>' intrinsic writes <i>value</i> to the memory mapped
-I/O address specified by <i>pointer</i>.  The value must be a
-<a href="#t_firstclass">first class</a> type.  However, certain architectures
-may not support I/O on all first class types.  For example, 32-bit processors
-may only support I/O on data types that are 32 bits or less.
-</p>
-
-<p>
-This intrinsic enforces an in-order memory model for llvm.readio and
-llvm.writeio calls on machines that use dynamic scheduling.  Dynamically
-scheduled processors may execute loads and stores out of order, re-ordering at
-run time accesses to memory mapped I/O registers.  Using these intrinsics
-ensures that accesses to memory mapped I/O registers occur in program order.
-</p>
-
-</div>
-
 <!-- ======================================================================= -->
 <div class="doc_subsection">
   <a name="int_libc">Standard C Library Intrinsics</a>
@@ -3245,41 +3429,43 @@ for more efficient code generation.
 
 <h5>Syntax:</h5>
 <pre>
-  declare void %llvm.memcpy(sbyte* &lt;dest&gt;, sbyte* &lt;src&gt;,
-                            uint &lt;len&gt;, uint &lt;align&gt;)
+  declare void %llvm.memcpy.i32(sbyte* &lt;dest&gt;, sbyte* &lt;src&gt;,
+                                uint &lt;len&gt;, uint &lt;align&gt;)
+  declare void %llvm.memcpy.i64(sbyte* &lt;dest&gt;, sbyte* &lt;src&gt;,
+                                ulong &lt;len&gt;, uint &lt;align&gt;)
 </pre>
 
 <h5>Overview:</h5>
 
 <p>
-The '<tt>llvm.memcpy</tt>' intrinsic copies a block of memory from the source
+The '<tt>llvm.memcpy.*</tt>' intrinsics copy a block of memory from the source
 location to the destination location.
 </p>
 
 <p>
-Note that, unlike the standard libc function, the <tt>llvm.memcpy</tt> intrinsic
-does not return a value, and takes an extra alignment argument.
+Note that, unlike the standard libc function, the <tt>llvm.memcpy.*</tt> 
+intrinsics do not return a value, and takes an extra alignment argument.
 </p>
 
 <h5>Arguments:</h5>
 
 <p>
 The first argument is a pointer to the destination, the second is a pointer to
-the source.  The third argument is an (arbitrarily sized) integer argument
+the source.  The third argument is an integer argument
 specifying the number of bytes to copy, and the fourth argument is the alignment
 of the source and destination locations.
 </p>
 
 <p>
 If the call to this intrinisic has an alignment value that is not 0 or 1, then
-the caller guarantees that the size of the copy is a multiple of the alignment
-and that both the source and destination pointers are aligned to that boundary.
+the caller guarantees that both the source and destination pointers are aligned
+to that boundary.
 </p>
 
 <h5>Semantics:</h5>
 
 <p>
-The '<tt>llvm.memcpy</tt>' intrinsic copies a block of memory from the source
+The '<tt>llvm.memcpy.*</tt>' intrinsics copy a block of memory from the source
 location to the destination location, which are not allowed to overlap.  It
 copies "len" bytes of memory over.  If the argument is known to be aligned to
 some boundary, this can be specified as the fourth argument, otherwise it should
@@ -3297,42 +3483,44 @@ be set to 0 or 1.
 
 <h5>Syntax:</h5>
 <pre>
-  declare void %llvm.memmove(sbyte* &lt;dest&gt;, sbyte* &lt;src&gt;,
-                             uint &lt;len&gt;, uint &lt;align&gt;)
+  declare void %llvm.memmove.i32(sbyte* &lt;dest&gt;, sbyte* &lt;src&gt;,
+                                 uint &lt;len&gt;, uint &lt;align&gt;)
+  declare void %llvm.memmove.i64(sbyte* &lt;dest&gt;, sbyte* &lt;src&gt;,
+                                 ulong &lt;len&gt;, uint &lt;align&gt;)
 </pre>
 
 <h5>Overview:</h5>
 
 <p>
-The '<tt>llvm.memmove</tt>' intrinsic moves a block of memory from the source
-location to the destination location. It is similar to the '<tt>llvm.memcpy</tt>' 
-intrinsic but allows the two memory locations to overlap.
+The '<tt>llvm.memmove.*</tt>' intrinsics move a block of memory from the source
+location to the destination location. It is similar to the
+'<tt>llvm.memcmp</tt>' intrinsic but allows the two memory locations to overlap.
 </p>
 
 <p>
-Note that, unlike the standard libc function, the <tt>llvm.memmove</tt> intrinsic
-does not return a value, and takes an extra alignment argument.
+Note that, unlike the standard libc function, the <tt>llvm.memmove.*</tt> 
+intrinsics do not return a value, and takes an extra alignment argument.
 </p>
 
 <h5>Arguments:</h5>
 
 <p>
 The first argument is a pointer to the destination, the second is a pointer to
-the source.  The third argument is an (arbitrarily sized) integer argument
+the source.  The third argument is an integer argument
 specifying the number of bytes to copy, and the fourth argument is the alignment
 of the source and destination locations.
 </p>
 
 <p>
 If the call to this intrinisic has an alignment value that is not 0 or 1, then
-the caller guarantees that the size of the copy is a multiple of the alignment
-and that both the source and destination pointers are aligned to that boundary.
+the caller guarantees that the source and destination pointers are aligned to
+that boundary.
 </p>
 
 <h5>Semantics:</h5>
 
 <p>
-The '<tt>llvm.memmove</tt>' intrinsic copies a block of memory from the source
+The '<tt>llvm.memmove.*</tt>' intrinsics copy a block of memory from the source
 location to the destination location, which may overlap.  It
 copies "len" bytes of memory over.  If the argument is known to be aligned to
 some boundary, this can be specified as the fourth argument, otherwise it should
@@ -3343,21 +3531,23 @@ be set to 0 or 1.
 
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
-  <a name="i_memset">'<tt>llvm.memset</tt>' Intrinsic</a>
+  <a name="i_memset">'<tt>llvm.memset.*</tt>' Intrinsics</a>
 </div>
 
 <div class="doc_text">
 
 <h5>Syntax:</h5>
 <pre>
-  declare void %llvm.memset(sbyte* &lt;dest&gt;, ubyte &lt;val&gt;,
-                            uint &lt;len&gt;, uint &lt;align&gt;)
+  declare void %llvm.memset.i32(sbyte* &lt;dest&gt;, ubyte &lt;val&gt;,
+                                uint &lt;len&gt;, uint &lt;align&gt;)
+  declare void %llvm.memset.i64(sbyte* &lt;dest&gt;, ubyte &lt;val&gt;,
+                                ulong &lt;len&gt;, uint &lt;align&gt;)
 </pre>
 
 <h5>Overview:</h5>
 
 <p>
-The '<tt>llvm.memset</tt>' intrinsic fills a block of memory with a particular
+The '<tt>llvm.memset.*</tt>' intrinsics fill a block of memory with a particular
 byte value.
 </p>
 
@@ -3370,21 +3560,21 @@ does not return a value, and takes an extra alignment argument.
 
 <p>
 The first argument is a pointer to the destination to fill, the second is the
-byte value to fill it with, the third argument is an (arbitrarily sized) integer
+byte value to fill it with, the third argument is an integer
 argument specifying the number of bytes to fill, and the fourth argument is the
 known alignment of destination location.
 </p>
 
 <p>
 If the call to this intrinisic has an alignment value that is not 0 or 1, then
-the caller guarantees that the size of the copy is a multiple of the alignment
-and that the destination pointer is aligned to that boundary.
+the caller guarantees that the destination pointer is aligned to that boundary.
 </p>
 
 <h5>Semantics:</h5>
 
 <p>
-The '<tt>llvm.memset</tt>' intrinsic fills "len" bytes of memory starting at the
+The '<tt>llvm.memset.*</tt>' intrinsics fill "len" bytes of memory starting at
+the
 destination location.  If the argument is known to be aligned to some boundary,
 this can be specified as the fourth argument, otherwise it should be set to 0 or
 1.
@@ -3429,7 +3619,7 @@ false.
 
 <!-- _______________________________________________________________________ -->
 <div class="doc_subsubsection">
-  <a name="i_sqrt">'<tt>llvm.sqrt</tt>' Intrinsic</a>
+  <a name="i_sqrt">'<tt>llvm.sqrt.*</tt>' Intrinsic</a>
 </div>
 
 <div class="doc_text">
@@ -3485,9 +3675,9 @@ These allow efficient code generation for some algorithms.
 
 <h5>Syntax:</h5>
 <pre>
-  declare ushort %llvm.bswap.i16( ushort &lt;id&gt; )
-  declare uint %llvm.bswap.i32( uint &lt;id&gt; )
-  declare ulong %llvm.bswap.i64( ulong &lt;id&gt; )
+  declare ushort %llvm.bswap.i16(ushort &lt;id&gt;)
+  declare uint   %llvm.bswap.i32(uint &lt;id&gt;)
+  declare ulong  %llvm.bswap.i64(ulong &lt;id&gt;)
 </pre>
 
 <h5>Overview:</h5>
@@ -3501,11 +3691,11 @@ in the target's  native byte order.
 <h5>Semantics:</h5>
 
 <p>
-The llvm.bswap.16 intrinsic returns a ushort value that has the high and low
-byte of the input ushort swapped.  Similarly, the llvm.bswap.i32 intrinsic
+The <tt>llvm.bswap.16</tt> intrinsic returns a ushort value that has the high and low
+byte of the input ushort swapped.  Similarly, the <tt>llvm.bswap.i32</tt> intrinsic
 returns a uint value that has the four bytes of the input uint swapped, so that 
 if the input bytes are numbered 0, 1, 2, 3 then the returned uint will have its
-bytes in 3, 2, 1, 0 order.  The llvm.bswap.i64 intrinsic extends this concept
+bytes in 3, 2, 1, 0 order.  The <tt>llvm.bswap.i64</tt> intrinsic extends this concept
 to 64 bits.
 </p>
 
@@ -3520,24 +3710,24 @@ to 64 bits.
 
 <h5>Syntax:</h5>
 <pre>
-  declare sbyte %llvm.ctpop.i8(sbyte &lt;src&gt;)
-  declare short %llvm.ctpop.i16(short &lt;src&gt;)
-  declare int   %llvm.ctpop.i32(int &lt;src&gt;)
-  declare long  %llvm.ctpop.i64(long &lt;src&gt;)
+  declare ubyte  %llvm.ctpop.i8 (ubyte &lt;src&gt;)
+  declare ushort %llvm.ctpop.i16(ushort &lt;src&gt;)
+  declare uint   %llvm.ctpop.i32(uint &lt;src&gt;)
+  declare ulong  %llvm.ctpop.i64(ulong &lt;src&gt;)
 </pre>
 
 <h5>Overview:</h5>
 
 <p>
-The '<tt>llvm.ctpop</tt>' family of intrinsics counts the number of ones in a 
-variable.
+The '<tt>llvm.ctpop</tt>' family of intrinsics counts the number of bits set in a 
+value.
 </p>
 
 <h5>Arguments:</h5>
 
 <p>
 The only argument is the value to be counted.  The argument may be of any
-integer type.  The return type must match the argument type.
+unsigned integer type.  The return type must match the argument type.
 </p>
 
 <h5>Semantics:</h5>
@@ -3556,10 +3746,10 @@ The '<tt>llvm.ctpop</tt>' intrinsic counts the 1's in a variable.
 
 <h5>Syntax:</h5>
 <pre>
-  declare sbyte %llvm.ctlz.i8(sbyte &lt;src&gt;)
-  declare short %llvm.ctlz.i16(short &lt;src&gt;)
-  declare int   %llvm.ctlz.i32(int &lt;src&gt;)
-  declare long  %llvm.ctlz.i64(long &lt;src&gt;)
+  declare ubyte  %llvm.ctlz.i8 (ubyte &lt;src&gt;)
+  declare ushort %llvm.ctlz.i16(ushort &lt;src&gt;)
+  declare uint   %llvm.ctlz.i32(uint &lt;src&gt;)
+  declare ulong  %llvm.ctlz.i64(ulong &lt;src&gt;)
 </pre>
 
 <h5>Overview:</h5>
@@ -3573,7 +3763,7 @@ leading zeros in a variable.
 
 <p>
 The only argument is the value to be counted.  The argument may be of any
-integer type. The return type must match the argument type.
+unsigned integer type. The return type must match the argument type.
 </p>
 
 <h5>Semantics:</h5>
@@ -3581,7 +3771,7 @@ integer type. The return type must match the argument type.
 <p>
 The '<tt>llvm.ctlz</tt>' intrinsic counts the leading (most significant) zeros
 in a variable.  If the src == 0 then the result is the size in bits of the type
-of src. For example, <tt>llvm.cttz(int 2) = 30</tt>.
+of src. For example, <tt>llvm.ctlz(int 2) = 30</tt>.
 </p>
 </div>
 
@@ -3596,10 +3786,10 @@ of src. For example, <tt>llvm.cttz(int 2) = 30</tt>.
 
 <h5>Syntax:</h5>
 <pre>
-  declare sbyte %llvm.cttz.i8(sbyte &lt;src&gt;)
-  declare short %llvm.cttz.i16(short &lt;src&gt;)
-  declare int   %llvm.cttz.i32(int &lt;src&gt;)
-  declare long  %llvm.cttz.i64(long &lt;src&gt;)
+  declare ubyte  %llvm.cttz.i8 (ubyte &lt;src&gt;)
+  declare ushort %llvm.cttz.i16(ushort &lt;src&gt;)
+  declare uint   %llvm.cttz.i32(uint &lt;src&gt;)
+  declare ulong  %llvm.cttz.i64(ulong &lt;src&gt;)
 </pre>
 
 <h5>Overview:</h5>
@@ -3613,7 +3803,7 @@ trailing zeros.
 
 <p>
 The only argument is the value to be counted.  The argument may be of any
-integer type.  The return type must match the argument type.
+unsigned integer type.  The return type must match the argument type.
 </p>
 
 <h5>Semantics:</h5>
@@ -3649,7 +3839,7 @@ Debugging</a> document.
   src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01!" /></a>
 
   <a href="mailto:sabre@nondot.org">Chris Lattner</a><br>
-  <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
+  <a href="http://llvm.org">The LLVM Compiler Infrastructure</a><br>
   Last modified: $Date$
 </address>
 </body>